Skip to content

Commit

Permalink
fix: update OpenAPI Schema with asn and dataCenter signals
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Sep 7, 2023
1 parent 095d550 commit e10f677
Show file tree
Hide file tree
Showing 6 changed files with 268 additions and 5 deletions.
205 changes: 201 additions & 4 deletions resources/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -4238,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
Expand Down Expand Up @@ -4311,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:
Expand Down Expand Up @@ -4382,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
Expand Down Expand Up @@ -4737,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
Expand All @@ -4747,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:
Expand Down
32 changes: 31 additions & 1 deletion src/generatedApiTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,21 @@ export interface components {
*/
subscription: string | null;
};
/** ASN */
ASN: {
/** @example 7922 */
asn: string;
/** @example 73.136.0.0/13 */
network: string;
/** @example COMCAST-7922 */
name?: string;
};
/** DataCenter */
DataCenter: {
result: boolean;
/** @example DediPath */
name?: string;
};
/** IPLocation */
IPLocation: {
/** @example 1000 */
Expand Down Expand Up @@ -444,7 +459,7 @@ export interface components {
/** @example Hlavni mesto Praha */
name?: string;
};
/** @description Contains all the information from each activated product - Fingerprint Pro or Bot Detection */
/** @description Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise) */
ProductsResponse: {
/** ProductsResponseIdentification */
identification?: {
Expand Down Expand Up @@ -495,6 +510,17 @@ export interface components {
visitorFound: boolean;
firstSeenAt: components['schemas']['SeenAt'];
lastSeenAt: components['schemas']['SeenAt'];
/**
* @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"
* ]
*/
visitorId: string;
};
error?: components['schemas']['IdentificationError'];
Expand Down Expand Up @@ -737,6 +763,8 @@ export interface components {
*/
address?: string;
geolocation?: components['schemas']['IPLocation'];
asn?: components['schemas']['ASN'];
dataCenter?: components['schemas']['DataCenter'];
};
v6?: {
/**
Expand All @@ -745,6 +773,8 @@ export interface components {
*/
address?: string;
geolocation?: components['schemas']['IPLocation'];
asn?: components['schemas']['ASN'];
dataCenter?: components['schemas']['DataCenter'];
};
};
IpBlockListResult: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ Object {
"ipInfo": Object {
"v4": Object {
"address": "94.142.239.124",
"asn": Object {
"asn": "7922",
"name": "COMCAST-7922",
"network": "73.136.0.0/13",
},
"dataCenter": Object {
"name": "DediPath",
"result": true,
},
"geolocation": Object {
"accuracyRadius": 20,
"city": Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,15 @@ Object {
"data": Object {
"v4": Object {
"address": "94.142.239.124",
"asn": Object {
"asn": "7922",
"name": "COMCAST-7922",
"network": "73.136.0.0/13",
},
"dataCenter": Object {
"name": "DediPath",
"result": true,
},
"geolocation": Object {
"accuracyRadius": 20,
"city": Object {
Expand Down
Loading

0 comments on commit e10f677

Please sign in to comment.