@keverdjs/fraud-sdk-angular 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 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,52 @@
1
+ # @keverdjs/fraud-sdk-angular
2
+
3
+ Angular SDK for Keverd fraud detection and device fingerprinting.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @keverdjs/fraud-sdk-angular
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```typescript
14
+ import { KeverdService } from '@keverdjs/fraud-sdk-angular';
15
+
16
+ @Component({
17
+ selector: 'app-root',
18
+ template: `
19
+ <div *ngIf="loading">Loading...</div>
20
+ <div *ngIf="error">Error: {{ error.message }}</div>
21
+ <div *ngIf="data">Risk Score: {{ data.riskScore }}</div>
22
+ `
23
+ })
24
+ export class AppComponent {
25
+ data: any;
26
+ loading = false;
27
+ error: any;
28
+
29
+ constructor(private keverd: KeverdService) {
30
+ this.keverd.init({ apiKey: 'your-api-key' });
31
+ this.loadData();
32
+ }
33
+
34
+ async loadData() {
35
+ this.loading = true;
36
+ try {
37
+ this.data = await this.keverd.getVisitorData();
38
+ } catch (err) {
39
+ this.error = err;
40
+ } finally {
41
+ this.loading = false;
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ ## Usage
48
+
49
+ See the main [Keverd Fraud SDK Web README](../../README.md) for detailed documentation.
50
+
51
+ > **Note**: This package is currently under development.
52
+
@@ -0,0 +1,60 @@
1
+ import { Observable } from 'rxjs';
2
+
3
+ /**
4
+ * Types for Angular SDK
5
+ * TODO: Copy and adapt types from React SDK
6
+ */
7
+ interface KeverdConfig {
8
+ apiKey: string;
9
+ endpoint?: string;
10
+ }
11
+ interface KeverdLoadOptions {
12
+ apiKey: string;
13
+ endpoint?: string;
14
+ }
15
+ interface KeverdVisitorData {
16
+ }
17
+ interface KeverdVisitorDataOptions {
18
+ }
19
+ interface KeverdVisitorDataResult {
20
+ }
21
+ interface KeverdFingerprintRequest {
22
+ }
23
+ interface KeverdFingerprintResponse {
24
+ }
25
+ interface KeverdDeviceInfo {
26
+ }
27
+ interface KeverdSessionInfo {
28
+ }
29
+ interface KeverdBehavioralData {
30
+ }
31
+ interface KeverdError {
32
+ }
33
+
34
+ /**
35
+ * Angular service for Keverd SDK
36
+ * TODO: Implement Angular service
37
+ */
38
+
39
+ declare class KeverdService {
40
+ private config;
41
+ init(config: KeverdConfig): void;
42
+ getVisitorData(options?: KeverdVisitorDataOptions): Observable<KeverdVisitorData>;
43
+ }
44
+
45
+ /**
46
+ * Angular module for Keverd SDK
47
+ * TODO: Implement Angular module
48
+ */
49
+
50
+ declare class KeverdModule {
51
+ static forRoot(config: any): {
52
+ ngModule: typeof KeverdModule;
53
+ providers: (typeof KeverdService | {
54
+ provide: string;
55
+ useValue: any;
56
+ })[];
57
+ };
58
+ }
59
+
60
+ export { type KeverdBehavioralData, type KeverdConfig, type KeverdDeviceInfo, type KeverdError, type KeverdFingerprintRequest, type KeverdFingerprintResponse, type KeverdLoadOptions, KeverdModule, KeverdService, type KeverdSessionInfo, type KeverdVisitorData, type KeverdVisitorDataOptions, type KeverdVisitorDataResult };
@@ -0,0 +1,60 @@
1
+ import { Observable } from 'rxjs';
2
+
3
+ /**
4
+ * Types for Angular SDK
5
+ * TODO: Copy and adapt types from React SDK
6
+ */
7
+ interface KeverdConfig {
8
+ apiKey: string;
9
+ endpoint?: string;
10
+ }
11
+ interface KeverdLoadOptions {
12
+ apiKey: string;
13
+ endpoint?: string;
14
+ }
15
+ interface KeverdVisitorData {
16
+ }
17
+ interface KeverdVisitorDataOptions {
18
+ }
19
+ interface KeverdVisitorDataResult {
20
+ }
21
+ interface KeverdFingerprintRequest {
22
+ }
23
+ interface KeverdFingerprintResponse {
24
+ }
25
+ interface KeverdDeviceInfo {
26
+ }
27
+ interface KeverdSessionInfo {
28
+ }
29
+ interface KeverdBehavioralData {
30
+ }
31
+ interface KeverdError {
32
+ }
33
+
34
+ /**
35
+ * Angular service for Keverd SDK
36
+ * TODO: Implement Angular service
37
+ */
38
+
39
+ declare class KeverdService {
40
+ private config;
41
+ init(config: KeverdConfig): void;
42
+ getVisitorData(options?: KeverdVisitorDataOptions): Observable<KeverdVisitorData>;
43
+ }
44
+
45
+ /**
46
+ * Angular module for Keverd SDK
47
+ * TODO: Implement Angular module
48
+ */
49
+
50
+ declare class KeverdModule {
51
+ static forRoot(config: any): {
52
+ ngModule: typeof KeverdModule;
53
+ providers: (typeof KeverdService | {
54
+ provide: string;
55
+ useValue: any;
56
+ })[];
57
+ };
58
+ }
59
+
60
+ export { type KeverdBehavioralData, type KeverdConfig, type KeverdDeviceInfo, type KeverdError, type KeverdFingerprintRequest, type KeverdFingerprintResponse, type KeverdLoadOptions, KeverdModule, KeverdService, type KeverdSessionInfo, type KeverdVisitorData, type KeverdVisitorDataOptions, type KeverdVisitorDataResult };
package/dist/index.js ADDED
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ var core = require('@angular/core');
4
+ var rxjs = require('rxjs');
5
+ var common = require('@angular/common');
6
+
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (decorator(result)) || result;
13
+ return result;
14
+ };
15
+ exports.KeverdService = class KeverdService {
16
+ constructor() {
17
+ this.config = null;
18
+ }
19
+ init(config) {
20
+ this.config = config;
21
+ }
22
+ getVisitorData(options) {
23
+ return rxjs.from(Promise.resolve({}));
24
+ }
25
+ };
26
+ exports.KeverdService = __decorateClass([
27
+ core.Injectable({
28
+ providedIn: "root"
29
+ })
30
+ ], exports.KeverdService);
31
+ exports.KeverdModule = class KeverdModule {
32
+ static forRoot(config) {
33
+ return {
34
+ ngModule: exports.KeverdModule,
35
+ providers: [
36
+ { provide: "KEVERD_CONFIG", useValue: config },
37
+ exports.KeverdService
38
+ ]
39
+ };
40
+ }
41
+ };
42
+ exports.KeverdModule = __decorateClass([
43
+ core.NgModule({
44
+ imports: [common.CommonModule],
45
+ providers: [exports.KeverdService]
46
+ })
47
+ ], exports.KeverdModule);
48
+ //# sourceMappingURL=index.js.map
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/services/keverd.service.ts","../src/keverd.module.ts"],"names":["KeverdService","from","Injectable","KeverdModule","NgModule","CommonModule"],"mappings":";;;;;;;;;;;;;;AAYaA,wBAAN,mBAAA,CAAoB;AAAA,EAApB,WAAA,GAAA;AACL,IAAA,IAAA,CAAQ,MAAA,GAA8B,IAAA;AAAA,EAAA;AAAA,EAEtC,KAAK,MAAA,EAA4B;AAC/B,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAEhB;AAAA,EAEA,eAAe,OAAA,EAAmE;AAEhF,IAAA,OAAOC,SAAA,CAAK,OAAA,CAAQ,OAAA,CAAQ,EAAuB,CAAC,CAAA;AAAA,EACtD;AACF;AAZaD,qBAAA,GAAN,eAAA,CAAA;AAAA,EAHNE,eAAA,CAAW;AAAA,IACV,UAAA,EAAY;AAAA,GACb;AAAA,CAAA,EACYF,qBAAA,CAAA;ACCAG,uBAAN,kBAAA,CAAmB;AAAA,EACxB,OAAO,QAAQ,MAAA,EAAa;AAC1B,IAAA,OAAO;AAAA,MACL,QAAA,EAAUA,oBAAA;AAAA,MACV,SAAA,EAAW;AAAA,QACT,EAAE,OAAA,EAAS,eAAA,EAAiB,QAAA,EAAU,MAAA,EAAO;AAAA,QAC7CH;AAAA;AACF,KACF;AAAA,EACF;AACF;AAVaG,oBAAA,GAAN,eAAA,CAAA;AAAA,EAJNC,aAAA,CAAS;AAAA,IACR,OAAA,EAAS,CAACC,mBAAY,CAAA;AAAA,IACtB,SAAA,EAAW,CAACL,qBAAa;AAAA,GAC1B;AAAA,CAAA,EACYG,oBAAA,CAAA","file":"index.js","sourcesContent":["/**\n * Angular service for Keverd SDK\n * TODO: Implement Angular service\n */\n\nimport { Injectable } from '@angular/core';\nimport { Observable, from } from 'rxjs';\nimport type { KeverdConfig, KeverdVisitorData, KeverdVisitorDataOptions } from '../types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class KeverdService {\n private config: KeverdConfig | null = null;\n\n init(config: KeverdConfig): void {\n this.config = config;\n // TODO: Initialize SDK\n }\n\n getVisitorData(options?: KeverdVisitorDataOptions): Observable<KeverdVisitorData> {\n // TODO: Implement SDK call\n return from(Promise.resolve({} as KeverdVisitorData));\n }\n}\n\n","/**\n * Angular module for Keverd SDK\n * TODO: Implement Angular module\n */\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { KeverdService } from './services/keverd.service';\n\n@NgModule({\n imports: [CommonModule],\n providers: [KeverdService],\n})\nexport class KeverdModule {\n static forRoot(config: any) {\n return {\n ngModule: KeverdModule,\n providers: [\n { provide: 'KEVERD_CONFIG', useValue: config },\n KeverdService,\n ],\n };\n }\n}\n\n"]}
package/dist/index.mjs ADDED
@@ -0,0 +1,49 @@
1
+ import { Injectable, NgModule } from '@angular/core';
2
+ import { from } from 'rxjs';
3
+ import { CommonModule } from '@angular/common';
4
+
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __decorateClass = (decorators, target, key, kind) => {
7
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
8
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
9
+ if (decorator = decorators[i])
10
+ result = (decorator(result)) || result;
11
+ return result;
12
+ };
13
+ var KeverdService = class {
14
+ constructor() {
15
+ this.config = null;
16
+ }
17
+ init(config) {
18
+ this.config = config;
19
+ }
20
+ getVisitorData(options) {
21
+ return from(Promise.resolve({}));
22
+ }
23
+ };
24
+ KeverdService = __decorateClass([
25
+ Injectable({
26
+ providedIn: "root"
27
+ })
28
+ ], KeverdService);
29
+ var KeverdModule = class {
30
+ static forRoot(config) {
31
+ return {
32
+ ngModule: KeverdModule,
33
+ providers: [
34
+ { provide: "KEVERD_CONFIG", useValue: config },
35
+ KeverdService
36
+ ]
37
+ };
38
+ }
39
+ };
40
+ KeverdModule = __decorateClass([
41
+ NgModule({
42
+ imports: [CommonModule],
43
+ providers: [KeverdService]
44
+ })
45
+ ], KeverdModule);
46
+
47
+ export { KeverdModule, KeverdService };
48
+ //# sourceMappingURL=index.mjs.map
49
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/services/keverd.service.ts","../src/keverd.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAYO,IAAM,gBAAN,MAAoB;AAAA,EAApB,WAAA,GAAA;AACL,IAAA,IAAA,CAAQ,MAAA,GAA8B,IAAA;AAAA,EAAA;AAAA,EAEtC,KAAK,MAAA,EAA4B;AAC/B,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAEhB;AAAA,EAEA,eAAe,OAAA,EAAmE;AAEhF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,OAAA,CAAQ,EAAuB,CAAC,CAAA;AAAA,EACtD;AACF;AAZa,aAAA,GAAN,eAAA,CAAA;AAAA,EAHN,UAAA,CAAW;AAAA,IACV,UAAA,EAAY;AAAA,GACb;AAAA,CAAA,EACY,aAAA,CAAA;ACCN,IAAM,eAAN,MAAmB;AAAA,EACxB,OAAO,QAAQ,MAAA,EAAa;AAC1B,IAAA,OAAO;AAAA,MACL,QAAA,EAAU,YAAA;AAAA,MACV,SAAA,EAAW;AAAA,QACT,EAAE,OAAA,EAAS,eAAA,EAAiB,QAAA,EAAU,MAAA,EAAO;AAAA,QAC7C;AAAA;AACF,KACF;AAAA,EACF;AACF;AAVa,YAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAA,CAAS;AAAA,IACR,OAAA,EAAS,CAAC,YAAY,CAAA;AAAA,IACtB,SAAA,EAAW,CAAC,aAAa;AAAA,GAC1B;AAAA,CAAA,EACY,YAAA,CAAA","file":"index.mjs","sourcesContent":["/**\n * Angular service for Keverd SDK\n * TODO: Implement Angular service\n */\n\nimport { Injectable } from '@angular/core';\nimport { Observable, from } from 'rxjs';\nimport type { KeverdConfig, KeverdVisitorData, KeverdVisitorDataOptions } from '../types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class KeverdService {\n private config: KeverdConfig | null = null;\n\n init(config: KeverdConfig): void {\n this.config = config;\n // TODO: Initialize SDK\n }\n\n getVisitorData(options?: KeverdVisitorDataOptions): Observable<KeverdVisitorData> {\n // TODO: Implement SDK call\n return from(Promise.resolve({} as KeverdVisitorData));\n }\n}\n\n","/**\n * Angular module for Keverd SDK\n * TODO: Implement Angular module\n */\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { KeverdService } from './services/keverd.service';\n\n@NgModule({\n imports: [CommonModule],\n providers: [KeverdService],\n})\nexport class KeverdModule {\n static forRoot(config: any) {\n return {\n ngModule: KeverdModule,\n providers: [\n { provide: 'KEVERD_CONFIG', useValue: config },\n KeverdService,\n ],\n };\n }\n}\n\n"]}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@keverdjs/fraud-sdk-angular",
3
+ "version": "1.0.0",
4
+ "description": "Angular 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",
17
+ "typecheck": "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
+ "angular",
27
+ "risk-assessment"
28
+ ],
29
+ "author": "Keverd",
30
+ "license": "MIT",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/keverd/keverd-fraud-sdk-web.git",
34
+ "directory": "packages/@keverd/fraud-sdk-angular"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "peerDependencies": {
40
+ "@angular/core": ">=15.0.0",
41
+ "@angular/common": ">=15.0.0",
42
+ "rxjs": ">=7.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@angular/core": "^17.0.0",
46
+ "@angular/common": "^17.0.0",
47
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
48
+ "@typescript-eslint/parser": "^6.0.0",
49
+ "eslint": "^8.45.0",
50
+ "rxjs": "^7.8.0",
51
+ "tsup": "^8.0.0",
52
+ "typescript": "^5.1.6"
53
+ },
54
+ "dependencies": {}
55
+ }
56
+