@sphereon/ssi-sdk.anomaly-detection 0.33.0 → 0.33.1-feature.vcdm2.tsup.18
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 +8477 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +38 -0
- package/dist/index.d.ts +34 -4
- package/dist/index.js +8469 -25
- package/dist/index.js.map +1 -1
- package/package.json +23 -13
- package/src/agent/AnomalyDetection.ts +14 -16
- package/dist/agent/AnomalyDetection.d.ts +0 -21
- package/dist/agent/AnomalyDetection.d.ts.map +0 -1
- package/dist/agent/AnomalyDetection.js +0 -89
- package/dist/agent/AnomalyDetection.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/ssi-sdk.anomaly-detection.d.ts +0 -47
- package/dist/tsdoc-metadata.json +0 -11
- package/dist/types/IAnomalyDetection.d.ts +0 -13
- package/dist/types/IAnomalyDetection.d.ts.map +0 -1
- package/dist/types/IAnomalyDetection.js +0 -3
- package/dist/types/IAnomalyDetection.js.map +0 -1
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IAgentPlugin, IPluginMethodMap, IAgentContext } from '@veramo/core';
|
|
2
|
+
import { GeolocationStoreArgs, IGeolocationStore } from '@sphereon/ssi-sdk.geolocation-store';
|
|
3
|
+
|
|
4
|
+
type DnsLookupFn = (hostname: string) => Promise<string>;
|
|
5
|
+
declare const anomalyDetectionMethods: Array<string>;
|
|
6
|
+
/**
|
|
7
|
+
* {@inheritDoc IAnomalyDetection}
|
|
8
|
+
*/
|
|
9
|
+
declare class AnomalyDetection implements IAgentPlugin {
|
|
10
|
+
readonly schema: any;
|
|
11
|
+
private readonly db;
|
|
12
|
+
private readonly dnsLookup?;
|
|
13
|
+
readonly methods: IAnomalyDetection;
|
|
14
|
+
constructor(args: {
|
|
15
|
+
geoIpDB: Uint8Array;
|
|
16
|
+
dnsLookupCallback?: DnsLookupFn;
|
|
17
|
+
});
|
|
18
|
+
private anomalyDetectionLookupLocation;
|
|
19
|
+
private resolveDns;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface IAnomalyDetection extends IPluginMethodMap {
|
|
23
|
+
anomalyDetectionLookupLocation(args: AnomalyDetectionLookupLocationArgs, context: IRequiredContext): Promise<AnomalyDetectionLookupLocationResult>;
|
|
24
|
+
}
|
|
25
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
26
|
+
type AnomalyDetectionLookupLocationArgs = PartialBy<GeolocationStoreArgs, 'storeId' | 'namespace'>;
|
|
27
|
+
type AnomalyDetectionLookupLocationResult = {
|
|
28
|
+
continent?: string;
|
|
29
|
+
country?: string;
|
|
30
|
+
};
|
|
31
|
+
type IRequiredContext = IAgentContext<IGeolocationStore>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
declare const schema: any;
|
|
37
|
+
|
|
38
|
+
export { AnomalyDetection, type AnomalyDetectionLookupLocationArgs, type AnomalyDetectionLookupLocationResult, type IAnomalyDetection, type IRequiredContext, type PartialBy, anomalyDetectionMethods, schema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,38 @@
|
|
|
1
|
+
import { IAgentPlugin, IPluginMethodMap, IAgentContext } from '@veramo/core';
|
|
2
|
+
import { GeolocationStoreArgs, IGeolocationStore } from '@sphereon/ssi-sdk.geolocation-store';
|
|
3
|
+
|
|
4
|
+
type DnsLookupFn = (hostname: string) => Promise<string>;
|
|
5
|
+
declare const anomalyDetectionMethods: Array<string>;
|
|
6
|
+
/**
|
|
7
|
+
* {@inheritDoc IAnomalyDetection}
|
|
8
|
+
*/
|
|
9
|
+
declare class AnomalyDetection implements IAgentPlugin {
|
|
10
|
+
readonly schema: any;
|
|
11
|
+
private readonly db;
|
|
12
|
+
private readonly dnsLookup?;
|
|
13
|
+
readonly methods: IAnomalyDetection;
|
|
14
|
+
constructor(args: {
|
|
15
|
+
geoIpDB: Uint8Array;
|
|
16
|
+
dnsLookupCallback?: DnsLookupFn;
|
|
17
|
+
});
|
|
18
|
+
private anomalyDetectionLookupLocation;
|
|
19
|
+
private resolveDns;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface IAnomalyDetection extends IPluginMethodMap {
|
|
23
|
+
anomalyDetectionLookupLocation(args: AnomalyDetectionLookupLocationArgs, context: IRequiredContext): Promise<AnomalyDetectionLookupLocationResult>;
|
|
24
|
+
}
|
|
25
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
26
|
+
type AnomalyDetectionLookupLocationArgs = PartialBy<GeolocationStoreArgs, 'storeId' | 'namespace'>;
|
|
27
|
+
type AnomalyDetectionLookupLocationResult = {
|
|
28
|
+
continent?: string;
|
|
29
|
+
country?: string;
|
|
30
|
+
};
|
|
31
|
+
type IRequiredContext = IAgentContext<IGeolocationStore>;
|
|
32
|
+
|
|
1
33
|
/**
|
|
2
34
|
* @public
|
|
3
35
|
*/
|
|
4
36
|
declare const schema: any;
|
|
5
|
-
|
|
6
|
-
export { AnomalyDetection, anomalyDetectionMethods }
|
|
7
|
-
export * from './types/IAnomalyDetection';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
37
|
+
|
|
38
|
+
export { AnomalyDetection, type AnomalyDetectionLookupLocationArgs, type AnomalyDetectionLookupLocationResult, type IAnomalyDetection, type IRequiredContext, type PartialBy, anomalyDetectionMethods, schema };
|