/** * Element Query Services - Barrel exports * * This module provides a complete query system for element collections, * including pagination, filtering, sorting, and orchestration. * * SERVICES: * - PaginationService: Paginate any array with metadata * - FilterService: Filter elements by metadata criteria * - SortService: Sort elements by various fields * - ElementQueryService: Orchestrate all three services * * USAGE: * For most use cases, use createElementQueryService() factory: * * ```typescript * import { createElementQueryService } from './services/query/index.js'; * * const queryService = createElementQueryService(); * const result = queryService.query(items, { * filters: { status: 'active' }, * sort: { sortBy: 'modified', sortOrder: 'desc' }, * pagination: { page: 1, pageSize: 20 } * }); * ``` * * For custom DI or testing, use individual services: * * ```typescript * import { PaginationService, FilterService, SortService } from './services/query/index.js'; * * const mockFilter = new MockFilterService(); * const queryService = new ElementQueryService( * new PaginationService(), * mockFilter, * new SortService() * ); * ``` * * @module services/query */ export type { PaginationOptions, PaginationMetadata, PaginatedResult, FilterCriteria, AppliedFilters, SortOrder, SortableField, SortOptions, AppliedSorting, QueryOptions, QueryResult, IPaginationService, IFilterService, ISortService, IElementQueryService, } from './types.js'; export { hasFilterableMetadata, hasMetadataField, getMetadataField, extractSortValue } from './types.js'; export type { AggregationOptions } from './types.js'; export { PaginationService, createPaginationService, paginationService } from './PaginationService.js'; import { FilterService as FilterServiceClass } from './FilterService.js'; export { FilterService } from './FilterService.js'; /** * Factory function to create a new FilterService instance * * @template T - Element type extending IElement * @returns New FilterService instance */ export declare function createFilterService(): FilterServiceClass; import { SortService as SortServiceClass } from './SortService.js'; export { SortService } from './SortService.js'; /** * Factory function to create a new SortService instance * * @template T - Element type extending IElement * @returns New SortService instance */ export declare function createSortService(): SortServiceClass; export { ElementQueryService, createElementQueryService, elementQueryService, } from './ElementQueryService.js'; export { aggregateElements, validateAggregationOptions, getAllowedGroupByFields, } from './AggregationService.js'; export type { AggregationResult } from './AggregationService.js'; //# sourceMappingURL=index.d.ts.map