import type { JsonApiResource } from './types.js'; /** * Included resources map for efficient relationship resolution */ export type IncludedMap = Map; /** * Resource mapper interface * Each block provides mappers for its resource types */ export interface ResourceMapper { /** JSON:API resource type this mapper handles */ type: string; /** * Map a JSON:API resource to a domain object * @param resource - The JSON:API resource to map * @param included - Map of included resources for relationship resolution */ map(resource: JsonApiResource, included: IncludedMap): T; } /** * Create a key for the included map */ export declare function resourceKey(type: string, id: string): string; /** * Build an included map from an array of resources */ export declare function buildIncludedMap(included?: JsonApiResource[]): IncludedMap; /** * Get a resource from the included map */ export declare function getIncluded(included: IncludedMap, type: string, id: string): JsonApiResource | undefined; /** * Resolve a relationship from included resources */ export declare function resolveRelationship(resource: JsonApiResource, relationshipName: string, included: IncludedMap, mapper: ResourceMapper): T | null; /** * Resolve a has-many relationship from included resources */ export declare function resolveRelationshipMany(resource: JsonApiResource, relationshipName: string, included: IncludedMap, mapper: ResourceMapper): T[]; //# sourceMappingURL=mapper.d.ts.map