import { type FarmIntegrationHandlerContext, type FarmIntegrationAPIOperation, type FarmIntegrationLogger, type FarmIntegrationRouteMethod } from "@farm.js/core/integrations"; export interface AuthRouteIntegrationConfig { type: string; instance: TInstance; log?: FarmIntegrationLogger; path: string; methods: FarmIntegrationRouteMethod[]; handler: (request: Request, context: FarmIntegrationHandlerContext, instance: TInstance) => Promise | Response; } export declare function createAuthRouteIntegration(config: AuthRouteIntegrationConfig): import("@farm.js/core").DefinedIntegration<{ category: "auth"; type: string; instance: TInstance; log: FarmIntegrationLogger | undefined; routes: { path: string; methods: FarmIntegrationRouteMethod[]; handler(request: Request, context: FarmIntegrationHandlerContext): Response | Promise; }[]; }, import("@farm.js/core").FarmIntegrationSchema | undefined>; export declare function methodNotAllowed(allow: readonly string[]): Response; export interface PathInferredClientOperation = FarmIntegrationAPIOperation, TLeafName extends string | undefined = undefined> { path: TPath; operation: TOperation; leafName?: TLeafName; } type ReplaceLeafSegment = TLeafName extends string ? TPath extends `${infer TBase}/${string}` ? `${TBase}/${TLeafName}` : TLeafName : TPath; type StripClientRoutePrefix = TPath extends `/api/${string}/${infer TRest}` ? TRest : TPath extends `/${string}/${infer TRest}` ? TRest : TPath extends `/${infer TRest}` ? TRest : TPath; type CamelCaseRouteSegment = TSegment extends `${infer THead}-${infer TTail}` ? `${THead}${Capitalize>}` : TSegment; type NormalizeClientRouteSegmentType = TSegment extends `[...${infer TName}]` ? TName : TSegment extends `[${infer TName}]` ? TName : TSegment extends `${infer TName}(${string}` ? TName : CamelCaseRouteSegment; type RouteNamespaceFromClientPath> = TPath extends `${infer THead}/${infer TTail}` ? { [TKey in NormalizeClientRouteSegmentType]: RouteNamespaceFromClientPath; } : { [TKey in NormalizeClientRouteSegmentType]: { [TMethod in Lowercase]: TOperation; }; }; type UnionToIntersection = (TUnion extends unknown ? (value: TUnion) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never; type ExpandRecursively = TValue extends (...args: any[]) => any ? TValue : TValue extends object ? { [TKey in keyof TValue]: ExpandRecursively; } : TValue; type PathEntryToAPI> = TEntry extends PathInferredClientOperation, infer TLeafName extends string | undefined> ? RouteNamespaceFromClientPath>, TOperation> : never; type PathEntriesToAPI[]> = ExpandRecursively>>; export type InferPathInferredClientAPI[]> = PathEntriesToAPI; export declare function createPathInferredClientApi[]>(...entries: TEntries): InferPathInferredClientAPI; export {}; //# sourceMappingURL=integration.d.ts.map