+36
-10
@@ -55,6 +55,6 @@ // Type definitions for genosdb | ||
| $edge?: Query | ||
| /** Geo module: proximity search (requires `geo: true`). */ | ||
| $near?: { center: [number, number]; radius: number } | ||
| /** Geo module: proximity search, radius in km (requires `geo: true`). */ | ||
| $near?: { latitude: number; longitude: number; radius: number } | ||
| /** Geo module: bounding-box search (requires `geo: true`). */ | ||
| $bbox?: [number, number, number, number] | ||
| $bbox?: { minLat: number; maxLat: number; minLng: number; maxLng: number } | ||
| } | ||
@@ -176,4 +176,6 @@ | ||
| export interface ACLs { | ||
| set(nodeId: string, acl: any): Promise<any> | ||
| grant(nodeId: string, ethAddress: string, permissions?: any): Promise<any> | ||
| /** Create (value only) or update (value + id). `owner` and `collaborators` are engine-managed: they are stripped from the value and re-based on the stored node. */ | ||
| set(value: any, id?: string): Promise<string> | ||
| /** Owner-only. One level per address; granting again replaces the previous level. */ | ||
| grant(nodeId: string, ethAddress: string, permission: "read" | "write" | "delete"): Promise<any> | ||
| revoke(nodeId: string, ethAddress: string): Promise<any> | ||
@@ -183,2 +185,17 @@ delete(nodeId: string): Promise<any> | ||
| /** State pushed to `setSecurityStateChangeCallback` on every session change. */ | ||
| export interface SecurityState { | ||
| /** A local signer is active: writes can be signed. */ | ||
| isActive: boolean | ||
| activeAddress: string | null | ||
| /** Abbreviated address (`0x1234...abcd`) for display. */ | ||
| abbrAddr: string | ||
| /** The active session was opened via WebAuthn. */ | ||
| isWebAuthnProtected: boolean | ||
| /** A freshly generated identity is held in memory, not yet secured. */ | ||
| hasVolatileIdentity: boolean | ||
| /** This device has a WebAuthn registration to log in with. */ | ||
| hasWebAuthnHardwareRegistration: boolean | ||
| } | ||
| export interface SecurityManager { | ||
@@ -196,5 +213,3 @@ startNewUserRegistration(): Promise<any> | ||
| clearSecurity(): Promise<void> | ||
| setSecurityStateChangeCallback( | ||
| callback: (state: { isActive: boolean; activeAddress: string | null }) => void | ||
| ): void | ||
| setSecurityStateChangeCallback(callback: (state: SecurityState) => void): void | ||
| setGovernanceStateChangeCallback(callback: (state: any) => void): void | ||
@@ -215,2 +230,4 @@ assignRole(targetUserEthAddress: string, role: string, expiresAt?: number | string): Promise<any> | ||
| remove(id: string): Promise<void> | ||
| /** Abbreviate an address (`0x1234...abcd`) for display. */ | ||
| abbrAddr(address: string): string | ||
| encryptDataForCurrentUser(data: any): Promise<any> | ||
@@ -285,4 +302,13 @@ decryptDataForCurrentUser(encrypted: any): Promise<any> | ||
| clear(): Promise<void> | ||
| /** Middleware over incoming P2P operation batches. */ | ||
| use(middleware: (operations: any[]) => Promise<any[]> | any[]): void | ||
| /** | ||
| * Middleware over incoming P2P operation batches. Receives the batch and a | ||
| * Map of each node's previous state; return the (filtered) batch, or | ||
| * nothing to discard the whole message. | ||
| */ | ||
| use( | ||
| middleware: ( | ||
| operations: any[], | ||
| previousStates: Map<string, any> | ||
| ) => Promise<any[] | void> | any[] | void | ||
| ): void | ||
| /** P2P room (present when `rtc` is enabled). */ | ||
@@ -289,0 +315,0 @@ room?: Room |
+1
-1
| { | ||
| "name": "genosdb", | ||
| "version": "0.23.1", | ||
| "version": "0.23.2", | ||
| "description": "GenosDB (GDB): distributed graph database in real-time, peer-to-peer, scalable storage - efficient querying of complex relationships.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
2058227
0.06%6296
0.4%