import type { Model, ModelProperty, Program, Type } from "@typespec/compiler"; import { type AggregationDirective, type FilterableKind } from "./decorators.js"; import { type ResolvedJoinDependency } from "./joins.js"; import { getProjectionSourceModel, isSearchProjectionModel } from "./projection-source.js"; export { getProjectionSourceModel, isSearchProjectionModel }; export interface ResolvedProjectionField { name: string; projectedName?: string; type: Type; optional: boolean; sourceProperty: ModelProperty; projectionProperty?: ModelProperty; searchable: boolean; keyword: boolean; nested: boolean; sortable: boolean; analyzer?: string; boost?: number; ignoreAbove?: number; aggregations?: AggregationDirective[]; filterables?: FilterableKind[]; subProjection?: ResolvedProjection; } export interface ResolvedProjection { projectionModel: Model; sourceModel: Model; /** * Set only when the model carries `@indexName`. Absent means the projection * is nested-only — no backing OpenSearch index exists for it (issue #157). */ indexName?: string; indexSettings?: Record; fields: ResolvedProjectionField[]; /** * Cross-domain joins declared with `@dependsOn` (issue #194) that survived * validation. Each one also contributes its bound field to `fields`, so the * document type, mapping, SDL, filters and aggregations carry it. */ joins?: ResolvedJoinDependency[]; } /** * A projection backed by a real OpenSearch index, and therefore eligible for * top-level emission: Query field, resolver, mapping, manifest entry. */ export type TopLevelProjection = ResolvedProjection & { indexName: string; }; export declare function resolveProjectionModel(program: Program, projectionModel: Model): ResolvedProjection | undefined; declare function resolveProjectionField(program: Program, sourceProperty: ModelProperty, projectionProperty?: ModelProperty, inferOnModel?: boolean): ResolvedProjectionField; export declare const __test: { getProjectionSourceModel: typeof getProjectionSourceModel; isSearchProjectionModel: typeof isSearchProjectionModel; resolveProjectionField: typeof resolveProjectionField; }; //# sourceMappingURL=projection.d.ts.map