@keverdjs/fraud-sdk-vue 1.0.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 +22 -0
- package/README.md +34 -0
- package/dist/index.d.mts +83 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +49 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Keverd
|
|
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.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @keverdjs/fraud-sdk-vue
|
|
2
|
+
|
|
3
|
+
Vue.js SDK for Keverd fraud detection and device fingerprinting.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @keverdjs/fraud-sdk-vue
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```vue
|
|
14
|
+
<script setup>
|
|
15
|
+
import { useKeverdVisitorData } from '@keverdjs/fraud-sdk-vue';
|
|
16
|
+
|
|
17
|
+
const { data, loading, error } = useKeverdVisitorData({
|
|
18
|
+
apiKey: 'your-api-key'
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div v-if="loading">Loading...</div>
|
|
24
|
+
<div v-else-if="error">Error: {{ error.message }}</div>
|
|
25
|
+
<div v-else>Risk Score: {{ data?.riskScore }}</div>
|
|
26
|
+
</template>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
See the main [Keverd Fraud SDK Web README](../../README.md) for detailed documentation.
|
|
32
|
+
|
|
33
|
+
> **Note**: This package is currently under development.
|
|
34
|
+
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Ref, App } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Core SDK - placeholder
|
|
5
|
+
* This will be implemented by copying from React SDK and adapting for Vue
|
|
6
|
+
*/
|
|
7
|
+
declare class KeverdSDK {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Types for Vue SDK
|
|
12
|
+
* TODO: Copy and adapt types from React SDK
|
|
13
|
+
*/
|
|
14
|
+
interface KeverdConfig {
|
|
15
|
+
apiKey: string;
|
|
16
|
+
endpoint?: string;
|
|
17
|
+
}
|
|
18
|
+
interface KeverdLoadOptions {
|
|
19
|
+
apiKey: string;
|
|
20
|
+
endpoint?: string;
|
|
21
|
+
}
|
|
22
|
+
interface KeverdVisitorData {
|
|
23
|
+
}
|
|
24
|
+
interface KeverdVisitorDataOptions {
|
|
25
|
+
}
|
|
26
|
+
interface KeverdVisitorDataResult {
|
|
27
|
+
}
|
|
28
|
+
interface KeverdFingerprintRequest {
|
|
29
|
+
}
|
|
30
|
+
interface KeverdFingerprintResponse {
|
|
31
|
+
}
|
|
32
|
+
interface KeverdDeviceInfo {
|
|
33
|
+
}
|
|
34
|
+
interface KeverdSessionInfo {
|
|
35
|
+
}
|
|
36
|
+
interface KeverdBehavioralData {
|
|
37
|
+
}
|
|
38
|
+
interface KeverdError {
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Vue composable for getting visitor data
|
|
43
|
+
* TODO: Implement Vue composable
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
declare function useKeverdVisitorData(options?: KeverdVisitorDataOptions): {
|
|
47
|
+
data: Ref<KeverdVisitorDataResult | null>;
|
|
48
|
+
loading: Ref<boolean>;
|
|
49
|
+
error: Ref<Error | null>;
|
|
50
|
+
getData: () => Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Vue composable for Keverd provider
|
|
55
|
+
* TODO: Implement Vue provider composable
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
declare function useKeverdProvider(options: KeverdLoadOptions): void;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Vue plugin for Keverd SDK
|
|
62
|
+
* TODO: Implement Vue plugin
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
declare const _default: {
|
|
66
|
+
install(app: App, options: KeverdLoadOptions): void;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Device collector - placeholder
|
|
71
|
+
* TODO: Copy from React SDK
|
|
72
|
+
*/
|
|
73
|
+
declare class KeverdDeviceCollector {
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Behavioral collector - placeholder
|
|
78
|
+
* TODO: Copy from React SDK
|
|
79
|
+
*/
|
|
80
|
+
declare class KeverdBehavioralCollector {
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { KeverdBehavioralCollector, type KeverdBehavioralData, type KeverdConfig, KeverdDeviceCollector, type KeverdDeviceInfo, type KeverdError, type KeverdFingerprintRequest, type KeverdFingerprintResponse, type KeverdLoadOptions, _default as KeverdPlugin, KeverdSDK, type KeverdSessionInfo, type KeverdVisitorData, type KeverdVisitorDataOptions, type KeverdVisitorDataResult, useKeverdProvider, useKeverdVisitorData };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Ref, App } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Core SDK - placeholder
|
|
5
|
+
* This will be implemented by copying from React SDK and adapting for Vue
|
|
6
|
+
*/
|
|
7
|
+
declare class KeverdSDK {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Types for Vue SDK
|
|
12
|
+
* TODO: Copy and adapt types from React SDK
|
|
13
|
+
*/
|
|
14
|
+
interface KeverdConfig {
|
|
15
|
+
apiKey: string;
|
|
16
|
+
endpoint?: string;
|
|
17
|
+
}
|
|
18
|
+
interface KeverdLoadOptions {
|
|
19
|
+
apiKey: string;
|
|
20
|
+
endpoint?: string;
|
|
21
|
+
}
|
|
22
|
+
interface KeverdVisitorData {
|
|
23
|
+
}
|
|
24
|
+
interface KeverdVisitorDataOptions {
|
|
25
|
+
}
|
|
26
|
+
interface KeverdVisitorDataResult {
|
|
27
|
+
}
|
|
28
|
+
interface KeverdFingerprintRequest {
|
|
29
|
+
}
|
|
30
|
+
interface KeverdFingerprintResponse {
|
|
31
|
+
}
|
|
32
|
+
interface KeverdDeviceInfo {
|
|
33
|
+
}
|
|
34
|
+
interface KeverdSessionInfo {
|
|
35
|
+
}
|
|
36
|
+
interface KeverdBehavioralData {
|
|
37
|
+
}
|
|
38
|
+
interface KeverdError {
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Vue composable for getting visitor data
|
|
43
|
+
* TODO: Implement Vue composable
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
declare function useKeverdVisitorData(options?: KeverdVisitorDataOptions): {
|
|
47
|
+
data: Ref<KeverdVisitorDataResult | null>;
|
|
48
|
+
loading: Ref<boolean>;
|
|
49
|
+
error: Ref<Error | null>;
|
|
50
|
+
getData: () => Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Vue composable for Keverd provider
|
|
55
|
+
* TODO: Implement Vue provider composable
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
declare function useKeverdProvider(options: KeverdLoadOptions): void;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Vue plugin for Keverd SDK
|
|
62
|
+
* TODO: Implement Vue plugin
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
declare const _default: {
|
|
66
|
+
install(app: App, options: KeverdLoadOptions): void;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Device collector - placeholder
|
|
71
|
+
* TODO: Copy from React SDK
|
|
72
|
+
*/
|
|
73
|
+
declare class KeverdDeviceCollector {
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Behavioral collector - placeholder
|
|
78
|
+
* TODO: Copy from React SDK
|
|
79
|
+
*/
|
|
80
|
+
declare class KeverdBehavioralCollector {
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { KeverdBehavioralCollector, type KeverdBehavioralData, type KeverdConfig, KeverdDeviceCollector, type KeverdDeviceInfo, type KeverdError, type KeverdFingerprintRequest, type KeverdFingerprintResponse, type KeverdLoadOptions, _default as KeverdPlugin, KeverdSDK, type KeverdSessionInfo, type KeverdVisitorData, type KeverdVisitorDataOptions, type KeverdVisitorDataResult, useKeverdProvider, useKeverdVisitorData };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
|
|
5
|
+
// src/core/keverd-sdk.ts
|
|
6
|
+
var KeverdSDK = class {
|
|
7
|
+
// TODO: Implement SDK logic
|
|
8
|
+
};
|
|
9
|
+
function useKeverdVisitorData(options) {
|
|
10
|
+
const data = vue.ref(null);
|
|
11
|
+
const loading = vue.ref(false);
|
|
12
|
+
const error = vue.ref(null);
|
|
13
|
+
const getData = async () => {
|
|
14
|
+
loading.value = true;
|
|
15
|
+
error.value = null;
|
|
16
|
+
try {
|
|
17
|
+
} catch (err) {
|
|
18
|
+
error.value = err instanceof Error ? err : new Error(String(err));
|
|
19
|
+
} finally {
|
|
20
|
+
loading.value = false;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
data,
|
|
25
|
+
loading,
|
|
26
|
+
error,
|
|
27
|
+
getData
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function useKeverdProvider(options) {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// src/plugin.ts
|
|
34
|
+
var plugin_default = {
|
|
35
|
+
install(app, options) {
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/collectors/keverd-device-collector.ts
|
|
40
|
+
var KeverdDeviceCollector = class {
|
|
41
|
+
// TODO: Implement device collector
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// src/collectors/keverd-behavioral-collector.ts
|
|
45
|
+
var KeverdBehavioralCollector = class {
|
|
46
|
+
// TODO: Implement behavioral collector
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.KeverdBehavioralCollector = KeverdBehavioralCollector;
|
|
50
|
+
exports.KeverdDeviceCollector = KeverdDeviceCollector;
|
|
51
|
+
exports.KeverdPlugin = plugin_default;
|
|
52
|
+
exports.KeverdSDK = KeverdSDK;
|
|
53
|
+
exports.useKeverdProvider = useKeverdProvider;
|
|
54
|
+
exports.useKeverdVisitorData = useKeverdVisitorData;
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/keverd-sdk.ts","../src/composables/useKeverdVisitorData.ts","../src/composables/useKeverdProvider.ts","../src/plugin.ts","../src/collectors/keverd-device-collector.ts","../src/collectors/keverd-behavioral-collector.ts"],"names":["ref"],"mappings":";;;;;AAMO,IAAM,YAAN,MAAgB;AAAA;AAEvB;ACAO,SAAS,qBAAqB,OAAA,EAKnC;AACA,EAAA,MAAM,IAAA,GAAOA,QAAoC,IAAI,CAAA;AACrD,EAAA,MAAM,OAAA,GAAUA,QAAI,KAAK,CAAA;AACzB,EAAA,MAAM,KAAA,GAAQA,QAAkB,IAAI,CAAA;AAEpC,EAAA,MAAM,UAAU,YAAY;AAC1B,IAAA,OAAA,CAAQ,KAAA,GAAQ,IAAA;AAChB,IAAA,KAAA,CAAM,KAAA,GAAQ,IAAA;AACd,IAAA,IAAI;AAAA,IAIJ,SAAS,GAAA,EAAK;AACZ,MAAA,KAAA,CAAM,KAAA,GAAQ,eAAe,KAAA,GAAQ,GAAA,GAAM,IAAI,KAAA,CAAM,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,IAClE,CAAA,SAAE;AACA,MAAA,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAAA,IAClB;AAAA,EACF,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA;AAAA,GACF;AACF;AC3BO,SAAS,kBAAkB,OAAA,EAA4B;AAK9D;;;ACRA,IAAO,cAAA,GAAQ;AAAA,EACb,OAAA,CAAQ,KAAU,OAAA,EAA4B;AAAA,EAI9C;AACF;;;ACTO,IAAM,wBAAN,MAA4B;AAAA;AAEnC;;;ACFO,IAAM,4BAAN,MAAgC;AAAA;AAEvC","file":"index.js","sourcesContent":["/**\n * Core SDK - placeholder\n * This will be implemented by copying from React SDK and adapting for Vue\n */\n\n// Placeholder export for build to succeed\nexport class KeverdSDK {\n // TODO: Implement SDK logic\n}\n\n","/**\n * Vue composable for getting visitor data\n * TODO: Implement Vue composable\n */\n\nimport { ref, type Ref } from 'vue';\nimport type { KeverdVisitorDataOptions, KeverdVisitorDataResult } from '../types';\n\nexport function useKeverdVisitorData(options?: KeverdVisitorDataOptions): {\n data: Ref<KeverdVisitorDataResult | null>;\n loading: Ref<boolean>;\n error: Ref<Error | null>;\n getData: () => Promise<void>;\n} {\n const data = ref<KeverdVisitorDataResult | null>(null);\n const loading = ref(false);\n const error = ref<Error | null>(null);\n\n const getData = async () => {\n loading.value = true;\n error.value = null;\n try {\n // TODO: Implement SDK call\n // const sdk = getKeverdSDK();\n // data.value = await sdk.getVisitorData(options);\n } catch (err) {\n error.value = err instanceof Error ? err : new Error(String(err));\n } finally {\n loading.value = false;\n }\n };\n\n return {\n data,\n loading,\n error,\n getData,\n };\n}\n\n","/**\n * Vue composable for Keverd provider\n * TODO: Implement Vue provider composable\n */\n\nimport { inject, provide, type InjectionKey } from 'vue';\nimport type { KeverdSDK } from '../core/keverd-sdk';\nimport type { KeverdLoadOptions } from '../types';\n\nconst KeverdSDKKey: InjectionKey<KeverdSDK> = Symbol('keverd-sdk');\n\nexport function useKeverdProvider(options: KeverdLoadOptions) {\n // TODO: Initialize SDK and provide it\n // const sdk = new KeverdSDK();\n // sdk.init(options);\n // provide(KeverdSDKKey, sdk);\n}\n\nexport function useKeverdContext(): KeverdSDK {\n const sdk = inject(KeverdSDKKey);\n if (!sdk) {\n throw new Error('useKeverdContext must be used within KeverdProvider');\n }\n return sdk;\n}\n\n","/**\n * Vue plugin for Keverd SDK\n * TODO: Implement Vue plugin\n */\n\nimport type { App } from 'vue';\nimport type { KeverdLoadOptions } from './types';\n\nexport default {\n install(app: App, options: KeverdLoadOptions) {\n // TODO: Install plugin globally\n // app.config.globalProperties.$keverd = new KeverdSDK();\n // app.provide('keverd-sdk', ...);\n },\n};\n\n","/**\n * Device collector - placeholder\n * TODO: Copy from React SDK\n */\n\nexport class KeverdDeviceCollector {\n // TODO: Implement device collector\n}\n\n","/**\n * Behavioral collector - placeholder\n * TODO: Copy from React SDK\n */\n\nexport class KeverdBehavioralCollector {\n // TODO: Implement behavioral collector\n}\n\n"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
// src/core/keverd-sdk.ts
|
|
4
|
+
var KeverdSDK = class {
|
|
5
|
+
// TODO: Implement SDK logic
|
|
6
|
+
};
|
|
7
|
+
function useKeverdVisitorData(options) {
|
|
8
|
+
const data = ref(null);
|
|
9
|
+
const loading = ref(false);
|
|
10
|
+
const error = ref(null);
|
|
11
|
+
const getData = async () => {
|
|
12
|
+
loading.value = true;
|
|
13
|
+
error.value = null;
|
|
14
|
+
try {
|
|
15
|
+
} catch (err) {
|
|
16
|
+
error.value = err instanceof Error ? err : new Error(String(err));
|
|
17
|
+
} finally {
|
|
18
|
+
loading.value = false;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
data,
|
|
23
|
+
loading,
|
|
24
|
+
error,
|
|
25
|
+
getData
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function useKeverdProvider(options) {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/plugin.ts
|
|
32
|
+
var plugin_default = {
|
|
33
|
+
install(app, options) {
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// src/collectors/keverd-device-collector.ts
|
|
38
|
+
var KeverdDeviceCollector = class {
|
|
39
|
+
// TODO: Implement device collector
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// src/collectors/keverd-behavioral-collector.ts
|
|
43
|
+
var KeverdBehavioralCollector = class {
|
|
44
|
+
// TODO: Implement behavioral collector
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { KeverdBehavioralCollector, KeverdDeviceCollector, plugin_default as KeverdPlugin, KeverdSDK, useKeverdProvider, useKeverdVisitorData };
|
|
48
|
+
//# sourceMappingURL=index.mjs.map
|
|
49
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/keverd-sdk.ts","../src/composables/useKeverdVisitorData.ts","../src/composables/useKeverdProvider.ts","../src/plugin.ts","../src/collectors/keverd-device-collector.ts","../src/collectors/keverd-behavioral-collector.ts"],"names":[],"mappings":";;;AAMO,IAAM,YAAN,MAAgB;AAAA;AAEvB;ACAO,SAAS,qBAAqB,OAAA,EAKnC;AACA,EAAA,MAAM,IAAA,GAAO,IAAoC,IAAI,CAAA;AACrD,EAAA,MAAM,OAAA,GAAU,IAAI,KAAK,CAAA;AACzB,EAAA,MAAM,KAAA,GAAQ,IAAkB,IAAI,CAAA;AAEpC,EAAA,MAAM,UAAU,YAAY;AAC1B,IAAA,OAAA,CAAQ,KAAA,GAAQ,IAAA;AAChB,IAAA,KAAA,CAAM,KAAA,GAAQ,IAAA;AACd,IAAA,IAAI;AAAA,IAIJ,SAAS,GAAA,EAAK;AACZ,MAAA,KAAA,CAAM,KAAA,GAAQ,eAAe,KAAA,GAAQ,GAAA,GAAM,IAAI,KAAA,CAAM,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,IAClE,CAAA,SAAE;AACA,MAAA,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAAA,IAClB;AAAA,EACF,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA;AAAA,GACF;AACF;AC3BO,SAAS,kBAAkB,OAAA,EAA4B;AAK9D;;;ACRA,IAAO,cAAA,GAAQ;AAAA,EACb,OAAA,CAAQ,KAAU,OAAA,EAA4B;AAAA,EAI9C;AACF;;;ACTO,IAAM,wBAAN,MAA4B;AAAA;AAEnC;;;ACFO,IAAM,4BAAN,MAAgC;AAAA;AAEvC","file":"index.mjs","sourcesContent":["/**\n * Core SDK - placeholder\n * This will be implemented by copying from React SDK and adapting for Vue\n */\n\n// Placeholder export for build to succeed\nexport class KeverdSDK {\n // TODO: Implement SDK logic\n}\n\n","/**\n * Vue composable for getting visitor data\n * TODO: Implement Vue composable\n */\n\nimport { ref, type Ref } from 'vue';\nimport type { KeverdVisitorDataOptions, KeverdVisitorDataResult } from '../types';\n\nexport function useKeverdVisitorData(options?: KeverdVisitorDataOptions): {\n data: Ref<KeverdVisitorDataResult | null>;\n loading: Ref<boolean>;\n error: Ref<Error | null>;\n getData: () => Promise<void>;\n} {\n const data = ref<KeverdVisitorDataResult | null>(null);\n const loading = ref(false);\n const error = ref<Error | null>(null);\n\n const getData = async () => {\n loading.value = true;\n error.value = null;\n try {\n // TODO: Implement SDK call\n // const sdk = getKeverdSDK();\n // data.value = await sdk.getVisitorData(options);\n } catch (err) {\n error.value = err instanceof Error ? err : new Error(String(err));\n } finally {\n loading.value = false;\n }\n };\n\n return {\n data,\n loading,\n error,\n getData,\n };\n}\n\n","/**\n * Vue composable for Keverd provider\n * TODO: Implement Vue provider composable\n */\n\nimport { inject, provide, type InjectionKey } from 'vue';\nimport type { KeverdSDK } from '../core/keverd-sdk';\nimport type { KeverdLoadOptions } from '../types';\n\nconst KeverdSDKKey: InjectionKey<KeverdSDK> = Symbol('keverd-sdk');\n\nexport function useKeverdProvider(options: KeverdLoadOptions) {\n // TODO: Initialize SDK and provide it\n // const sdk = new KeverdSDK();\n // sdk.init(options);\n // provide(KeverdSDKKey, sdk);\n}\n\nexport function useKeverdContext(): KeverdSDK {\n const sdk = inject(KeverdSDKKey);\n if (!sdk) {\n throw new Error('useKeverdContext must be used within KeverdProvider');\n }\n return sdk;\n}\n\n","/**\n * Vue plugin for Keverd SDK\n * TODO: Implement Vue plugin\n */\n\nimport type { App } from 'vue';\nimport type { KeverdLoadOptions } from './types';\n\nexport default {\n install(app: App, options: KeverdLoadOptions) {\n // TODO: Install plugin globally\n // app.config.globalProperties.$keverd = new KeverdSDK();\n // app.provide('keverd-sdk', ...);\n },\n};\n\n","/**\n * Device collector - placeholder\n * TODO: Copy from React SDK\n */\n\nexport class KeverdDeviceCollector {\n // TODO: Implement device collector\n}\n\n","/**\n * Behavioral collector - placeholder\n * TODO: Copy from React SDK\n */\n\nexport class KeverdBehavioralCollector {\n // TODO: Implement behavioral collector\n}\n\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@keverdjs/fraud-sdk-vue",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vue.js SDK for Keverd fraud detection and device fingerprinting",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsup",
|
|
15
|
+
"dev": "tsup --watch",
|
|
16
|
+
"lint": "eslint src/**/*.{ts,vue}",
|
|
17
|
+
"typecheck": "vue-tsc --noEmit",
|
|
18
|
+
"clean": "rm -rf dist",
|
|
19
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"keverd",
|
|
23
|
+
"fraud-detection",
|
|
24
|
+
"device-fingerprinting",
|
|
25
|
+
"behavioral-biometrics",
|
|
26
|
+
"vue",
|
|
27
|
+
"vue3",
|
|
28
|
+
"risk-assessment"
|
|
29
|
+
],
|
|
30
|
+
"author": "Keverd",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/keverd/keverd-fraud-sdk-web.git",
|
|
35
|
+
"directory": "packages/@keverd/fraud-sdk-vue"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"vue": ">=3.0.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
45
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
46
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
47
|
+
"eslint": "^8.45.0",
|
|
48
|
+
"tsup": "^8.0.0",
|
|
49
|
+
"typescript": "^5.1.6",
|
|
50
|
+
"vue": "^3.3.0",
|
|
51
|
+
"vue-tsc": "^1.8.0"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {}
|
|
54
|
+
}
|
|
55
|
+
|