/** Shared endpoint normalization and identity hashing for server policy metadata. */ import { type OperationContractSource } from '@modern-js/server-runtime-extensions/bff-policy/node'; export type EffectEndpointMeta = { apiId: string; groupName: string; endpointName: string; method: string; routePath: string; }; export type HttpApiLike = { identifier?: unknown; }; type HttpApiGroupLike = { identifier?: unknown; }; type HttpApiEndpointLike = { identifier?: unknown; method?: unknown; path?: unknown; }; export type HttpApiReflect = (api: unknown, handlers: { /** Group metadata is unused by contract collection; kept as a no-op. */ onGroup?: () => void; onEndpoint: (input: { group: HttpApiGroupLike; endpoint: HttpApiEndpointLike; }) => void; }) => void; export declare function ensureLeadingSlash(pathname: string): string; export declare function normalizeEffectPrefix(prefix: string): string; export declare function collectEffectEndpoints(reflect: HttpApiReflect, api: HttpApiLike, prefix: string): EffectEndpointMeta[]; /** * Maps reflected endpoints onto operation-contract sources for * `buildOperationContractMap`/`resolveCrossProjectPolicy`. Effect endpoints * carry no zod metadata, so the contract hash covers the endpoint identity. */ export declare function toOperationContractSources(endpoints: EffectEndpointMeta[]): OperationContractSource[]; /** * Extracts the HttpApi instance from a loaded effect entry module. Mirrors * the shared entry-shape policy accepted by `resolveEffectBffModuleHandler`, * without executing factories during contract extraction. */ export declare function extractHttpApiFromModule(mod: unknown, isHttpApi: (value: unknown) => boolean): Promise; /** * Per-endpoint contract hash; MUST stay in sync with the server-side * contract map (it is the same bff-core hash over the same inputs). */ export declare function createEffectEndpointContractHash(endpoint: EffectEndpointMeta, requestId: string): string; export {};