@dwield/device-biometrics-sdk 1.1.0 → 1.2.1
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/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +3 -3
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +3 -3
- package/package.json +1 -1
- package/types/index.d.ts +107 -0
package/types/index.d.ts
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// index.d.ts
|
|
2
|
+
|
|
3
|
+
export const version: string;
|
|
4
|
+
|
|
5
|
+
/*─────────────────────────────────────────────
|
|
6
|
+
Shared Types
|
|
7
|
+
──────────────────────────────────────────────*/
|
|
8
|
+
|
|
9
|
+
export interface DeviceInfo {
|
|
10
|
+
[key: string]: any; // your device_id module returns dynamic fields
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface KeystrokeDynamicsData {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface MouseDynamicsData {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface BehaviourMetrics {
|
|
22
|
+
keystroke: KeystrokeDynamicsData;
|
|
23
|
+
mouse: MouseDynamicsData;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CombinedFingerprint {
|
|
27
|
+
behavioural: BehaviourMetrics;
|
|
28
|
+
device: DeviceInfo;
|
|
29
|
+
timestamp: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface SDKConfig {
|
|
33
|
+
apiKey: string;
|
|
34
|
+
verbose?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/*─────────────────────────────────────────────
|
|
38
|
+
DEVICE INFO ONLY SDK
|
|
39
|
+
──────────────────────────────────────────────*/
|
|
40
|
+
|
|
41
|
+
export interface DeviceInfoSDK {
|
|
42
|
+
product: "device_id";
|
|
43
|
+
version: string;
|
|
44
|
+
apiKey: string;
|
|
45
|
+
|
|
46
|
+
getDeviceData(): Promise<DeviceInfo>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function initDeviceInfo(config: SDKConfig): DeviceInfoSDK;
|
|
50
|
+
|
|
51
|
+
/*─────────────────────────────────────────────
|
|
52
|
+
BIOMETRICS ONLY SDK
|
|
53
|
+
──────────────────────────────────────────────*/
|
|
54
|
+
|
|
55
|
+
export interface BiometricsSDK {
|
|
56
|
+
product: "biometrics";
|
|
57
|
+
version: string;
|
|
58
|
+
apiKey: string;
|
|
59
|
+
|
|
60
|
+
initKeyStrokeDynamics(): void;
|
|
61
|
+
stopKeyStrokeDynamics(): void;
|
|
62
|
+
|
|
63
|
+
initMouseDynamics(): void;
|
|
64
|
+
stopMouseDynamics(): void;
|
|
65
|
+
|
|
66
|
+
fetchKeyStrockDynamicsData(): KeystrokeDynamicsData;
|
|
67
|
+
fetchMouseDynamicsData(): MouseDynamicsData;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function initBiometrics(config: SDKConfig): BiometricsSDK;
|
|
71
|
+
|
|
72
|
+
/*─────────────────────────────────────────────
|
|
73
|
+
DEVICE INFO + BIOMETRICS SDK
|
|
74
|
+
──────────────────────────────────────────────*/
|
|
75
|
+
|
|
76
|
+
export interface DeviceInfoWithBiometricsSDK {
|
|
77
|
+
product: "device_id_with_biometrics";
|
|
78
|
+
version: string;
|
|
79
|
+
apiKey: string;
|
|
80
|
+
|
|
81
|
+
// Behavioural
|
|
82
|
+
initKeyStrokeDynamics(): void;
|
|
83
|
+
stopKeyStrokeDynamics(): void;
|
|
84
|
+
|
|
85
|
+
initMouseDynamics(): void;
|
|
86
|
+
stopMouseDynamics(): void;
|
|
87
|
+
|
|
88
|
+
fetchKeyStrockDynamicsData(): KeystrokeDynamicsData;
|
|
89
|
+
fetchMouseDynamicsData(): MouseDynamicsData;
|
|
90
|
+
|
|
91
|
+
// Device
|
|
92
|
+
getDeviceData(): Promise<DeviceInfo>;
|
|
93
|
+
|
|
94
|
+
// Combined
|
|
95
|
+
getDeviceInfoWithBiometrics(): Promise<CombinedFingerprint>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function initDeviceInfoWithBiometrics(
|
|
99
|
+
config: SDKConfig
|
|
100
|
+
): DeviceInfoWithBiometricsSDK;
|
|
101
|
+
|
|
102
|
+
/*─────────────────────────────────────────────
|
|
103
|
+
Raw module exports (optional, for advanced use)
|
|
104
|
+
──────────────────────────────────────────────*/
|
|
105
|
+
|
|
106
|
+
export * as BehaviouralBiometrics from "./dist-types/behavioural_biometrics";
|
|
107
|
+
export * as DeviceId from "./dist-types/device_id";
|