use-neo4j
Version:
<div style="text-align:center"> <h1>React Hooks For Neo4j</h1>
46 lines (45 loc) • 1.24 kB
TypeScript
export interface PropertySchema {
existence: boolean;
type: string;
array: boolean;
}
export interface LabelSchema {
label: string;
type: 'node';
labels: string[];
count: number;
relationships: RelationshipTypeSchema[];
properties: Record<string, PropertySchema>;
}
export interface RelationshipTypeSchema {
type: string;
count: number;
properties: Record<string, PropertySchema>;
direction?: 'in' | 'out';
}
export interface UseSchemaOutput {
loading: boolean;
error?: Error;
labels: LabelSchema[];
types: RelationshipTypeSchema[];
database?: string;
}
export declare function useSchema(specificDatabase?: string): UseSchemaOutput;
declare type DatabaseRole = 'leader' | 'follower' | 'read_replica' | 'standalone';
declare type DatabaseStatus = 'online' | 'offline' | 'initial';
interface Database {
name: string;
address: string;
role: DatabaseRole;
requestedStatus: DatabaseStatus;
currentStatus: DatabaseStatus;
error: string;
default: boolean;
}
interface UseDatabasesOutput {
loading: boolean;
error?: Error;
databases: Database[] | undefined;
}
export declare function useDatabases(): UseDatabasesOutput;
export {};