Skip to content

Commit d5108b4

Browse files
feat: update OpenAPI schema
1 parent ebab937 commit d5108b4

File tree

12 files changed

+419
-0
lines changed

12 files changed

+419
-0
lines changed

.changeset/forty-seas-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'fingerprint-pro-server-api-python-sdk': minor
3+
---
4+
5+
Add `relay` detection method to the VPN Detection Smart Signal

.changeset/orange-poets-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'fingerprint-pro-server-api-python-sdk': minor
3+
---
4+
5+
**events**: Add a `suspect` field to the `identification` product schema

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Class | Method | HTTP request | Description
254254
------------ | ------------- | ------------- | -------------
255255
*FingerprintApi* | [**delete_visitor_data**](docs/FingerprintApi.md#delete_visitor_data) | **DELETE** /visitors/{visitor_id} | Delete data by visitor ID
256256
*FingerprintApi* | [**get_event**](docs/FingerprintApi.md#get_event) | **GET** /events/{request_id} | Get event by request ID
257+
*FingerprintApi* | [**get_related_visitors**](docs/FingerprintApi.md#get_related_visitors) | **GET** /related-visitors | Get Related Visitors
257258
*FingerprintApi* | [**get_visits**](docs/FingerprintApi.md#get_visits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID
258259
*FingerprintApi* | [**update_event**](docs/FingerprintApi.md#update_event) | **PUT** /events/{request_id} | Update an event with a given request ID
259260

@@ -325,6 +326,8 @@ Class | Method | HTTP request | Description
325326
- [RawDeviceAttribute](docs/RawDeviceAttribute.md)
326327
- [RawDeviceAttributeError](docs/RawDeviceAttributeError.md)
327328
- [RawDeviceAttributes](docs/RawDeviceAttributes.md)
329+
- [RelatedVisitor](docs/RelatedVisitor.md)
330+
- [RelatedVisitorsResponse](docs/RelatedVisitorsResponse.md)
328331
- [RemoteControl](docs/RemoteControl.md)
329332
- [RootApps](docs/RootApps.md)
330333
- [SuspectScore](docs/SuspectScore.md)

docs/FingerprintApi.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**delete_visitor_data**](FingerprintApi.md#delete_visitor_data) | **DELETE** /visitors/{visitor_id} | Delete data by visitor ID
88
[**get_event**](FingerprintApi.md#get_event) | **GET** /events/{request_id} | Get event by request ID
9+
[**get_related_visitors**](FingerprintApi.md#get_related_visitors) | **GET** /related-visitors | Get Related Visitors
910
[**get_visits**](FingerprintApi.md#get_visits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID
1011
[**update_event**](FingerprintApi.md#update_event) | **PUT** /events/{request_id} | Update an event with a given request ID
1112

@@ -108,6 +109,56 @@ Name | Type | Description | Notes
108109

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

112+
# **get_related_visitors**
113+
> RelatedVisitorsResponse get_related_visitors(visitor_id)
114+
115+
Get Related Visitors
116+
117+
Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device. It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID. ⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️ If you would like to use Related visitors API, please contact our [support team](https://fingerprint.com/support). To learn more, see [Related visitors API reference](https://dev.fingerprint.com/reference/related-visitors-api).
118+
119+
### Example
120+
```python
121+
import fingerprint_pro_server_api_sdk
122+
from fingerprint_pro_server_api_sdk.rest import ApiException
123+
124+
# Configure API key authorization and region
125+
configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API_KEY")
126+
# configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API_KEY", region="eu")
127+
128+
# create an instance of the API class
129+
api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)
130+
131+
visitor_id = 'visitor_id_example' # str | The [visitor ID](https://dev.fingerprint.com/reference/get-function#visitorid) for which you want to find the other visitor IDs that originated from the same mobile device.
132+
133+
try:
134+
# Get Related Visitors
135+
api_response = api_instance.get_related_visitors(visitor_id)
136+
print(api_response)
137+
except ApiException as e:
138+
print("Exception when calling FingerprintApi->get_related_visitors: %s\n" % e)
139+
```
140+
141+
### Parameters
142+
143+
Name | Type | Description | Notes
144+
------------- | ------------- | ------------- | -------------
145+
**visitor_id** | **str**| The [visitor ID](https://dev.fingerprint.com/reference/get-function#visitorid) for which you want to find the other visitor IDs that originated from the same mobile device. |
146+
147+
### Return type
148+
149+
[**RelatedVisitorsResponse**](RelatedVisitorsResponse.md)
150+
151+
### Authorization
152+
153+
[ApiKeyHeader](../README.md#ApiKeyHeader), [ApiKeyQuery](../README.md#ApiKeyQuery)
154+
155+
### HTTP request headers
156+
157+
- **Content-Type**: Not defined
158+
- **Accept**: application/json
159+
160+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
161+
111162
# **get_visits**
112163
> VisitorsGetResponse get_visits(visitor_id, request_id=request_id, linked_id=linked_id, limit=limit, pagination_key=pagination_key, before=before)
113164

docs/RelatedVisitor.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# RelatedVisitor
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**visitor_id** | **str** | Visitor ID of a browser that originates from the same mobile device as the input visitor ID. |
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+

docs/RelatedVisitorsResponse.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# RelatedVisitorsResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**related_visitors** | [**list[RelatedVisitor]**](RelatedVisitor.md) | |
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+

fingerprint_pro_server_api_sdk/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
from fingerprint_pro_server_api_sdk.models.raw_device_attribute import RawDeviceAttribute
8787
from fingerprint_pro_server_api_sdk.models.raw_device_attribute_error import RawDeviceAttributeError
8888
from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes
89+
from fingerprint_pro_server_api_sdk.models.related_visitor import RelatedVisitor
90+
from fingerprint_pro_server_api_sdk.models.related_visitors_response import RelatedVisitorsResponse
8991
from fingerprint_pro_server_api_sdk.models.remote_control import RemoteControl
9092
from fingerprint_pro_server_api_sdk.models.root_apps import RootApps
9193
from fingerprint_pro_server_api_sdk.models.suspect_score import SuspectScore

fingerprint_pro_server_api_sdk/api/fingerprint_api.py

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from fingerprint_pro_server_api_sdk.models.error_response import ErrorResponse # noqa: F401
2424
from fingerprint_pro_server_api_sdk.models.events_get_response import EventsGetResponse # noqa: F401
2525
from fingerprint_pro_server_api_sdk.models.events_update_request import EventsUpdateRequest # noqa: F401
26+
from fingerprint_pro_server_api_sdk.models.related_visitors_response import RelatedVisitorsResponse # noqa: F401
2627
from fingerprint_pro_server_api_sdk.models.visitors_get_response import VisitorsGetResponse # noqa: F401
2728

2829

@@ -252,6 +253,116 @@ def get_event_with_http_info(self, request_id: str, **kwargs): # noqa: E501
252253
raise extend_exception(e, error)
253254
raise e
254255

256+
def get_related_visitors(self, visitor_id: str, **kwargs) -> Union[RelatedVisitorsResponse, AsyncResult[RelatedVisitorsResponse]]: # noqa: E501
257+
"""Get Related Visitors # noqa: E501
258+
259+
Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device. It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID. ⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️ If you would like to use Related visitors API, please contact our [support team](https://fingerprint.com/support). To learn more, see [Related visitors API reference](https://dev.fingerprint.com/reference/related-visitors-api). # noqa: E501
260+
This method makes a synchronous HTTP request by default. To make an
261+
asynchronous HTTP request, please pass async_req=True
262+
>>> thread = api.get_related_visitors(visitor_id, async_req=True)
263+
>>> result = thread.get()
264+
265+
:param async_req bool
266+
:param visitor_id: The [visitor ID](https://dev.fingerprint.com/reference/get-function#visitorid) for which you want to find the other visitor IDs that originated from the same mobile device. (required)
267+
:return: RelatedVisitorsResponse
268+
If the method is called asynchronously,
269+
returns the request thread.
270+
"""
271+
kwargs['_return_http_data_only'] = True
272+
if kwargs.get('async_req'):
273+
return self.get_related_visitors_with_http_info(visitor_id, **kwargs) # noqa: E501
274+
else:
275+
(data) = self.get_related_visitors_with_http_info(visitor_id, **kwargs) # noqa: E501
276+
return data
277+
278+
def get_related_visitors_with_http_info(self, visitor_id: str, **kwargs): # noqa: E501
279+
"""Get Related Visitors # noqa: E501
280+
281+
Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device. It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID. ⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️ If you would like to use Related visitors API, please contact our [support team](https://fingerprint.com/support). To learn more, see [Related visitors API reference](https://dev.fingerprint.com/reference/related-visitors-api). # noqa: E501
282+
This method makes a synchronous HTTP request by default. To make an
283+
asynchronous HTTP request, please pass async_req=True
284+
>>> thread = api.get_related_visitors_with_http_info(visitor_id, async_req=True)
285+
>>> result = thread.get()
286+
287+
:param async_req bool
288+
:param str visitor_id: The [visitor ID](https://dev.fingerprint.com/reference/get-function#visitorid) for which you want to find the other visitor IDs that originated from the same mobile device. (required)
289+
:return: RelatedVisitorsResponse
290+
If the method is called asynchronously,
291+
returns the request thread.
292+
"""
293+
294+
all_params = [
295+
'visitor_id',
296+
'async_req',
297+
'_return_http_data_only',
298+
'_preload_content',
299+
'_request_timeout']
300+
301+
params = locals()
302+
for key, val in params['kwargs'].items():
303+
if key not in all_params:
304+
raise TypeError(
305+
"Got an unexpected keyword argument '%s'"
306+
" to method get_related_visitors" % key
307+
)
308+
params[key] = val
309+
del params['kwargs']
310+
# verify the required parameter 'visitor_id' is set
311+
if 'visitor_id' not in params or params['visitor_id'] is None:
312+
raise ValueError("Missing the required parameter `visitor_id` when calling `get_related_visitors`") # noqa: E501
313+
314+
collection_formats = {}
315+
316+
path_params = {}
317+
318+
query_params = [('ii', 'fingerprint-pro-server-python-sdk/8.1.0')]
319+
if 'visitor_id' in params:
320+
query_params.append(('visitor_id', params['visitor_id'])) # noqa: E501
321+
322+
header_params = {}
323+
324+
form_params = []
325+
local_var_files = {}
326+
327+
body_params = None
328+
# HTTP header `Accept`
329+
header_params['Accept'] = self.api_client.select_header_accept(
330+
['application/json']) # noqa: E501
331+
332+
# Authentication setting
333+
auth_settings = ['ApiKeyHeader', 'ApiKeyQuery'] # noqa: E501
334+
335+
try:
336+
return self.api_client.call_api(
337+
'/related-visitors', 'GET',
338+
path_params,
339+
query_params,
340+
header_params,
341+
body=body_params,
342+
post_params=form_params,
343+
files=local_var_files,
344+
response_type='RelatedVisitorsResponse', # noqa: E501
345+
auth_settings=auth_settings,
346+
async_req=params.get('async_req'),
347+
_return_http_data_only=params.get('_return_http_data_only'),
348+
_preload_content=params.get('_preload_content', True),
349+
_request_timeout=params.get('_request_timeout'),
350+
collection_formats=collection_formats)
351+
except ApiException as e:
352+
if e.status == 400:
353+
error = self.api_client.deserialize(e, 'ErrorResponse', True)
354+
raise extend_exception(e, error)
355+
if e.status == 403:
356+
error = self.api_client.deserialize(e, 'ErrorResponse', True)
357+
raise extend_exception(e, error)
358+
if e.status == 404:
359+
error = self.api_client.deserialize(e, 'ErrorResponse', True)
360+
raise extend_exception(e, error)
361+
if e.status == 429:
362+
error = self.api_client.deserialize(e, 'ErrorResponse', True)
363+
raise extend_exception(e, error)
364+
raise e
365+
255366
def get_visits(self, visitor_id: str, **kwargs) -> Union[VisitorsGetResponse, AsyncResult[VisitorsGetResponse]]: # noqa: E501
256367
"""Get visits by visitor ID # noqa: E501
257368

fingerprint_pro_server_api_sdk/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
from fingerprint_pro_server_api_sdk.models.raw_device_attribute import RawDeviceAttribute
7979
from fingerprint_pro_server_api_sdk.models.raw_device_attribute_error import RawDeviceAttributeError
8080
from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes
81+
from fingerprint_pro_server_api_sdk.models.related_visitor import RelatedVisitor
82+
from fingerprint_pro_server_api_sdk.models.related_visitors_response import RelatedVisitorsResponse
8183
from fingerprint_pro_server_api_sdk.models.remote_control import RemoteControl
8284
from fingerprint_pro_server_api_sdk.models.root_apps import RootApps
8385
from fingerprint_pro_server_api_sdk.models.suspect_score import SuspectScore
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# coding: utf-8
2+
3+
"""
4+
Fingerprint Pro Server API
5+
6+
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
7+
8+
OpenAPI spec version: 3
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
import re # noqa: F401
14+
from typing import Dict, List, Optional # noqa: F401
15+
from fingerprint_pro_server_api_sdk.base_model import BaseModel
16+
17+
18+
class RelatedVisitor(BaseModel):
19+
"""NOTE: This class is auto generated by the swagger code generator program.
20+
21+
Do not edit the class manually.
22+
"""
23+
"""
24+
Attributes:
25+
swagger_types (dict): The key is attribute name
26+
and the value is attribute type.
27+
attribute_map (dict): The key is attribute name
28+
and the value is json key in definition.
29+
"""
30+
swagger_types = {
31+
'visitor_id': 'str'
32+
}
33+
34+
attribute_map = {
35+
'visitor_id': 'visitorId'
36+
}
37+
38+
def __init__(self, visitor_id=None): # noqa: E501
39+
"""RelatedVisitor - a model defined in Swagger""" # noqa: E501
40+
self._visitor_id = None
41+
self.discriminator = None
42+
self.visitor_id = visitor_id
43+
44+
@property
45+
def visitor_id(self) -> str:
46+
"""Gets the visitor_id of this RelatedVisitor. # noqa: E501
47+
48+
Visitor ID of a browser that originates from the same mobile device as the input visitor ID. # noqa: E501
49+
50+
:return: The visitor_id of this RelatedVisitor. # noqa: E501
51+
"""
52+
return self._visitor_id
53+
54+
@visitor_id.setter
55+
def visitor_id(self, visitor_id: str):
56+
"""Sets the visitor_id of this RelatedVisitor.
57+
58+
Visitor ID of a browser that originates from the same mobile device as the input visitor ID. # noqa: E501
59+
60+
:param visitor_id: The visitor_id of this RelatedVisitor. # noqa: E501
61+
"""
62+
if visitor_id is None:
63+
raise ValueError("Invalid value for `visitor_id`, must not be `None`") # noqa: E501
64+
65+
self._visitor_id = visitor_id
66+
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# coding: utf-8
2+
3+
"""
4+
Fingerprint Pro Server API
5+
6+
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
7+
8+
OpenAPI spec version: 3
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
import re # noqa: F401
14+
from typing import Dict, List, Optional # noqa: F401
15+
from fingerprint_pro_server_api_sdk.base_model import BaseModel
16+
from fingerprint_pro_server_api_sdk.models.related_visitor import RelatedVisitor
17+
18+
19+
class RelatedVisitorsResponse(BaseModel):
20+
"""NOTE: This class is auto generated by the swagger code generator program.
21+
22+
Do not edit the class manually.
23+
"""
24+
"""
25+
Attributes:
26+
swagger_types (dict): The key is attribute name
27+
and the value is attribute type.
28+
attribute_map (dict): The key is attribute name
29+
and the value is json key in definition.
30+
"""
31+
swagger_types = {
32+
'related_visitors': 'list[RelatedVisitor]'
33+
}
34+
35+
attribute_map = {
36+
'related_visitors': 'relatedVisitors'
37+
}
38+
39+
def __init__(self, related_visitors=None): # noqa: E501
40+
"""RelatedVisitorsResponse - a model defined in Swagger""" # noqa: E501
41+
self._related_visitors = None
42+
self.discriminator = None
43+
self.related_visitors = related_visitors
44+
45+
@property
46+
def related_visitors(self) -> List[RelatedVisitor]:
47+
"""Gets the related_visitors of this RelatedVisitorsResponse. # noqa: E501
48+
49+
50+
:return: The related_visitors of this RelatedVisitorsResponse. # noqa: E501
51+
"""
52+
return self._related_visitors
53+
54+
@related_visitors.setter
55+
def related_visitors(self, related_visitors: List[RelatedVisitor]):
56+
"""Sets the related_visitors of this RelatedVisitorsResponse.
57+
58+
59+
:param related_visitors: The related_visitors of this RelatedVisitorsResponse. # noqa: E501
60+
"""
61+
if related_visitors is None:
62+
raise ValueError("Invalid value for `related_visitors`, must not be `None`") # noqa: E501
63+
64+
self._related_visitors = related_visitors
65+

0 commit comments

Comments
 (0)