import { Config, Effect, Layer, Schema } from "effect"; import { ConfigureInterruptibilityMiddleware, DevModeMiddleware, LoggerMiddleware, RequestCacheMiddleware } from "effect-app/middleware"; import { RpcContextMap, type RpcMiddleware } from "effect-app/rpc"; import * as Context from "effect/Context"; 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwaS9yb3V0aW5nL21pZGRsZXdhcmUvbWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQVMsTUFBTSxFQUFFLE1BQU0sRUFBR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