import type { Transport, PageResult } from '@23blocks/contracts'; import type { SearchResult } from '../types/search.js'; /** * Jarvis search query */ export interface JarvisSearchQuery { prompt: string; partition?: string; key?: string; page?: number; records?: number; sort?: string; attributes?: string; language?: string; } /** * Jarvis search result with AI-enhanced metadata */ export interface JarvisSearchResult extends SearchResult { confidence?: number; relevanceScore?: number; semanticMatches?: string[]; suggestedActions?: string[]; } /** * Jarvis Search Service - AI-enhanced entity search */ export interface JarvisSearchService { /** * Search entities using Jarvis AI-enhanced search. * @param query - The search query including filters, sorting, pagination, and optional metadata/relation inclusion flags. * @returns A paginated result containing an array of {@link JarvisSearchResult} items (with AI-enhanced fields like confidence and relevanceScore) and pagination metadata. */ search(query: JarvisSearchQuery): Promise>; /** * Get semantic suggestions based on a query string. * @param query - The text to generate suggestions for. * @param limit - Optional maximum number of suggestions to return. * @returns An array of suggestion strings. * @note Returns an empty array if the backend response contains no suggestions. */ suggest(query: string, limit?: number): Promise; /** * Get related entities based on a source entity. * @param entityUniqueId - The unique identifier of the source entity to find relations for. * @param entityType - The type of the source entity. * @param limit - Optional maximum number of related entities to return. * @returns An array of {@link JarvisSearchResult} items related to the source entity. * @note The response data is mapped individually rather than decoded as a JSON:API collection. */ getRelated(entityUniqueId: string, entityType: string, limit?: number): Promise; } /** * Create the Jarvis Search service */ export declare function createJarvisSearchService(transport: Transport, _config: { apiKey: string; }): JarvisSearchService; //# sourceMappingURL=jarvis-search.service.d.ts.map