@vfarcic/dot-ai
Version:
AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance
41 lines • 1.31 kB
TypeScript
/**
* Resource Sync Handler
*
* Handles POST /api/v1/resources/sync requests from dot-ai-controller.
* Receives cluster resource data, generates embeddings, and stores in Qdrant.
*/
import { Logger } from '../core/error-handling';
import { RestApiResponse } from './rest-api';
/**
* Reset initialization state (for testing or recovery)
* Call this to force re-initialization on the next request
*/
export declare function resetResourcesCollectionState(): void;
/**
* Response data for successful sync operations
*/
export interface ResourceSyncResponseData {
upserted: number;
deleted: number;
}
/**
* Response data for partial failures
*/
export interface ResourceSyncFailureDetails {
upserted: number;
deleted: number;
failures: Array<{
id: string;
error: string;
}>;
}
/**
* Handle resource sync requests from the controller
*
* @param body - The request body containing upserts, deletes, and isResync flag
* @param logger - Logger instance for request tracking
* @param requestId - Unique request identifier for correlation
* @returns RestApiResponse with sync results
*/
export declare function handleResourceSync(body: unknown, logger: Logger, requestId: string): Promise<RestApiResponse>;
//# sourceMappingURL=resource-sync-handler.d.ts.map