@fingerprintjs/fingerprintjs-pro-server-api
Advanced tools
Comparing version 6.0.0-test.0 to 6.0.0
{ | ||
"name": "@fingerprintjs/fingerprintjs-pro-server-api", | ||
"version": "6.0.0-test.0", | ||
"version": "6.0.0", | ||
"description": "Node.js wrapper for FingerprintJS Sever API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
import { createDecipheriv } from 'crypto' | ||
import { inflateRaw } from 'zlib' | ||
import { promisify } from 'util' | ||
import { EventResponse } from './types' | ||
import { EventsGetResponse } from './types' | ||
import { UnsealAggregateError, UnsealError } from './errors/unsealError' | ||
@@ -21,3 +21,3 @@ import { Buffer } from 'buffer' | ||
function isEventResponse(data: unknown): data is EventResponse { | ||
function isEventResponse(data: unknown): data is EventsGetResponse { | ||
return Boolean(data && typeof data === 'object' && 'products' in data) | ||
@@ -29,3 +29,3 @@ } | ||
* */ | ||
export function parseEventsResponse(unsealed: string): EventResponse { | ||
export function parseEventsResponse(unsealed: string): EventsGetResponse { | ||
const json = JSON.parse(unsealed) | ||
@@ -48,3 +48,3 @@ | ||
decryptionKeys: DecryptionKey[] | ||
): Promise<EventResponse> { | ||
): Promise<EventsGetResponse> { | ||
const unsealed = await unseal(sealedData, decryptionKeys) | ||
@@ -51,0 +51,0 @@ |
import { getRequestPath } from './urlUtils' | ||
import { | ||
AuthenticationMode, | ||
EventResponse, | ||
EventsGetResponse, | ||
EventsUpdateRequest, | ||
@@ -49,3 +49,3 @@ FingerprintApi, | ||
* | ||
* @returns {Promise<EventResponse>} - promise with event response. For more information, see the [Server API documentation](https://dev.fingerprint.com/reference/getevent). | ||
* @returns {Promise<EventsGetResponse>} - promise with event response. For more information, see the [Server API documentation](https://dev.fingerprint.com/reference/getevent). | ||
* | ||
@@ -66,3 +66,3 @@ * @example | ||
* */ | ||
public async getEvent(requestId: string): Promise<EventResponse> { | ||
public async getEvent(requestId: string): Promise<EventsGetResponse> { | ||
if (!requestId) { | ||
@@ -90,3 +90,3 @@ throw new TypeError('requestId is not set') | ||
if (response.status === 200) { | ||
return jsonResponse as EventResponse | ||
return jsonResponse as EventsGetResponse | ||
} | ||
@@ -93,0 +93,0 @@ |
@@ -51,3 +51,3 @@ import { components, operations, paths } from './generatedApiTypes' | ||
export type EventResponse = paths['/events/{request_id}']['get']['responses']['200']['content']['application/json'] | ||
export type EventsGetResponse = paths['/events/{request_id}']['get']['responses']['200']['content']['application/json'] | ||
@@ -54,0 +54,0 @@ export type RelatedVisitorsResponse = |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
250200
1