import { AnySchema, ContractRouter, HTTPPath, AnyContractRouter } from '@orpc/contract'; export { PopulateContractRouterPathsOptions, PopulatedContractRouterPaths, populateContractRouterPaths } from '@orpc/contract'; import { CreateProcedureClientOptions, Router, Context, BuilderConfig, Implementer } from '@orpc/server'; export { ImplementedProcedure, Implementer, ImplementerInternal, ImplementerInternalWithMiddlewares, ORPCError, ProcedureImplementer, RouterImplementer, RouterImplementerWithMiddlewares, onError, onFinish, onStart, onSuccess } from '@orpc/server'; import { DynamicModule, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common'; import { StandardOpenAPIJsonSerializerOptions, StandardBracketNotationSerializerOptions } from '@orpc/openapi-client/standard'; import { StandardOpenAPICodecOptions } from '@orpc/openapi/standard'; import { StandardHandlerOptions } from '@orpc/server/standard'; import { Interceptor, Promisable } from '@orpc/shared'; import { StandardResponse } from '@orpc/standard-server'; import { SendStandardResponseOptions } from '@orpc/standard-server-node'; import { Observable } from 'rxjs'; declare const ORPC_MODULE_CONFIG_SYMBOL: unique symbol; /** * You can extend this interface to add global context properties. * @example * ```ts * declare module '@orpc/nest' { * interface ORPCGlobalContext { * user: { id: string; name: string } * } * } * ``` */ interface ORPCGlobalContext { } interface ORPCModuleConfig extends CreateProcedureClientOptions, SendStandardResponseOptions, StandardOpenAPIJsonSerializerOptions, StandardBracketNotationSerializerOptions, StandardOpenAPICodecOptions { plugins?: StandardHandlerOptions['plugins']; sendResponseInterceptors?: Interceptor<{ request: any; response: any; standardResponse: StandardResponse; }, unknown>[]; } declare class ORPCModule { static forRoot(config: ORPCModuleConfig): DynamicModule; static forRootAsync(options: { imports?: any[]; useFactory: (...args: any[]) => Promise | ORPCModuleConfig; inject?: any[]; }): DynamicModule; } /** * Decorator in controller handler to implement a oRPC contract. * * @see {@link https://orpc.dev/docs/openapi/integrations/implement-contract-in-nest#implement-your-contract NestJS Implement Contract Docs} */ declare function Implement>(contract: T): >>(target: Record, propertyKey: string, descriptor: TypedPropertyDescriptor<(...args: any[]) => U>) => void; declare class ImplementInterceptor implements NestInterceptor { private readonly config; private readonly codec; constructor(config: ORPCModuleConfig | undefined); intercept(ctx: ExecutionContext, next: CallHandler): Observable; } declare function toNestPattern(path: HTTPPath): string; /** * Alias for `implement` from `@orpc/server` with default context set to `ORPCGlobalContext` */ declare function implement(contract: T, config?: BuilderConfig): Implementer; export { Implement as Impl, Implement, ImplementInterceptor, ORPCModule, ORPC_MODULE_CONFIG_SYMBOL, implement, toNestPattern }; export type { ORPCGlobalContext, ORPCModuleConfig };