New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fingerprintjs/fingerprintjs-pro-server-api

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fingerprintjs/fingerprintjs-pro-server-api - npm Package Compare versions

Comparing version 6.1.0 to 6.2.0-test.0

2

package.json
{
"name": "@fingerprintjs/fingerprintjs-pro-server-api",
"version": "6.1.0",
"version": "6.2.0-test.0",
"description": "Node.js wrapper for FingerprintJS Sever API",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

@@ -72,3 +72,3 @@ <p align="center">

Initialize the client instance and use it to make API requests. You need to specify your Fingerprint [Secret API key](https://dev.fingerprint.com/docs/quick-start-guide#4-get-smart-signals-to-your-server) and the region of your Fingerprint application.
Initialize the client instance and use it to make API requests. You need to specify your Fingerprint [Secret API key](https://dev.fingerprint.com/docs/quick-start-guide#4-get-smart-signals-to-your-server) and the region of your Fingerprint workspace.

@@ -87,3 +87,3 @@ ```ts

// Get visit history of a specific visitor
client.getVisitorHistory('<visitorId>').then((visitorHistory) => {
client.getVisits('<visitorId>').then((visitorHistory) => {
console.log(visitorHistory)

@@ -131,5 +131,5 @@ })

// Handling getVisitorHistory errors
// Handling getVisits errors
try {
const visitorHistory = await client.getVisitorHistory(visitorId, {
const visitorHistory = await client.getVisits(visitorId, {
limit: 10,

@@ -136,0 +136,0 @@ })

@@ -11,2 +11,4 @@ import { getRequestPath } from './urlUtils'

RelatedVisitorsResponse,
SearchEventsFilter,
SearchEventsResponse,
VisitorHistoryFilter,

@@ -233,2 +235,61 @@ VisitorsResponse,

/**
* Search for identification events, including Smart Signals, using
* multiple filtering criteria. If you don't provide `start` or `end`
* parameters, the default search range is the last 7 days.
*
* Please note that events include mobile signals (e.g. `rootApps`) even if
* the request originated from a non-mobile platform. We recommend you
* **ignore** mobile signals for such requests.
*
* @param {SearchEventsFilter} filter - Events filter
* @param {number} filter.limit - Limit the number of events returned. Must be greater than 0.
* @param {string|undefined} filter.visitorId - Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`.
* @param {string|undefined} filter.bot - Filter events by the bot detection result, specifically:
* - events where any kind of bot was detected.
* - events where a good bot was detected.
* - events where a bad bot was detected.
* - events where no bot was detected.
*
* Allowed values: `all`, `good`, `bad`, `none`.
* @param {string|undefined} filter.ip_address - Filter events by IP address range. The range can be as specific as a
* single IP (/32 for IPv4 or /128 for IPv6).
* All ip_address filters must use CIDR notation, for example,
* 10.0.0.0/24, 192.168.0.1/32
* @param {string|undefined} filter.linked_id - Filter events by your custom identifier.
*
*
* You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to
* associate identification requests with your own identifier, for
* example, session ID, purchase ID, or transaction ID. You can then
* use this `linked_id` parameter to retrieve all events associated
* with your custom identifier.
* @param {number|undefined} filter.start - Filter events with a timestamp greater than the start time, in Unix time (milliseconds).
* @param {number|undefined} filter.end - Filter events with a timestamp smaller than the end time, in Unix time (milliseconds).
* @param {boolean|undefined} filter.reverse - Sort events in reverse timestamp order.
* @param {boolean|undefined} filter.suspect - Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent).
* */
async searchEvents(filter: SearchEventsFilter): Promise<SearchEventsResponse> {
const url = getRequestPath({
path: '/events/search',
region: this.region,
apiKey: this.getQueryApiKey(),
method: 'get',
queryParams: filter,
})
const headers = this.getHeaders()
const response = await this.fetch(url, {
method: 'GET',
headers,
})
const jsonResponse = await copyResponseJson(response)
if (response.status === 200) {
return jsonResponse as SearchEventsResponse
}
handleErrorResponse(jsonResponse, response)
}
/**
* Retrieves event history for the specific visitor using the given filter, returns a promise with visitor history response.

@@ -235,0 +296,0 @@ *

@@ -46,2 +46,5 @@ import { components, operations, paths } from './generatedApiTypes'

export type SearchEventsFilter = paths['/events/search']['get']['parameters']['query']
export type SearchEventsResponse = paths['/events/search']['get']['responses']['200']['content']['application/json']
/**

@@ -48,0 +51,0 @@ * More info: https://dev.fingerprintjs.com/docs/server-api#response

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc