/** * Entity Service - Unified interface for entity operations * * This service provides a single interface that works with both: * 1. Deployed applications (via direct HTTP) * 2. REPL sessions (via replService proxy to avoid CORS) * * The service automatically determines which endpoint to use based on context. */ interface EntityInstance { [key: string]: any; } declare class EntityService { private currentEndpoint; /** * Get authentication token for API calls */ private getAuthToken; /** * Verify REPL health via deployment service (background check) */ private verifyReplHealth; /** * Determine the appropriate endpoint based on context */ private determineEndpoint; /** * Extract context from URL pathname */ private extractContextFromUrl; /** * Make HTTP request to the current endpoint */ private makeRequest; /** * Fetch entity instances by URL path * Works with both deployed and REPL endpoints */ fetchEntityInstancesByUrl(urlPath: string, _fallbackEntityName?: string): Promise; /** * Fetch all instances of an entity */ fetchEntityInstances(entityName: string): Promise; /** * Fetch a single entity instance */ fetchEntityInstance(entityName: string, instanceId: string): Promise; /** * Create a new entity instance */ createEntityInstance(entityName: string, data: any): Promise; /** * Update an entity instance */ updateEntityInstance(entityName: string, instanceId: string, data: any): Promise; /** * Delete an entity instance */ deleteEntityInstance(entityName: string, instanceId: string): Promise; /** * Execute a custom query/command */ executeQuery(queryPath: string, data?: any): Promise; /** * Check if service is connected to an endpoint */ isConnected(): Promise; /** * Get current endpoint type */ getEndpointType(): 'deployed' | 'repl' | null; /** * Clear cached endpoint (force re-determination on next request) */ clearEndpoint(): void; /** * Check if using REPL endpoint */ isReplActive(): boolean; } declare const entityService: EntityService; export default entityService; //# sourceMappingURL=entityService.d.ts.map