@fraud-intercept/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +104 -0
- package/dist/client.d.ts +15 -0
- package/dist/client.js +98 -0
- package/dist/errors.d.ts +11 -0
- package/dist/errors.js +26 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +13 -0
- package/dist/types.d.ts +106 -0
- package/dist/types.js +5 -0
- package/package.json +19 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fraud Intercept
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# @fraud-intercept/sdk
|
|
2
|
+
|
|
3
|
+
Typed Node.js client for the Fraud Intercept **Submit Event** API (`POST /api/v1/events`).
|
|
4
|
+
|
|
5
|
+
> **Note:** npm publish is not live yet. Install from this monorepo path or wait for the public registry release.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Node.js 18+ (uses global `fetch`)
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @fraud-intercept/sdk
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import FraudIntercept from '@fraud-intercept/sdk'
|
|
21
|
+
|
|
22
|
+
const client = new FraudIntercept({
|
|
23
|
+
apiKey: process.env.FRAUD_INTERCEPT_API_KEY!,
|
|
24
|
+
baseUrl: 'https://fraud-intercept.com',
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const result = await client.checkRegistration({
|
|
28
|
+
eventId: 'fingerprint-request-id-or-unique-id',
|
|
29
|
+
email: 'customer@example.com',
|
|
30
|
+
customerName: 'Jane Doe',
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
if (result.recommendation === 'block') {
|
|
34
|
+
// Deny the action
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Event types
|
|
39
|
+
|
|
40
|
+
Send the appropriate helper at each integration point:
|
|
41
|
+
|
|
42
|
+
| Helper | `eventType` |
|
|
43
|
+
|--------|-------------|
|
|
44
|
+
| `checkRegistration()` | `register` |
|
|
45
|
+
| `checkLogin()` | `login` |
|
|
46
|
+
| `checkDeposit()` | `deposit` |
|
|
47
|
+
| `checkWithdrawal()` | `withdrawal` |
|
|
48
|
+
|
|
49
|
+
Or use `submitEvent({ eventType, eventId, ... })` directly.
|
|
50
|
+
|
|
51
|
+
`EVENT_TYPES` in this package must stay in sync with `lib/utils/event-type.ts` in the main app.
|
|
52
|
+
|
|
53
|
+
## Configuration
|
|
54
|
+
|
|
55
|
+
| Option | Required | Default |
|
|
56
|
+
|--------|----------|---------|
|
|
57
|
+
| `apiKey` | Yes | — |
|
|
58
|
+
| `baseUrl` | No | `https://fraud-intercept.com` |
|
|
59
|
+
| `timeout` | No | `10000` (ms) |
|
|
60
|
+
| `retries` | No | `2` (network errors only) |
|
|
61
|
+
|
|
62
|
+
## Idempotency
|
|
63
|
+
|
|
64
|
+
Pass a stable key per logical operation to avoid duplicate events on retries:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
await client.submitEvent(
|
|
68
|
+
{ eventType: 'deposit', eventId: 'fp_abc', email: 'a@b.com' },
|
|
69
|
+
{ idempotencyKey: 'deposit-user-123-2026-06-03' },
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Response fields
|
|
74
|
+
|
|
75
|
+
The client returns the API `data` object, including:
|
|
76
|
+
|
|
77
|
+
- `recommendation` — `allow` | `review` | `block`
|
|
78
|
+
- `score`, `riskLevel`, `triggeredRules`, `flags`
|
|
79
|
+
- `matchedThreat` — Known Threat match (legacy alias: `matchedFraudster`)
|
|
80
|
+
- `device`, `multiAccount`, `coverage`, `notes`
|
|
81
|
+
|
|
82
|
+
## Errors
|
|
83
|
+
|
|
84
|
+
- `FraudInterceptError` — validation and API errors (`status`, `code`)
|
|
85
|
+
- `AuthenticationError` — invalid or missing API key (401)
|
|
86
|
+
- `RateLimitError` — rate limit exceeded (429)
|
|
87
|
+
|
|
88
|
+
Client-side validation runs before any HTTP call (missing `eventId`, invalid `eventType`, no identifiers).
|
|
89
|
+
|
|
90
|
+
## Development
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
cd packages/sdk
|
|
94
|
+
npm install
|
|
95
|
+
npm run build
|
|
96
|
+
npm test
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
From the repo root:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm run build:sdk
|
|
103
|
+
npm run test:sdk
|
|
104
|
+
```
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FraudInterceptConfig, CheckDepositRequest, CheckDepositResponse, CheckLoginRequest, CheckLoginResponse, CheckRegistrationRequest, CheckRegistrationResponse, CheckWithdrawalRequest, CheckWithdrawalResponse, SubmitEventOptions, SubmitEventRequest, SubmitEventResponse } from './types';
|
|
2
|
+
export declare class FraudIntercept {
|
|
3
|
+
private apiKey;
|
|
4
|
+
private baseUrl;
|
|
5
|
+
private timeout;
|
|
6
|
+
private retries;
|
|
7
|
+
constructor(config: FraudInterceptConfig);
|
|
8
|
+
submitEvent(request: SubmitEventRequest, options?: SubmitEventOptions): Promise<SubmitEventResponse>;
|
|
9
|
+
checkRegistration(request: CheckRegistrationRequest, options?: SubmitEventOptions): Promise<CheckRegistrationResponse>;
|
|
10
|
+
checkLogin(request: CheckLoginRequest, options?: SubmitEventOptions): Promise<CheckLoginResponse>;
|
|
11
|
+
checkDeposit(request: CheckDepositRequest, options?: SubmitEventOptions): Promise<CheckDepositResponse>;
|
|
12
|
+
checkWithdrawal(request: CheckWithdrawalRequest, options?: SubmitEventOptions): Promise<CheckWithdrawalResponse>;
|
|
13
|
+
private validateSubmitEvent;
|
|
14
|
+
private requestWithRetry;
|
|
15
|
+
}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FraudIntercept = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
const errors_1 = require("./errors");
|
|
6
|
+
const DEFAULT_BASE_URL = 'https://fraud-intercept.com';
|
|
7
|
+
const DEFAULT_TIMEOUT = 10000;
|
|
8
|
+
const DEFAULT_RETRIES = 2;
|
|
9
|
+
const EVENTS_ENDPOINT = '/api/v1/events';
|
|
10
|
+
class FraudIntercept {
|
|
11
|
+
constructor(config) {
|
|
12
|
+
if (!config.apiKey) {
|
|
13
|
+
throw new errors_1.AuthenticationError('apiKey is required');
|
|
14
|
+
}
|
|
15
|
+
this.apiKey = config.apiKey;
|
|
16
|
+
this.baseUrl = (config.baseUrl || DEFAULT_BASE_URL).replace(/\/$/, '');
|
|
17
|
+
this.timeout = config.timeout || DEFAULT_TIMEOUT;
|
|
18
|
+
this.retries = config.retries ?? DEFAULT_RETRIES;
|
|
19
|
+
}
|
|
20
|
+
async submitEvent(request, options) {
|
|
21
|
+
this.validateSubmitEvent(request);
|
|
22
|
+
return this.requestWithRetry(EVENTS_ENDPOINT, request, options?.idempotencyKey);
|
|
23
|
+
}
|
|
24
|
+
async checkRegistration(request, options) {
|
|
25
|
+
return this.submitEvent({ ...request, eventType: 'register' }, options);
|
|
26
|
+
}
|
|
27
|
+
async checkLogin(request, options) {
|
|
28
|
+
return this.submitEvent({ ...request, eventType: 'login' }, options);
|
|
29
|
+
}
|
|
30
|
+
async checkDeposit(request, options) {
|
|
31
|
+
return this.submitEvent({ ...request, eventType: 'deposit' }, options);
|
|
32
|
+
}
|
|
33
|
+
async checkWithdrawal(request, options) {
|
|
34
|
+
return this.submitEvent({ ...request, eventType: 'withdrawal' }, options);
|
|
35
|
+
}
|
|
36
|
+
validateSubmitEvent(request) {
|
|
37
|
+
if (!request.eventType || !types_1.EVENT_TYPES.includes(request.eventType)) {
|
|
38
|
+
throw new errors_1.FraudInterceptError(`eventType is required and must be one of: ${types_1.EVENT_TYPES.join(', ')}`, 400, 'VALIDATION_ERROR');
|
|
39
|
+
}
|
|
40
|
+
if (!request.eventId) {
|
|
41
|
+
throw new errors_1.FraudInterceptError('eventId is required', 400, 'VALIDATION_ERROR');
|
|
42
|
+
}
|
|
43
|
+
if (!request.email && !request.phone && !request.creditCardHash) {
|
|
44
|
+
throw new errors_1.FraudInterceptError('At least one identifier (email, phone, or creditCardHash) is required', 400, 'VALIDATION_ERROR');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async requestWithRetry(path, body, idempotencyKey, attempt = 0) {
|
|
48
|
+
try {
|
|
49
|
+
const controller = new AbortController();
|
|
50
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
51
|
+
const headers = {
|
|
52
|
+
'Content-Type': 'application/json',
|
|
53
|
+
'X-API-Key': this.apiKey,
|
|
54
|
+
};
|
|
55
|
+
if (idempotencyKey) {
|
|
56
|
+
headers['Idempotency-Key'] = idempotencyKey;
|
|
57
|
+
}
|
|
58
|
+
let response;
|
|
59
|
+
try {
|
|
60
|
+
response = await fetch(`${this.baseUrl}${path}`, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
headers,
|
|
63
|
+
body: JSON.stringify(body),
|
|
64
|
+
signal: controller.signal,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
clearTimeout(timeoutId);
|
|
69
|
+
}
|
|
70
|
+
if (!response.ok) {
|
|
71
|
+
const errorBody = await response.json().catch(() => ({ error: 'Unknown error' }));
|
|
72
|
+
const errorMessage = errorBody.error || errorBody.message;
|
|
73
|
+
if (response.status === 401) {
|
|
74
|
+
throw new errors_1.AuthenticationError(errorMessage);
|
|
75
|
+
}
|
|
76
|
+
if (response.status === 429) {
|
|
77
|
+
throw new errors_1.RateLimitError(errorMessage);
|
|
78
|
+
}
|
|
79
|
+
throw new errors_1.FraudInterceptError(errorMessage || `HTTP ${response.status}`, response.status);
|
|
80
|
+
}
|
|
81
|
+
const json = await response.json();
|
|
82
|
+
if (!json.data) {
|
|
83
|
+
throw new errors_1.FraudInterceptError('API response did not include a data object', 500, 'INVALID_RESPONSE');
|
|
84
|
+
}
|
|
85
|
+
return json.data;
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
if (attempt < this.retries &&
|
|
89
|
+
error instanceof TypeError) {
|
|
90
|
+
const delay = Math.pow(2, attempt) * 100;
|
|
91
|
+
await new Promise(resolve => setTimeout(resolve, delay));
|
|
92
|
+
return this.requestWithRetry(path, body, idempotencyKey, attempt + 1);
|
|
93
|
+
}
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.FraudIntercept = FraudIntercept;
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class FraudInterceptError extends Error {
|
|
2
|
+
status: number;
|
|
3
|
+
code: string;
|
|
4
|
+
constructor(message: string, status: number, code?: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class AuthenticationError extends FraudInterceptError {
|
|
7
|
+
constructor(message?: string);
|
|
8
|
+
}
|
|
9
|
+
export declare class RateLimitError extends FraudInterceptError {
|
|
10
|
+
constructor(message?: string);
|
|
11
|
+
}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RateLimitError = exports.AuthenticationError = exports.FraudInterceptError = void 0;
|
|
4
|
+
class FraudInterceptError extends Error {
|
|
5
|
+
constructor(message, status, code = 'UNKNOWN_ERROR') {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'FraudInterceptError';
|
|
8
|
+
this.status = status;
|
|
9
|
+
this.code = code;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.FraudInterceptError = FraudInterceptError;
|
|
13
|
+
class AuthenticationError extends FraudInterceptError {
|
|
14
|
+
constructor(message = 'Invalid or missing API key') {
|
|
15
|
+
super(message, 401, 'AUTHENTICATION_ERROR');
|
|
16
|
+
this.name = 'AuthenticationError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.AuthenticationError = AuthenticationError;
|
|
20
|
+
class RateLimitError extends FraudInterceptError {
|
|
21
|
+
constructor(message = 'Rate limit exceeded') {
|
|
22
|
+
super(message, 429, 'RATE_LIMIT_ERROR');
|
|
23
|
+
this.name = 'RateLimitError';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.RateLimitError = RateLimitError;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FraudIntercept } from './client';
|
|
2
|
+
export { FraudInterceptError, AuthenticationError, RateLimitError } from './errors';
|
|
3
|
+
export type { EventType, SubmitEventRequest, SubmitEventOptions, SubmitEventResponse, MultiAccountMetadata, EventHelperRequest, FraudInterceptConfig, CheckRegistrationRequest, CheckRegistrationResponse, CheckLoginRequest, CheckLoginResponse, CheckDepositRequest, CheckDepositResponse, CheckWithdrawalRequest, CheckWithdrawalResponse, Flag, TriggeredRule, MatchedThreat, MatchedFraudster, AthleteMatch, DeviceInfo, MultiAccountInfo, DetectionCoverage, ResponseNote, } from './types';
|
|
4
|
+
export { EVENT_TYPES } from './types';
|
|
5
|
+
export { FraudIntercept as default } from './client';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = exports.EVENT_TYPES = exports.RateLimitError = exports.AuthenticationError = exports.FraudInterceptError = exports.FraudIntercept = void 0;
|
|
4
|
+
var client_1 = require("./client");
|
|
5
|
+
Object.defineProperty(exports, "FraudIntercept", { enumerable: true, get: function () { return client_1.FraudIntercept; } });
|
|
6
|
+
var errors_1 = require("./errors");
|
|
7
|
+
Object.defineProperty(exports, "FraudInterceptError", { enumerable: true, get: function () { return errors_1.FraudInterceptError; } });
|
|
8
|
+
Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return errors_1.AuthenticationError; } });
|
|
9
|
+
Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return errors_1.RateLimitError; } });
|
|
10
|
+
var types_1 = require("./types");
|
|
11
|
+
Object.defineProperty(exports, "EVENT_TYPES", { enumerable: true, get: function () { return types_1.EVENT_TYPES; } });
|
|
12
|
+
var client_2 = require("./client");
|
|
13
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return client_2.FraudIntercept; } });
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export interface FraudInterceptConfig {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
timeout?: number;
|
|
5
|
+
retries?: number;
|
|
6
|
+
}
|
|
7
|
+
/** Keep in sync with lib/utils/event-type.ts in the main app. */
|
|
8
|
+
export declare const EVENT_TYPES: readonly ["register", "login", "deposit", "withdrawal"];
|
|
9
|
+
export type EventType = typeof EVENT_TYPES[number];
|
|
10
|
+
export type RiskLevel = 'low' | 'medium' | 'high' | (string & {});
|
|
11
|
+
export type Recommendation = 'allow' | 'review' | 'block' | (string & {});
|
|
12
|
+
export interface SubmitEventRequest {
|
|
13
|
+
eventType: EventType;
|
|
14
|
+
eventId: string;
|
|
15
|
+
email?: string;
|
|
16
|
+
phone?: string;
|
|
17
|
+
customerName?: string;
|
|
18
|
+
dateOfBirth?: string;
|
|
19
|
+
creditCardHash?: string;
|
|
20
|
+
userId?: string;
|
|
21
|
+
ipAddress?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SubmitEventOptions {
|
|
24
|
+
idempotencyKey?: string;
|
|
25
|
+
}
|
|
26
|
+
export type EventHelperRequest = Omit<SubmitEventRequest, 'eventType'>;
|
|
27
|
+
export type CheckRegistrationRequest = EventHelperRequest;
|
|
28
|
+
export type CheckLoginRequest = EventHelperRequest;
|
|
29
|
+
export type CheckDepositRequest = EventHelperRequest;
|
|
30
|
+
export type CheckWithdrawalRequest = EventHelperRequest;
|
|
31
|
+
export interface Flag {
|
|
32
|
+
rule: string;
|
|
33
|
+
points?: number;
|
|
34
|
+
detail: string;
|
|
35
|
+
}
|
|
36
|
+
export interface MultiAccountMetadata {
|
|
37
|
+
kind: 'same_brand_device_count' | 'same_brand_ip_count';
|
|
38
|
+
count: number;
|
|
39
|
+
threshold: number;
|
|
40
|
+
window_days: 30;
|
|
41
|
+
evidence_strength: 'hard' | 'soft';
|
|
42
|
+
}
|
|
43
|
+
export interface TriggeredRule {
|
|
44
|
+
ruleId: string;
|
|
45
|
+
name: string;
|
|
46
|
+
action: string;
|
|
47
|
+
condition?: string;
|
|
48
|
+
multi_account_metadata?: MultiAccountMetadata;
|
|
49
|
+
}
|
|
50
|
+
export interface MatchedThreat {
|
|
51
|
+
id: string;
|
|
52
|
+
riskLevel: string;
|
|
53
|
+
crossBrandCount: number;
|
|
54
|
+
}
|
|
55
|
+
/** @deprecated Use MatchedThreat */
|
|
56
|
+
export type MatchedFraudster = MatchedThreat;
|
|
57
|
+
export interface AthleteMatch {
|
|
58
|
+
athleteId: string;
|
|
59
|
+
athleteName: string;
|
|
60
|
+
confidence: 'high' | 'medium' | 'low';
|
|
61
|
+
matchType: string;
|
|
62
|
+
isActive: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface DeviceInfo {
|
|
65
|
+
visitorId: string | null;
|
|
66
|
+
suspectScore: number | null;
|
|
67
|
+
vpn: boolean | null;
|
|
68
|
+
bot: boolean | null;
|
|
69
|
+
incognito: boolean | null;
|
|
70
|
+
datacenterIp: boolean | null;
|
|
71
|
+
}
|
|
72
|
+
export interface MultiAccountInfo {
|
|
73
|
+
deviceCount: number;
|
|
74
|
+
ipCount: number;
|
|
75
|
+
}
|
|
76
|
+
export interface DetectionCoverage {
|
|
77
|
+
identity: boolean;
|
|
78
|
+
crossBrand: boolean;
|
|
79
|
+
deviceIntelligence: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface ResponseNote {
|
|
82
|
+
code: string;
|
|
83
|
+
text: string;
|
|
84
|
+
}
|
|
85
|
+
export interface SubmitEventResponse {
|
|
86
|
+
eventType: EventType;
|
|
87
|
+
score: number;
|
|
88
|
+
riskLevel: RiskLevel;
|
|
89
|
+
recommendation: Recommendation;
|
|
90
|
+
scoreRecommendation?: Recommendation;
|
|
91
|
+
triggeredRules: TriggeredRule[];
|
|
92
|
+
flags: Flag[];
|
|
93
|
+
matchedThreat: MatchedThreat | null;
|
|
94
|
+
matchedFraudster?: MatchedFraudster | null;
|
|
95
|
+
athleteMatch: AthleteMatch | null;
|
|
96
|
+
device: DeviceInfo;
|
|
97
|
+
multiAccount: MultiAccountInfo;
|
|
98
|
+
coverage: DetectionCoverage;
|
|
99
|
+
notes: ResponseNote[];
|
|
100
|
+
eventId: string;
|
|
101
|
+
responseTimeMs: number;
|
|
102
|
+
}
|
|
103
|
+
export type CheckRegistrationResponse = SubmitEventResponse;
|
|
104
|
+
export type CheckLoginResponse = SubmitEventResponse;
|
|
105
|
+
export type CheckDepositResponse = SubmitEventResponse;
|
|
106
|
+
export type CheckWithdrawalResponse = SubmitEventResponse;
|
package/dist/types.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fraud-intercept/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Fraud Intercept SDK for real-time Digital Trust event scoring",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": ["dist"],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"test": "vitest run",
|
|
11
|
+
"prepublishOnly": "npm run build"
|
|
12
|
+
},
|
|
13
|
+
"keywords": ["fraud", "digital-trust", "risk-scoring", "device-intelligence"],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"typescript": "^5.7.2",
|
|
17
|
+
"vitest": "^4.0.18"
|
|
18
|
+
}
|
|
19
|
+
}
|