UNPKG

edgevector

Version:

Official TypeScript/JavaScript SDK for EdgeVector - Edge-native multi-paradigm database with AI-first features

80 lines (75 loc) 1.99 kB
import { EdgeVector } from './index'; import React from 'react'; /** * EdgeVector React Hooks * React-specific utilities and hooks for EdgeVector */ interface UseEdgeVectorOptions { apiKey?: string; endpoint?: string; appName?: string; } /** * Hook for EdgeVector client instance */ declare function useEdgeVector(options?: UseEdgeVectorOptions): any; /** * Hook for collection operations */ declare function useCollection(collectionName: string, options?: UseEdgeVectorOptions): { data: any; loading: any; error: any; collection: any; refresh: any; insertOne: any; updateOne: any; deleteOne: any; }; /** * Hook for vector search operations */ declare function useVectorSearch(collectionName: string, options?: UseEdgeVectorOptions): { results: any; loading: any; error: any; search: any; searchByText: any; searchByVector: any; }; /** * Hook for real-time data subscriptions */ declare function useRealTime<T = any>(collectionName: string, filter?: Record<string, any>, options?: UseEdgeVectorOptions): { data: any; connected: any; error: any; }; /** * Hook for health monitoring */ declare function useHealth(options?: UseEdgeVectorOptions): { health: any; loading: any; error: any; refresh: any; }; /** * Hook for time series operations */ declare function useTimeSeries(collectionName: string, options?: UseEdgeVectorOptions): { data: any; loading: any; error: any; write: any; query: any; detectAnomalies: any; }; interface EdgeVectorProviderProps { client: EdgeVector; children: React.ReactNode; } declare function EdgeVectorProvider({ client, children }: EdgeVectorProviderProps): any; declare function useEdgeVectorContext(): any; export { EdgeVectorProvider, useCollection, useEdgeVector, useEdgeVectorContext, useHealth, useRealTime, useTimeSeries, useVectorSearch }; export type { EdgeVectorProviderProps, UseEdgeVectorOptions };