import type { Transport, BlockConfig, HealthCheckResponse } from '@23blocks/contracts'; import { type SearchService, type SearchHistoryService, type FavoritesService, type EntitiesService, type IdentitiesService, type JarvisSearchService } from './services/index.js'; /** * Configuration for the Search block */ export interface SearchBlockConfig extends BlockConfig { /** Default entity types to search (optional) */ defaultEntityTypes?: string[]; } /** * Search block interface */ export interface SearchBlock { /** * Core search operations */ search: SearchService; /** * Search history management */ history: SearchHistoryService; /** * Favorites/bookmarks management */ favorites: FavoritesService; /** * Entity management for indexing */ entities: EntitiesService; /** * Identity management for search users */ identities: IdentitiesService; /** * Jarvis AI-enhanced search */ jarvis: JarvisSearchService; /** Ping the service health endpoint */ health(): Promise; } /** * Create the Search block * * @example * ```typescript * import { createSearchBlock } from '@23blocks/block-search'; * import { createHttpTransport } from '@23blocks/transport-http'; * * const transport = createHttpTransport({ * baseUrl: 'https://api.example.com', * headers: () => ({ * 'Authorization': `Bearer ${getToken()}`, * 'x-api-key': 'your-api-key', * }), * }); * * const searchBlock = createSearchBlock(transport, { apiKey: 'your-api-key' }); * * // Execute a search * const { results, totalRecords } = await searchBlock.search.search({ * query: 'hello world', * entityTypes: ['Product', 'Article'], * limit: 20, * }); * * // Get suggestions * const suggestions = await searchBlock.search.suggest('hel'); * * // Get recent searches * const recent = await searchBlock.history.recent(10); * * // Add to favorites * await searchBlock.favorites.add({ * entityUniqueId: 'product-123', * entityType: 'Product', * entityAlias: 'My Favorite Product', * }); * ``` */ export declare function createSearchBlock(transport: Transport, config: SearchBlockConfig): SearchBlock; /** * Block metadata */ export declare const searchBlockMetadata: { name: string; version: string; description: string; resourceTypes: string[]; }; //# sourceMappingURL=search.block.d.ts.map