import type * as FunctionSpec from "@confect/core/FunctionSpec"; import type * as GroupSpec from "@confect/core/GroupSpec"; import type * as MiddlewareSpec from "@confect/core/MiddlewareSpec"; import * as Context from "effect/Context"; import * as Layer from "effect/Layer"; import type * as DatabaseSchema from "./DatabaseSchema"; import type * as Handler from "./Handler"; export interface FunctionImpl { readonly name: Name_; } export declare const FunctionImpl: ({ name }: { name: Name_; }) => Context.Service, FunctionImpl>; /** * Register a single function's implementation into the group's `Registry`. * * The function is registered under a flat, single-segment key (its own `name`), * not a project-wide dot-path. Each group's impl layer is built in * isolation—`RegisteredFunctions.buildForGroup` (and the CLI's `validateImpl`) * provide a fresh `Registry` per group—so function names only need to be unique * within their own group. * * `databaseSchema` is retained purely as a type-level carrier: the handler's * ctx-service requirements (`DatabaseReader`, `QueryCtx`, …) are * derived from it via `Handler.WithName`. It is not read at runtime—the * generated per-group registry forwards the schema value to the function * builders—so impls depend on `_generated/schema` (table schemas) rather than * `_generated/api` (which transitively imports every function spec). */ export declare const make: >>(_databaseSchema: DatabaseSchema_, group: Group, name: Name_, handler: Handler.WithName, Name_, MiddlewareSpec.Provides | FunctionSpec.MiddlewareSpecs, Name_>>>>) => Layer.Layer>; /** * Get the function implementation service type for a specific function name. */ export type ForFunction = FunctionImpl; /** * Get all function implementation services required for a group spec. */ export type FromGroupSpec = FunctionSpec.Name> extends infer FunctionNames extends string ? FunctionNames extends string ? FunctionImpl : never : never; //# sourceMappingURL=FunctionImpl.d.ts.map