Releases: fingerprintjs/fingerprint-pro-server-api-go-sdk
Releases · fingerprintjs/fingerprint-pro-server-api-go-sdk
v7.1.0
v7.0.0
Major Changes
The underlying Server API hasn’t changed, but we made SDK type and class generation more precise, resulting in small breaking changes for the SDK itself. This change should make the SDK API a lot more stable going forward
- make
tag
field optional for Webhook (406a373) - Provide error message from received response rather than status code text in
ApiError.Error()
(76a47e1) - Change
ModelMap
to contain any possible property, not just strings (f4a0749) - Always throw
sdk.Error
from all Fingerprint API methods (c02c7d9) -
- Remove the
BrowserDetails
fieldbotProbability
. - Update the
IdentificationConfidence
fieldscore
type format:float
->double
. - Make the
RawDeviceAttributeError
fieldname
optional . - Make the
RawDeviceAttributeError
fieldmessage
optional . - events: Remove the
EventsResponse
fielderror
.- [note]: The errors are represented by
ErrorResponse
model.
- [note]: The errors are represented by
- events: Update the
HighActivity
fielddailyRequests
type format:number
->int64
. - events: Specify the
Tampering
fieldanomalyScore
type format:double
. - webhook: Make the
Webhook
fields optional:visitorId
,visitorFound
,firstSeenAt
,lastSeenAt
,browserDetails
,incognito
. - webhook: Make the
WebhookClonedApp
fieldresult
optional. - webhook: Make the
WebhookDeveloperTools
fieldresult
optional. - webhook: Make the
WebhookEmulator
fieldresult
optional. - webhook: Make the
WebhookFactoryReset
fieldstime
andtimestamp
optional. - webhook: Make the
WebhookFrida
fieldresult
optional. - webhook: Update the
WebhookHighActivity
fielddailyRequests
type format:number
->int64
. - webhook: Make the
WebhookIPBlocklist
fieldsresult
anddetails
optional. - webhook: Make the
WebhookJailbroken
fieldresult
optional. - webhook: Make the
WebhookLocationSpoofing
fieldresult
optional. - webhook: Make the
WebhookPrivacySettings
fieldresult
optional. - webhook: Make the
WebhookProxy
fieldresult
optional. - webhook: Make the
WebhookRemoteControl
fieldresult
optional. - webhook: Make the
WebhookRootApps
fieldresult
optional. - webhook: Make the
WebhookSuspectScore
fieldresult
optional. - webhook: Make the
WebhookTampering
fieldsresult
,anomalyScore
andantiDetectBrowser
optional. - webhook: Specify the
WebhookTampering
fieldanomalyScore
type format:double
. - webhook: Make the
WebhookTor
fieldresult
optional. - webhook: Make the
WebhookVelocity
fields optional:distinctIp
,distinctLinkedId
,distinctCountry
,events
,ipEvents
,distinctIpByLinkedId
,distinctVisitorIdByLinkedId
. - webhook: Make the
WebhookVirtualMachine
fieldresult
optional. - webhook: Make the
WebhookVPN
fields optional:result
,confidence
,originTimezone
,methods
. (c92322a)
- Remove the
-
- Rename
BotdResult
->Botd
. - Rename
BotdDetectionResult
->BotdBot
:- Extract
result
type asBotdBotResult
.
- Extract
- Rename
ClonedAppResult
->ClonedApp
. - Rename
DeveloperToolsResult
->DeveloperTools
. - Rename
EmulatorResult
->Emulator
. - Refactor error models:
- Remove
ErrorCommon403Response
,ErrorCommon429Response
,ErrorEvent404Response
,TooManyRequestsResponse
,ErrorVisits403
,ErrorUpdateEvent400Response
,ErrorUpdateEvent409Response
,ErrorVisitor400Response
,ErrorVisitor404Response
,IdentificationError
,ProductError
. - Introduce
ErrorResponse
andErrorPlainResponse
.- [note]:
ErrorPlainResponse
has a different format{ "error": string }
and it is used only inGET /visitors
.
- [note]:
- Extract
error
type asError
. - Extract
error.code
type asErrorCode
.
- Remove
- Rename
EventResponse
->EventsGetResponse
. - Rename
EventUpdateRequest
->EventsUpdateRequest
. - Rename
FactoryResetResult
->FactoryReset
. - Rename
FridaResult
->Frida
. - Rename
IPLocation
->Geolocation
:- Rename
IPLocationCity
->GeolocationCity
. - Extract
subdivisions
type asGeolocationSubdivisions
. - Rename
Location
->GeolocationContinent
: - Introduce a dedicated type
GeolocationCountry
. - Rename
Subdivision
->GeolocationSubdivision
.
- Rename
- Rename
HighActivityResult
->HighActivity
. - Rename
Confidence
->IdentificationConfidence
. - Rename
SeenAt
->IdentificationSeenAt
. - Rename
IncognitoResult
->Incognito
. - Rename
IpBlockListResult
->IPBlocklist
:- Extract
details
type asIPBlocklistDetails
.
- Extract
- Rename
IpInfoResult
->IPInfo
:- Rename
IpInfoResultV4
->IPInfoV4
. - Rename
IpInfoResultV6
->IPInfoV6
. - Rename
ASN
->IPInfoASN
. - Rename
DataCenter
->IPInfoDataCenter
.
- Rename
- Rename
JailbrokenResult
->Jailbroken
. - Rename
LocationSpoofingResult
->LocationSpoofing
. - Rename
PrivacySettingsResult
->PrivacySettings
. - Rename
ProductsResponse
->Products
:- Rename inner types:
ProductsResponseIdentification
->ProductIdentification
,ProductsResponseIdentificationData
->Identification
,ProductsResponseBotd
->ProductBotd
,SignalResponseRootApps
->ProductRootApps
,SignalResponseEmulator
->ProductEmulator
,SignalResponseIpInfo
->ProductIPInfo
,SignalResponseIpBlocklist
->ProductIPBlocklist
,SignalResponseTor
->ProductTor
,SignalResponseVpn
->ProductVPN
,SignalResponseProxy
->ProductProxy
,ProxyResult
->Proxy
,SignalResponseIncognito
->ProductIncognito
,SignalResponseTampering
->ProductTampering
,SignalResponseClonedApp
->ProductClonedApp
,SignalResponseFactoryReset
->ProductFactoryReset
,SignalResponseJailbroken
->ProductJailbroken
,SignalResponseFrida
->ProductFrida
,SignalResponsePrivacySettings
->ProductPrivacySettings
,SignalResponseVirtualMachine
->ProductVirtualMachine
,SignalResponseRawDeviceAttributes
->ProductRawDeviceAttributes
,RawDeviceAttributesResultValue
->RawDeviceAttributes
,SignalResponseHighActivity
->ProductHighActivity
,SignalResponseLocationSpoofing
->ProductLocationSpoofing
,SignalResponseSuspectScore
->ProductSuspectScore
,SignalResponseRemoteControl
->ProductRemoteControl
,SignalResponseVelocity
->ProductVelocity
,SignalResponseDeveloperTools
->ProductDeveloperTools
. - Extract
identification.data
type asIdentification
.
- Rename inner types:
- Rename
RawDeviceAttributesResult
->RawDeviceAttributes
:- Extract item type as
RawDeviceAttribute
. - Extract
error
type asRawDeviceAttributeError
.
- Extract item type as
- Rename
RemoteControlResult
->RemoteControl
. - Rename
RootAppsResult
->RootApps
. - Rename
SuspectScoreResult
->SuspectScore
. - Extract new model
Tag
. - Rename
TamperingResult
->Tampering
. - Rename
TorResult
->Tor
. - Rename
VelocityResult
->Velocity
:- Rename
VelocityIntervals
->VelocityData
. - Rename
VelocityIntervalResult
->VelocityIntervals
.
- Rename
- Rename
VirtualMachineResult
->VirtualMachine
. - Rename the
Visit
fieldipLocation
typeDeprecatedIPLocation
->DeprecatedGeolocation
.- Instead of
DeprecatedIPLocationCity
use commonGeolocationCity
- Instead of
- Rename
Response
->VisitorsGetResponse
.- Omit extra inner type
ResponseVisits
- Omit extra inner type
- Rename
VpnResult
->VPN
.- Extract
confidence
type asVPNConfidence
. - Extract
methods
type asVPNMethods
.
- Extract
- Rename
WebhookVisit
->Webhook
.- Introduce new inner types:
WebhookRootApps
,WebhookEmulator
,WebhookIPInfo
,WebhookIPBlocklist
,WebhookTor
,WebhookVPN
,WebhookProxy
,WebhookTampering
,WebhookClonedApp
,WebhookFactoryReset
,WebhookJailbroken
,WebhookFrida
,WebhookPrivacySettings
,WebhookVirtualMachine
,WebhookRawDeviceAttributes
,WebhookHighActivity
,WebhookLocationSpoofing
,WebhookSuspectScore
,WebhookRemoteControl
,WebhookVelocity
,WebhookDeveloperTools
. (c92322a)
- Introduce new inner types:
- Rename
- Rename errors models related to visits:
- rename
ErrorVisitsDelete400Response
toErrorVisitor400Response
- rename
ErrorVisitsDelete404ResponseError
toErrorVisitor404ResponseError
- rename
ErrorVisitsDelete404Response
toErrorVisitor404Response
(fe7e9f7)
- rename
Minor Changes
- related-visitors: Add GET
/related-visitors
endpoint (e069c8f) - Added new
ipEvents
, `distinctIpByLinked...
v7.0.0-test.2
v7.0.0-test.1
Major Changes
-
- Remove the
BrowserDetails
fieldbotProbability
. - Update the
IdentificationConfidence
fieldscore
type format:float
->double
. - Make the
RawDeviceAttributeError
fieldname
optional . - Make the
RawDeviceAttributeError
fieldmessage
optional . - events: Remove the
EventsResponse
fielderror
.- [note]: The errors are represented by
ErrorResponse
model.
- [note]: The errors are represented by
- events: Update the
HighActivity
fielddailyRequests
type format:number
->int64
. - events: Specify the
Tampering
fieldanomalyScore
type format:double
. - webhook: Make the
Webhook
fields optional:visitorId
,visitorFound
,firstSeenAt
,lastSeenAt
,browserDetails
,incognito
. - webhook: Make the
WebhookClonedApp
fieldresult
optional. - webhook: Make the
WebhookDeveloperTools
fieldresult
optional. - webhook: Make the
WebhookEmulator
fieldresult
optional. - webhook: Make the
WebhookFactoryReset
fieldstime
andtimestamp
optional. - webhook: Make the
WebhookFrida
fieldresult
optional. - webhook: Update the
WebhookHighActivity
fielddailyRequests
type format:number
->int64
. - webhook: Make the
WebhookIPBlocklist
fieldsresult
anddetails
optional. - webhook: Make the
WebhookJailbroken
fieldresult
optional. - webhook: Make the
WebhookLocationSpoofing
fieldresult
optional. - webhook: Make the
WebhookPrivacySettings
fieldresult
optional. - webhook: Make the
WebhookProxy
fieldresult
optional. - webhook: Make the
WebhookRemoteControl
fieldresult
optional. - webhook: Make the
WebhookRootApps
fieldresult
optional. - webhook: Make the
WebhookSuspectScore
fieldresult
optional. - webhook: Make the
WebhookTampering
fieldsresult
,anomalyScore
andantiDetectBrowser
optional. - webhook: Specify the
WebhookTampering
fieldanomalyScore
type format:double
. - webhook: Make the
WebhookTor
fieldresult
optional. - webhook: Make the
WebhookVelocity
fields optional:distinctIp
,distinctLinkedId
,distinctCountry
,events
,ipEvents
,distinctIpByLinkedId
,distinctVisitorIdByLinkedId
. - webhook: Make the
WebhookVirtualMachine
fieldresult
optional. - webhook: Make the
WebhookVPN
fields optional:result
,confidence
,originTimezone
,methods
. (c92322a)
- Remove the
-
- Rename
BotdResult
->Botd
. - Rename
BotdDetectionResult
->BotdBot
:- Extract
result
type asBotdBotResult
.
- Extract
- Rename
ClonedAppResult
->ClonedApp
. - Rename
DeveloperToolsResult
->DeveloperTools
. - Rename
EmulatorResult
->Emulator
. - Refactor error models:
- Remove
ErrorCommon403Response
,ErrorCommon429Response
,ErrorEvent404Response
,TooManyRequestsResponse
,ErrorVisits403
,ErrorUpdateEvent400Response
,ErrorUpdateEvent409Response
,ErrorVisitor400Response
,ErrorVisitor404Response
,IdentificationError
,ProductError
. - Introduce
ErrorResponse
andErrorPlainResponse
.- [note]:
ErrorPlainResponse
has a different format{ "error": string }
and it is used only inGET /visitors
.
- [note]:
- Extract
error
type asError
. - Extract
error.code
type asErrorCode
.
- Remove
- Rename
EventResponse
->EventsGetResponse
. - Rename
EventUpdateRequest
->EventsUpdateRequest
. - Rename
FactoryResetResult
->FactoryReset
. - Rename
FridaResult
->Frida
. - Rename
IPLocation
->Geolocation
:- Rename
IPLocationCity
->GeolocationCity
. - Extract
subdivisions
type asGeolocationSubdivisions
. - Rename
Location
->GeolocationContinent
: - Introduce a dedicated type
GeolocationCountry
. - Rename
Subdivision
->GeolocationSubdivision
.
- Rename
- Rename
HighActivityResult
->HighActivity
. - Rename
Confidence
->IdentificationConfidence
. - Rename
SeenAt
->IdentificationSeenAt
. - Rename
IncognitoResult
->Incognito
. - Rename
IpBlockListResult
->IPBlocklist
:- Extract
details
type asIPBlocklistDetails
.
- Extract
- Rename
IpInfoResult
->IPInfo
:- Rename
IpInfoResultV4
->IPInfoV4
. - Rename
IpInfoResultV6
->IPInfoV6
. - Rename
ASN
->IPInfoASN
. - Rename
DataCenter
->IPInfoDataCenter
.
- Rename
- Rename
JailbrokenResult
->Jailbroken
. - Rename
LocationSpoofingResult
->LocationSpoofing
. - Rename
PrivacySettingsResult
->PrivacySettings
. - Rename
ProductsResponse
->Products
:- Rename inner types:
ProductsResponseIdentification
->ProductIdentification
,ProductsResponseIdentificationData
->Identification
,ProductsResponseBotd
->ProductBotd
,SignalResponseRootApps
->ProductRootApps
,SignalResponseEmulator
->ProductEmulator
,SignalResponseIpInfo
->ProductIPInfo
,SignalResponseIpBlocklist
->ProductIPBlocklist
,SignalResponseTor
->ProductTor
,SignalResponseVpn
->ProductVPN
,SignalResponseProxy
->ProductProxy
,ProxyResult
->Proxy
,SignalResponseIncognito
->ProductIncognito
,SignalResponseTampering
->ProductTampering
,SignalResponseClonedApp
->ProductClonedApp
,SignalResponseFactoryReset
->ProductFactoryReset
,SignalResponseJailbroken
->ProductJailbroken
,SignalResponseFrida
->ProductFrida
,SignalResponsePrivacySettings
->ProductPrivacySettings
,SignalResponseVirtualMachine
->ProductVirtualMachine
,SignalResponseRawDeviceAttributes
->ProductRawDeviceAttributes
,RawDeviceAttributesResultValue
->RawDeviceAttributes
,SignalResponseHighActivity
->ProductHighActivity
,SignalResponseLocationSpoofing
->ProductLocationSpoofing
,SignalResponseSuspectScore
->ProductSuspectScore
,SignalResponseRemoteControl
->ProductRemoteControl
,SignalResponseVelocity
->ProductVelocity
,SignalResponseDeveloperTools
->ProductDeveloperTools
. - Extract
identification.data
type asIdentification
.
- Rename inner types:
- Rename
RawDeviceAttributesResult
->RawDeviceAttributes
:- Extract item type as
RawDeviceAttribute
. - Extract
error
type asRawDeviceAttributeError
.
- Extract item type as
- Rename
RemoteControlResult
->RemoteControl
. - Rename
RootAppsResult
->RootApps
. - Rename
SuspectScoreResult
->SuspectScore
. - Extract new model
Tag
. - Rename
TamperingResult
->Tampering
. - Rename
TorResult
->Tor
. - Rename
VelocityResult
->Velocity
:- Rename
VelocityIntervals
->VelocityData
. - Rename
VelocityIntervalResult
->VelocityIntervals
.
- Rename
- Rename
VirtualMachineResult
->VirtualMachine
. - Rename the
Visit
fieldipLocation
typeDeprecatedIPLocation
->DeprecatedGeolocation
.- Instead of
DeprecatedIPLocationCity
use commonGeolocationCity
- Instead of
- Rename
Response
->VisitorsGetResponse
.- Omit extra inner type
ResponseVisits
- Omit extra inner type
- Rename
VpnResult
->VPN
.- Extract
confidence
type asVPNConfidence
. - Extract
methods
type asVPNMethods
.
- Extract
- Rename
WebhookVisit
->Webhook
.- Introduce new inner types:
WebhookRootApps
,WebhookEmulator
,WebhookIPInfo
,WebhookIPBlocklist
,WebhookTor
,WebhookVPN
,WebhookProxy
,WebhookTampering
,WebhookClonedApp
,WebhookFactoryReset
,WebhookJailbroken
,WebhookFrida
,WebhookPrivacySettings
,WebhookVirtualMachine
,WebhookRawDeviceAttributes
,WebhookHighActivity
,WebhookLocationSpoofing
,WebhookSuspectScore
,WebhookRemoteControl
,WebhookVelocity
,WebhookDeveloperTools
. (c92322a)
- Introduce new inner types:
- Rename
Minor Changes
- related-visitors: Add GET
/related-visitors
endpoint (e069c8f) - Added new
ipEvents
,distinctIpByLinkedId
, anddistinctVisitorIdByLinkedId
fields to thevelocity
Smart Signal. (c92322a) -
- Make the
GeolocationCity
fieldname
required. - Make the
GeolocationSubdivision
fieldisoCode
required. - Make the
GeolocationSubdivision
fieldname
required. - Make the
IPInfoASN
fieldname
required . - Make the
IPInfoDataCenter
fieldname
required. - Add optional
IdentificationConfidence
fieldcomment
. - events: Add optional
Botd
fieldmeta
. - events: Add optional
Identification
fieldcomponents
. - events: Make the
VPN
fieldoriginCountry
required. - visitors: Add optional
Visit
fieldcomponents
. - webhook: Add optional
Webhook
fieldcomponents
. (c92322a)
- Make the
- visitors: Add the confidence field to the VPN Detection Smart Signal (782dc59)
- Remove
ipv4
format fromip
field inBotd
,Identification
,Visit
andWebhook
models. ([1bda1e3](https://github.com/fingerprintjs/finger...
v7.0.0-test.0
Major Changes
- make
tag
field optional for Webhook (406a373) - Change
ModelMap
to contain any possible property, not just strings (f4a0749) - Rename errors models related to visits:
- rename
ErrorVisitsDelete400Response
toErrorVisitor400Response
- rename
ErrorVisitsDelete404ResponseError
toErrorVisitor404ResponseError
- rename
ErrorVisitsDelete404Response
toErrorVisitor404Response
(fe7e9f7)
- rename
Minor Changes
- events: Introduce
PUT
endpoint for/events
API (e9df386)
Patch Changes
- Remove unused
Model
struct (d398848)
v6.1.0
v6.0.0
6.0.0 (2024-06-27)
⚠ BREAKING CHANGES
- it is now easier to check for too many requests error (429):
response, httpRes, err := client.FingerprintApi.GetVisits(auth, visitorId, &opts)
fmt.Printf("%+v\n", httpRes)
if err != nil {
var tooManyRequestsError *sdk.TooManyRequestsError
if errors.As(err, &tooManyRequestsError) {
log.Printf("Too many requests, retry after %d seconds", tooManyRequestsError.RetryAfter())
} else {
log.Print(err)
}
}
- rename
GenericSwaggerError
toApiError
- rename
ManyRequestsResponse
toTooManyRequestsResponse
- go 1.20 has reached EOL. Minimal supported version of go is now 1.21
- right now we use native
errors
package for joining errors, meaning that multiple error messages are now joined by new line rather than colon (:) - optional pkg is no longer used in this SDK. Please pass native GO types instead.
Features
- add
IsValidWebhookSignature
function for validating webhook signature (a5bf13d) - add delete API (0e077c3)
- add os Mismatch (30b0215)
- add revision string field to confidence object (8a2f270)
- drop support for go 1.20 (46953bc)
- drop usage of
github.com/pkg/errors
(186d30a) - introduce
TooManyRequestsError
(85f3307) - provide
HttpResponse()
inApiError
(acd1274) - re-write request handling logic (14b7e7f)
- remove usage of github.com/antihax/optional package (62db97f)
- rename
GenericSwaggerError
toApiError
(259b7b4) - rename
ManyRequestsResponse
toTooManyRequestsResponse
(3f66641)
Bug Fixes
v6.0.0-test.2
6.0.0-test.2 (2024-06-26)
Bug Fixes
- use correct error type for
incognito
,rawDeviceAttributes
andtampering
in theGetEvent
method (1487938)
v6.0.0-test.1
6.0.0-test.1 (2024-06-21)
⚠ BREAKING CHANGES
- it is now easier to check for too many requests error (429):
response, httpRes, err := client.FingerprintApi.GetVisits(auth, visitorId, &opts)
fmt.Printf("%+v\n", httpRes)
if err != nil {
var tooManyRequestsError *sdk.TooManyRequestsError
if errors.As(err, &tooManyRequestsError) {
log.Fatalf("Too many requests, retry after %d seconds", tooManyRequestsError.RetryAfter())
} else {
log.Fatal(err)
}
}
- rename
GenericSwaggerError
toApiError
- rename
ManyRequestsResponse
toTooManyRequestsResponse
- go 1.20 has reached EOL. Minimal supported version of go is now 1.21
- right now we use native
errors
package for joining errors, meaning that multiple error messages are now joined by new line rather than colon (:) - optional pkg is no longer used in this SDK. Please pass native GO types instead.
Features
- add
IsValidWebhookSignature
function for validating webhook signature (a5bf13d) - add delete API (0e077c3)
- add os Mismatch (30b0215)
- add revision string field to confidence object (8a2f270)
- drop support for go 1.20 (46953bc)
- drop usage of
github.com/pkg/errors
(186d30a) - introduce
TooManyRequestsError
(6ee7ff2) - provide
HttpResponse()
inApiError
(acd1274) - re-write request handling logic (14b7e7f)
- remove usage of github.com/antihax/optional package (62db97f)
- rename
GenericSwaggerError
toApiError
(259b7b4) - rename
ManyRequestsResponse
toTooManyRequestsResponse
(3f66641)
Bug Fixes
- allow passing
nil
configuration toNewAPIClient
(595eaf8) - move test related dependencies to test module (298275d)
Reverts
- "chore(release): 6.0.0-test.1 [skip ci]" (84ec138)