import { ConfigureInterruptibilityMiddleware, DevModeMiddleware, LoggerMiddleware, RequestCacheMiddleware } from "effect-app/middleware"; import { RpcContextMap, type RpcMiddleware } from "effect-app/rpc"; import * as Config from "effect/Config"; import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as Schema from "effect/Schema"; import { type Rpc } from "effect/unstable/rpc"; import { WithNsTransaction } from "../../../Store/SQL.js"; export declare const DevModeLive: Layer.Layer; export declare const RequestCacheMiddlewareLive: Layer.Layer; export declare const RequestType: Context.Reference<"command" | "query">; export declare const ConfigureInterruptibilityMiddlewareLive: Layer.Layer; export declare const LoggerMiddlewareLive: Layer.Layer; export declare const DevModeMiddlewareLive: Layer.Layer; export declare const DefaultGenericMiddlewaresLive: Layer.Layer; /** * Config entry for `RequestContextMap` that controls per-RPC transaction wrapping. * Defaults to `false` (no transaction). Set `requiresTransaction: true` on a route to enable. * * @example * ```ts * class RequestContextMap extends RpcContextMap.makeMap({ * requiresTransaction: requiresTransactionConfig, * // ... * }) {} * ``` */ export declare const requiresTransactionConfig: RpcContextMap.RpcContextMap.Custom; /** * Creates the middleware Effect for SQL transaction wrapping. * Requires `WithNsTransaction` service. * Reads `requiresTransaction` from the RPC config; defaults to `false`. * * @example * ```ts * const SqlTransactionMiddlewareLive = Layer.effect( * SqlTransactionMiddleware, * makeSqlTransactionMiddleware(RequestContextMap) * ) * ``` */ export declare const makeSqlTransactionMiddleware: (rcm: { getConfig: (rpc: Rpc.AnyWithProps) => { readonly requiresTransaction?: boolean; }; }) => Effect.Effect, never, WithNsTransaction>; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwaS9yb3V0aW5nL21pZGRsZXdhcmUvbWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQS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