@temporary-name/server 1.9.3-alpha.a4e1987475e417f5730b8308ee8130974a74d8a1 → 1.9.3-alpha.cf2fe368e72e6a6ab0ce041b812dbf8134f70b0b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { MaybeOptionalOptions } from '@temporary-name/shared';
2
2
  import { SendStandardResponseOptions, APIGatewayProxyEventV2, ResponseStream } from '@temporary-name/standard-server-aws-lambda';
3
- import { C as Context, R as Router } from '../../shared/server.BKSOrA6h.mjs';
4
- import { b as StandardHandlerOptions } from '../../shared/server.C1fnTLq0.mjs';
5
- import { F as FriendlyStandardHandleOptions } from '../../shared/server.BeuTpcmO.mjs';
3
+ import { C as Context, R as Router } from '../../shared/server.Bzrdopnd.mjs';
4
+ import { b as StandardHandlerOptions } from '../../shared/server.C-j2WKJz.mjs';
5
+ import { F as FriendlyStandardHandleOptions } from '../../shared/server.Cp__uvkw.mjs';
6
6
  import '@temporary-name/contract';
7
7
  import '@temporary-name/standard-server';
8
8
 
@@ -1,8 +1,8 @@
1
1
  import { MaybeOptionalOptions } from '@temporary-name/shared';
2
2
  import { SendStandardResponseOptions, APIGatewayProxyEventV2, ResponseStream } from '@temporary-name/standard-server-aws-lambda';
3
- import { C as Context, R as Router } from '../../shared/server.BKSOrA6h.js';
4
- import { b as StandardHandlerOptions } from '../../shared/server.CQyYNJ1H.js';
5
- import { F as FriendlyStandardHandleOptions } from '../../shared/server.SLLuK6_v.js';
3
+ import { C as Context, R as Router } from '../../shared/server.Bzrdopnd.js';
4
+ import { b as StandardHandlerOptions } from '../../shared/server.B9i6p26R.js';
5
+ import { F as FriendlyStandardHandleOptions } from '../../shared/server.CYRDznXq.js';
6
6
  import '@temporary-name/contract';
7
7
  import '@temporary-name/standard-server';
8
8
 
@@ -1,14 +1,12 @@
1
1
  import { resolveMaybeOptionalOptions } from '@temporary-name/shared';
2
2
  import { toStandardLazyRequest, sendStandardResponse } from '@temporary-name/standard-server-aws-lambda';
3
- import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DLsti1Pv.mjs';
3
+ import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.CvI-wPHM.mjs';
4
4
  import '@temporary-name/contract';
5
5
  import '@temporary-name/standard-server';
6
6
  import '@temporary-name/server';
7
7
  import 'rou3';
8
- import '../../shared/server.BKh8I1Ny.mjs';
9
- import 'node:async_hooks';
10
- import 'zod';
11
- import 'zod/v4/core';
8
+ import '../../shared/server.NLSomL7m.mjs';
9
+ import '@temporary-name/zod';
12
10
  import '../../shared/server.BEHw7Eyx.mjs';
13
11
 
14
12
  class AwsLambdaHandler {
@@ -1,8 +1,8 @@
1
- import { C as Context, R as Router } from '../../shared/server.BKSOrA6h.mjs';
1
+ import { C as Context, R as Router } from '../../shared/server.Bzrdopnd.mjs';
2
2
  import { Interceptor, MaybeOptionalOptions } from '@temporary-name/shared';
3
3
  import { ToFetchResponseOptions } from '@temporary-name/standard-server-fetch';
4
- import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.C1fnTLq0.mjs';
5
- import { F as FriendlyStandardHandleOptions } from '../../shared/server.BeuTpcmO.mjs';
4
+ import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.C-j2WKJz.mjs';
5
+ import { F as FriendlyStandardHandleOptions } from '../../shared/server.Cp__uvkw.mjs';
6
6
  import '@temporary-name/contract';
7
7
  import '@temporary-name/standard-server';
8
8
 
@@ -1,8 +1,8 @@
1
- import { C as Context, R as Router } from '../../shared/server.BKSOrA6h.js';
1
+ import { C as Context, R as Router } from '../../shared/server.Bzrdopnd.js';
2
2
  import { Interceptor, MaybeOptionalOptions } from '@temporary-name/shared';
3
3
  import { ToFetchResponseOptions } from '@temporary-name/standard-server-fetch';
4
- import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.CQyYNJ1H.js';
5
- import { F as FriendlyStandardHandleOptions } from '../../shared/server.SLLuK6_v.js';
4
+ import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.B9i6p26R.js';
5
+ import { F as FriendlyStandardHandleOptions } from '../../shared/server.CYRDznXq.js';
6
6
  import '@temporary-name/contract';
7
7
  import '@temporary-name/standard-server';
8
8
 
@@ -1,15 +1,13 @@
1
1
  import { ORPCError, toArray, intercept, resolveMaybeOptionalOptions } from '@temporary-name/shared';
2
2
  import { toStandardLazyRequest, toFetchResponse } from '@temporary-name/standard-server-fetch';
3
- import { C as CompositeStandardHandlerPlugin, S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DLsti1Pv.mjs';
3
+ import { C as CompositeStandardHandlerPlugin, S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.CvI-wPHM.mjs';
4
4
  import '@temporary-name/contract';
5
5
  import '@temporary-name/standard-server';
6
6
  import '@temporary-name/server';
7
7
  import 'rou3';
8
- import '../../shared/server.BKh8I1Ny.mjs';
8
+ import '@temporary-name/zod';
9
+ import '../../shared/server.NLSomL7m.mjs';
9
10
  import '../../shared/server.BEHw7Eyx.mjs';
10
- import 'node:async_hooks';
11
- import 'zod';
12
- import 'zod/v4/core';
13
11
 
14
12
  class BodyLimitPlugin {
15
13
  maxBodySize;
@@ -1,8 +1,8 @@
1
- import { C as Context, R as Router } from '../../shared/server.BKSOrA6h.mjs';
1
+ import { C as Context, R as Router } from '../../shared/server.Bzrdopnd.mjs';
2
2
  import { Interceptor, MaybeOptionalOptions } from '@temporary-name/shared';
3
3
  import { SendStandardResponseOptions, NodeHttpRequest, NodeHttpResponse } from '@temporary-name/standard-server-node';
4
- import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.C1fnTLq0.mjs';
5
- import { F as FriendlyStandardHandleOptions } from '../../shared/server.BeuTpcmO.mjs';
4
+ import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.C-j2WKJz.mjs';
5
+ import { F as FriendlyStandardHandleOptions } from '../../shared/server.Cp__uvkw.mjs';
6
6
  import compression from '@temporary-name/interop/compression';
7
7
  import '@temporary-name/contract';
8
8
  import '@temporary-name/standard-server';
@@ -1,8 +1,8 @@
1
- import { C as Context, R as Router } from '../../shared/server.BKSOrA6h.js';
1
+ import { C as Context, R as Router } from '../../shared/server.Bzrdopnd.js';
2
2
  import { Interceptor, MaybeOptionalOptions } from '@temporary-name/shared';
3
3
  import { SendStandardResponseOptions, NodeHttpRequest, NodeHttpResponse } from '@temporary-name/standard-server-node';
4
- import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.CQyYNJ1H.js';
5
- import { F as FriendlyStandardHandleOptions } from '../../shared/server.SLLuK6_v.js';
4
+ import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.B9i6p26R.js';
5
+ import { F as FriendlyStandardHandleOptions } from '../../shared/server.CYRDznXq.js';
6
6
  import compression from '@temporary-name/interop/compression';
7
7
  import '@temporary-name/contract';
8
8
  import '@temporary-name/standard-server';
@@ -1,16 +1,14 @@
1
1
  import { once, ORPCError, toArray, intercept, resolveMaybeOptionalOptions } from '@temporary-name/shared';
2
2
  import compression from '@temporary-name/interop/compression';
3
3
  import { toStandardLazyRequest, sendStandardResponse } from '@temporary-name/standard-server-node';
4
- import { C as CompositeStandardHandlerPlugin, S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DLsti1Pv.mjs';
4
+ import { C as CompositeStandardHandlerPlugin, S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.CvI-wPHM.mjs';
5
5
  import '@temporary-name/contract';
6
6
  import '@temporary-name/standard-server';
7
7
  import '@temporary-name/server';
8
8
  import 'rou3';
9
- import '../../shared/server.BKh8I1Ny.mjs';
9
+ import '@temporary-name/zod';
10
+ import '../../shared/server.NLSomL7m.mjs';
10
11
  import '../../shared/server.BEHw7Eyx.mjs';
11
- import 'node:async_hooks';
12
- import 'zod';
13
- import 'zod/v4/core';
14
12
 
15
13
  class BodyLimitPlugin {
16
14
  maxBodySize;
@@ -1,10 +1,10 @@
1
- export { C as CompositeStandardHandlerPlugin, c as StandardHandleOptions, d as StandardHandleResult, e as StandardHandler, S as StandardHandlerInterceptorOptions, b as StandardHandlerOptions, a as StandardHandlerPlugin } from '../../shared/server.C1fnTLq0.mjs';
1
+ export { C as CompositeStandardHandlerPlugin, c as StandardHandleOptions, d as StandardHandleResult, e as StandardHandler, S as StandardHandlerInterceptorOptions, b as StandardHandlerOptions, a as StandardHandlerPlugin } from '../../shared/server.C-j2WKJz.mjs';
2
2
  import { AnyProcedure, AnyRouter } from '@temporary-name/server';
3
3
  import { StandardCodec as StandardCodec$1, StandardParams as StandardParams$1, StandardMatcher as StandardMatcher$1, StandardMatchResult as StandardMatchResult$1 } from '@temporary-name/server/standard';
4
4
  import { ORPCError, HTTPPath } from '@temporary-name/shared';
5
5
  import { StandardLazyRequest, StandardResponse } from '@temporary-name/standard-server';
6
- import { h as AnyProcedure$1, f as AnyRouter$1 } from '../../shared/server.BKSOrA6h.mjs';
7
- export { F as FriendlyStandardHandleOptions, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.BeuTpcmO.mjs';
6
+ import { h as AnyProcedure$1, f as AnyRouter$1 } from '../../shared/server.Bzrdopnd.mjs';
7
+ export { F as FriendlyStandardHandleOptions, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.Cp__uvkw.mjs';
8
8
  import '@temporary-name/contract';
9
9
 
10
10
  declare class StandardOpenAPICodec implements StandardCodec$1 {
@@ -1,10 +1,10 @@
1
- export { C as CompositeStandardHandlerPlugin, c as StandardHandleOptions, d as StandardHandleResult, e as StandardHandler, S as StandardHandlerInterceptorOptions, b as StandardHandlerOptions, a as StandardHandlerPlugin } from '../../shared/server.CQyYNJ1H.js';
1
+ export { C as CompositeStandardHandlerPlugin, c as StandardHandleOptions, d as StandardHandleResult, e as StandardHandler, S as StandardHandlerInterceptorOptions, b as StandardHandlerOptions, a as StandardHandlerPlugin } from '../../shared/server.B9i6p26R.js';
2
2
  import { AnyProcedure, AnyRouter } from '@temporary-name/server';
3
3
  import { StandardCodec as StandardCodec$1, StandardParams as StandardParams$1, StandardMatcher as StandardMatcher$1, StandardMatchResult as StandardMatchResult$1 } from '@temporary-name/server/standard';
4
4
  import { ORPCError, HTTPPath } from '@temporary-name/shared';
5
5
  import { StandardLazyRequest, StandardResponse } from '@temporary-name/standard-server';
6
- import { h as AnyProcedure$1, f as AnyRouter$1 } from '../../shared/server.BKSOrA6h.js';
7
- export { F as FriendlyStandardHandleOptions, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.SLLuK6_v.js';
6
+ import { h as AnyProcedure$1, f as AnyRouter$1 } from '../../shared/server.Bzrdopnd.js';
7
+ export { F as FriendlyStandardHandleOptions, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.CYRDznXq.js';
8
8
  import '@temporary-name/contract';
9
9
 
10
10
  declare class StandardOpenAPICodec implements StandardCodec$1 {
@@ -1,11 +1,9 @@
1
- export { C as CompositeStandardHandlerPlugin, S as StandardHandler, a as StandardOpenAPICodec, b as StandardOpenAPIMatcher, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.DLsti1Pv.mjs';
1
+ export { C as CompositeStandardHandlerPlugin, S as StandardHandler, a as StandardOpenAPICodec, b as StandardOpenAPIMatcher, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.CvI-wPHM.mjs';
2
2
  import '@temporary-name/shared';
3
3
  import '@temporary-name/standard-server';
4
- import '../../shared/server.BKh8I1Ny.mjs';
4
+ import '../../shared/server.NLSomL7m.mjs';
5
5
  import '@temporary-name/contract';
6
- import 'node:async_hooks';
7
- import 'zod';
8
- import 'zod/v4/core';
6
+ import '@temporary-name/zod';
9
7
  import '../../shared/server.BEHw7Eyx.mjs';
10
8
  import '@temporary-name/server';
11
9
  import 'rou3';
package/dist/index.d.mts CHANGED
@@ -1,9 +1,10 @@
1
- import { AnySchema, ErrorMap, Meta, MergedErrorMap, Route, InferSchemaOutput, InferSchemaInput, EnhanceRouteOptions, AnyContractRouter, AnyContractProcedure, Schema, ContractRouter, ContractProcedureDef, ContractProcedure, InferContractRouterErrorMap, InferContractRouterMeta, ErrorFromErrorMap } from '@temporary-name/contract';
2
- export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, InputStructure, MergedErrorMap, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, type, validateORPCError } from '@temporary-name/contract';
1
+ import { AnySchema, ErrorMap, Meta, MergedErrorMap, Route, InferSchemaOutput, InferSchemaInput, EnhanceRouteOptions, AnyContractRouter, AnyContractProcedure, ContractProcedure, Schema, ContractRouter, ContractProcedureDef, InferContractRouterErrorMap, InferContractRouterMeta, ErrorFromErrorMap } from '@temporary-name/contract';
2
+ export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, InputStructure, MergedErrorMap, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, validateORPCError } from '@temporary-name/contract';
3
3
  import { IntersectPick, ClientContext, MaybeOptionalOptions, HTTPPath, ClientOptions, ClientPromiseResult } from '@temporary-name/shared';
4
4
  export { AsyncIteratorClass, ClientContext, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, HTTPMethod, HTTPPath, IntersectPick, ORPCError, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, isDefinedError, onError, onFinish, onStart, onSuccess, safe, streamToAsyncIteratorClass as streamToEventIterator } from '@temporary-name/shared';
5
- import { C as Context, P as Procedure, M as Middleware, O as ORPCErrorConstructorMap, a as MergedInitialContext, b as MergedCurrentContext, c as MapInputMiddleware, d as CreateProcedureClientOptions, e as ProcedureClient, A as AnyMiddleware, L as Lazyable, f as AnyRouter, g as Lazy, h as AnyProcedure, i as ProcedureHandler, R as Router, I as InferRouterInitialContext } from './shared/server.BKSOrA6h.mjs';
6
- export { H as InferRouterCurrentContexts, G as InferRouterInitialContexts, J as InferRouterInputs, K as InferRouterOutputs, n as LAZY_SYMBOL, o as LazyMeta, v as MiddlewareNextFn, t as MiddlewareNextFnOptions, x as MiddlewareOptions, w as MiddlewareOutputFn, s as MiddlewareResult, k as ORPCErrorConstructorMapItem, j as ORPCErrorConstructorMapItemOptions, E as ProcedureClientInterceptorOptions, B as ProcedureDef, z as ProcedureHandlerOptions, l as createORPCErrorConstructorMap, F as createProcedureClient, r as getLazyMeta, q as isLazy, D as isProcedure, p as lazy, m as mergeCurrentContext, y as middlewareOutputFn, u as unlazy } from './shared/server.BKSOrA6h.mjs';
5
+ import { SchemaClass } from '@temporary-name/zod';
6
+ import { C as Context, P as Procedure, M as Middleware, O as ORPCErrorConstructorMap, a as MergedInitialContext, b as MergedCurrentContext, c as MapInputMiddleware, d as CreateProcedureClientOptions, e as ProcedureClient, A as AnyMiddleware, L as Lazyable, f as AnyRouter, g as Lazy, h as AnyProcedure, i as ProcedureHandler, R as Router, I as InferRouterInitialContext } from './shared/server.Bzrdopnd.mjs';
7
+ export { H as InferRouterCurrentContexts, G as InferRouterInitialContexts, J as InferRouterInputs, K as InferRouterOutputs, n as LAZY_SYMBOL, o as LazyMeta, v as MiddlewareNextFn, t as MiddlewareNextFnOptions, x as MiddlewareOptions, w as MiddlewareOutputFn, s as MiddlewareResult, k as ORPCErrorConstructorMapItem, j as ORPCErrorConstructorMapItemOptions, E as ProcedureClientInterceptorOptions, B as ProcedureDef, z as ProcedureHandlerOptions, l as createORPCErrorConstructorMap, F as createProcedureClient, r as getLazyMeta, q as isLazy, D as isProcedure, p as lazy, m as mergeCurrentContext, y as middlewareOutputFn, u as unlazy } from './shared/server.Bzrdopnd.mjs';
7
8
  export { getEventMeta, withEventMeta } from '@temporary-name/standard-server';
8
9
 
9
10
  declare class DecoratedProcedure<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> extends Procedure<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta> {
@@ -93,104 +94,48 @@ type UnlaziedRouter<T extends AnyRouter> = T extends AnyProcedure ? T : {
93
94
  };
94
95
  declare function unlazyRouter<T extends AnyRouter>(router: T): Promise<UnlaziedRouter<T>>;
95
96
 
96
- interface BuilderWithMiddlewares<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
97
+ declare class ProcedureBuilder<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> extends ContractProcedure<TInputSchema, TOutputSchema, TErrorMap, TMeta> {
98
+ z: SchemaClass;
97
99
  /**
98
100
  * This property holds the defined options.
99
101
  */
100
- '~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
102
+ '~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
103
+ constructor(def: BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>);
101
104
  /**
102
- * Adds type-safe custom errors.
103
- * The provided errors are spared-merged with any existing errors.
105
+ * Adds type-safe custom errors to the contract.
106
+ * The provided errors are spared-merged with any existing errors in the contract.
104
107
  *
105
108
  * @see {@link https://orpc.unnoq.com/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
106
109
  */
107
- 'errors'<U extends ErrorMap>(errors: U): BuilderWithMiddlewares<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta, TGateName>;
110
+ errors<U extends ErrorMap>(errors: U): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta, TGateName>;
108
111
  /**
109
- * Uses a middleware to modify the context or improve the pipeline.
110
- *
111
- * @info Supports both normal middleware and inline middleware implementations.
112
- * @note The current context must be satisfy middleware dependent-context
113
- * @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
114
- */
115
- 'use'<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>): BuilderWithMiddlewares<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
116
- /**
117
- * Sets or updates the metadata.
118
- * The provided metadata is spared-merged with any existing metadata.
112
+ * Sets or updates the metadata for the contract.
113
+ * The provided metadata is spared-merged with any existing metadata in the contract.
119
114
  *
120
115
  * @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
121
116
  */
122
- 'meta'(meta: TMeta): BuilderWithMiddlewares<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
117
+ meta(meta: TMeta): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
123
118
  /**
124
- * Sets or updates the route definition.
125
- * The provided route is spared-merged with any existing route.
119
+ * Sets or updates the route definition for the contract.
120
+ * The provided route is spared-merged with any existing route in the contract.
126
121
  * This option is typically relevant when integrating with OpenAPI.
127
122
  *
128
123
  * @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
129
124
  * @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
130
125
  */
131
- 'route'(route: Route): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
126
+ route(route: Route): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
132
127
  /**
133
128
  * Defines the input validation schema.
134
129
  *
135
130
  * @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Input Validation Docs}
136
131
  */
137
- 'input'<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, USchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
132
+ input<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, USchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
138
133
  /**
139
134
  * Defines the output validation schema.
140
135
  *
141
136
  * @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
142
137
  */
143
- 'output'<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
144
- /**
145
- * Defines the handler of the procedure.
146
- *
147
- * @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
148
- */
149
- 'handler'<UFuncOutput>(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, UFuncOutput, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, Schema<UFuncOutput, UFuncOutput>, TErrorMap, TMeta>;
150
- /**
151
- * Prefixes all procedures in the router.
152
- * The provided prefix is post-appended to any existing router prefix.
153
- *
154
- * @note This option does not affect procedures that do not define a path in their route definition.
155
- *
156
- * @see {@link https://orpc.unnoq.com/docs/openapi/routing#route-prefixes OpenAPI Route Prefixes Docs}
157
- */
158
- 'prefix'(prefix: HTTPPath): RouterBuilder<TInitialContext, TCurrentContext, TErrorMap, TMeta>;
159
- /**
160
- * Adds tags to all procedures in the router.
161
- * This helpful when you want to group procedures together in the OpenAPI specification.
162
- *
163
- * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
164
- */
165
- 'tag'(...tags: string[]): RouterBuilder<TInitialContext, TCurrentContext, TErrorMap, TMeta>;
166
- /**
167
- * Applies all of the previously defined options to the specified router.
168
- *
169
- * @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
170
- */
171
- 'router'<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext, TErrorMap>;
172
- /**
173
- * Create a lazy router
174
- * And applies all of the previously defined options to the specified router.
175
- *
176
- * @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
177
- */
178
- 'lazyRoute'<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(loader: () => Promise<{
179
- default: U;
180
- }>): EnhancedRouter<Lazy<U>, TInitialContext, TCurrentContext, TErrorMap>;
181
- }
182
- interface ProcedureBuilder<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
183
- /**
184
- * This property holds the defined options.
185
- */
186
- '~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
187
- /**
188
- * Adds type-safe custom errors.
189
- * The provided errors are spared-merged with any existing errors.
190
- *
191
- * @see {@link https://orpc.unnoq.com/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
192
- */
193
- 'errors'<U extends ErrorMap>(errors: U): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta, TGateName>;
138
+ output<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
194
139
  /**
195
140
  * Uses a middleware to modify the context or improve the pipeline.
196
141
  *
@@ -198,62 +143,18 @@ interface ProcedureBuilder<TInitialContext extends Context, TCurrentContext exte
198
143
  * @note The current context must be satisfy middleware dependent-context
199
144
  * @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
200
145
  */
201
- 'use'<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ProcedureBuilder<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
202
- /**
203
- * Sets or updates the metadata.
204
- * The provided metadata is spared-merged with any existing metadata.
205
- *
206
- * @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
207
- */
208
- 'meta'(meta: TMeta): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
209
- /**
210
- * Sets or updates the route definition.
211
- * The provided route is spared-merged with any existing route.
212
- * This option is typically relevant when integrating with OpenAPI.
213
- *
214
- * @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
215
- * @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
216
- */
217
- 'route'(route: Route): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
218
- /**
219
- * Defines the input validation schema.
220
- *
221
- * @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Input Validation Docs}
222
- */
223
- 'input'<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, USchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
224
- /**
225
- * Defines the output validation schema.
226
- *
227
- * @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
228
- */
229
- 'output'<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
146
+ use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ProcedureBuilder<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
147
+ useGating<const TInferredGateName extends string>(gates: TInferredGateName[], isGateEnabled: (gate: TInferredGateName, ctx: TCurrentContext) => boolean): BuilderWithMiddlewares<MergedInitialContext<TInitialContext, Context, TCurrentContext>, MergedCurrentContext<TCurrentContext, {
148
+ isGateEnabled: typeof isGateEnabled;
149
+ }>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TInferredGateName>;
230
150
  /**
231
151
  * Defines the handler of the procedure.
232
152
  *
233
153
  * @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
234
154
  */
235
- 'handler'<UFuncOutput>(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, UFuncOutput, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, Schema<UFuncOutput, UFuncOutput>, TErrorMap, TMeta>;
155
+ handler<UFuncOutput>(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, UFuncOutput, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, Schema<UFuncOutput, UFuncOutput>, TErrorMap, TMeta>;
236
156
  }
237
- interface RouterBuilder<TInitialContext extends Context, TCurrentContext extends Context, TErrorMap extends ErrorMap, TMeta extends Meta> {
238
- /**
239
- * This property holds the defined options.
240
- */
241
- '~orpc': EnhanceRouterOptions<TErrorMap>;
242
- /**
243
- * Adds type-safe custom errors.
244
- * The provided errors are spared-merged with any existing errors.
245
- *
246
- * @see {@link https://orpc.unnoq.com/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
247
- */
248
- 'errors'<U extends ErrorMap>(errors: U): RouterBuilder<TInitialContext, TCurrentContext, MergedErrorMap<TErrorMap, U>, TMeta>;
249
- /**
250
- * Uses a middleware to modify the context or improve the pipeline.
251
- *
252
- * @info Supports both normal middleware and inline middleware implementations.
253
- * @note The current context must be satisfy middleware dependent-context
254
- * @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
255
- */
256
- 'use'<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>): RouterBuilder<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TErrorMap, TMeta>;
157
+ declare class BuilderWithMiddlewares<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> extends ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName> {
257
158
  /**
258
159
  * Prefixes all procedures in the router.
259
160
  * The provided prefix is post-appended to any existing router prefix.
@@ -262,30 +163,36 @@ interface RouterBuilder<TInitialContext extends Context, TCurrentContext extends
262
163
  *
263
164
  * @see {@link https://orpc.unnoq.com/docs/openapi/routing#route-prefixes OpenAPI Route Prefixes Docs}
264
165
  */
265
- 'prefix'(prefix: HTTPPath): RouterBuilder<TInitialContext, TCurrentContext, TErrorMap, TMeta>;
166
+ prefix(prefix: HTTPPath): BuilderWithMiddlewares<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
266
167
  /**
267
168
  * Adds tags to all procedures in the router.
268
169
  * This helpful when you want to group procedures together in the OpenAPI specification.
269
170
  *
270
171
  * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
271
172
  */
272
- 'tag'(...tags: string[]): RouterBuilder<TInitialContext, TCurrentContext, TErrorMap, TMeta>;
173
+ tag(...tags: string[]): RouterBuilder<TInitialContext, TCurrentContext, TErrorMap, TMeta>;
273
174
  /**
274
175
  * Applies all of the previously defined options to the specified router.
275
176
  *
276
177
  * @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
277
178
  */
278
- 'router'<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext, TErrorMap>;
179
+ router<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext, TErrorMap>;
279
180
  /**
280
181
  * Create a lazy router
281
182
  * And applies all of the previously defined options to the specified router.
282
183
  *
283
184
  * @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
284
185
  */
285
- 'lazyRoute'<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(loader: () => Promise<{
186
+ lazyRoute<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(loader: () => Promise<{
286
187
  default: U;
287
188
  }>): EnhancedRouter<Lazy<U>, TInitialContext, TCurrentContext, TErrorMap>;
288
189
  }
190
+ interface RouterBuilder<TInitialContext extends Context, TCurrentContext extends Context, TErrorMap extends ErrorMap, TMeta extends Meta> extends Pick<BuilderWithMiddlewares<TInitialContext, TCurrentContext, any, any, TErrorMap, TMeta, any>, 'prefix' | 'tag' | 'router' | 'lazyRoute'> {
191
+ /**
192
+ * This property holds the defined options.
193
+ */
194
+ '~orpc': EnhanceRouterOptions<TErrorMap>;
195
+ }
289
196
 
290
197
  interface DecoratedMiddleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput, TErrorConstructorMap extends ORPCErrorConstructorMap<any>, TMeta extends Meta> extends Middleware<TInContext, TOutContext, TInput, TOutput, TErrorConstructorMap, TMeta> {
291
198
  /**
@@ -309,17 +216,12 @@ interface DecoratedMiddleware<TInContext extends Context, TOutContext extends Co
309
216
  }
310
217
  declare function decorateMiddleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput, TErrorConstructorMap extends ORPCErrorConstructorMap<any>, TMeta extends Meta>(middleware: Middleware<TInContext, TOutContext, TInput, TOutput, TErrorConstructorMap, TMeta>): DecoratedMiddleware<TInContext, TOutContext, TInput, TOutput, TErrorConstructorMap, TMeta>;
311
218
 
312
- interface BuilderDef<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> extends ContractProcedureDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>, EnhanceRouterOptions<TErrorMap> {
219
+ interface BuilderDef<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> extends ContractProcedureDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>, EnhanceRouterOptions<TErrorMap> {
313
220
  middlewares: readonly AnyMiddleware[];
314
221
  inputValidationIndex: number;
315
222
  outputValidationIndex: number;
316
223
  }
317
- declare class Builder<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
318
- /**
319
- * This property holds the defined options.
320
- */
321
- '~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
322
- constructor(def: BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>);
224
+ declare class Builder<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> extends BuilderWithMiddlewares<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName> {
323
225
  /**
324
226
  * Set or override the initial context.
325
227
  *
@@ -333,89 +235,6 @@ declare class Builder<TInitialContext extends Context, TCurrentContext extends C
333
235
  */
334
236
  middleware<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, TInput, TOutput = any>(// = any here is important to make middleware can be used in any output by default
335
237
  middleware: Middleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<TErrorMap>, TMeta>): DecoratedMiddleware<TInitialContext, UOutContext, TInput, TOutput, any, TMeta>;
336
- /**
337
- * Adds type-safe custom errors.
338
- * The provided errors are spared-merged with any existing errors.
339
- *
340
- * @see {@link https://orpc.unnoq.com/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
341
- */
342
- errors<U extends ErrorMap>(errors: U): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta, TGateName>;
343
- /**
344
- * Uses a middleware to modify the context or improve the pipeline.
345
- *
346
- * @info Supports both normal middleware and inline middleware implementations.
347
- * @note The current context must be satisfy middleware dependent-context
348
- * @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
349
- */
350
- use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>): BuilderWithMiddlewares<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
351
- useGating<const TInferredGateName extends string>(gates: TInferredGateName[], isGateEnabled: (gate: TInferredGateName, ctx: TCurrentContext) => boolean): BuilderWithMiddlewares<MergedInitialContext<TInitialContext, Context, TCurrentContext>, MergedCurrentContext<TCurrentContext, {
352
- isGateEnabled: typeof isGateEnabled;
353
- }>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TInferredGateName>;
354
- /**
355
- * Sets or updates the metadata.
356
- * The provided metadata is spared-merged with any existing metadata.
357
- *
358
- * @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
359
- */
360
- meta(meta: TMeta): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
361
- /**
362
- * Sets or updates the route definition.
363
- * The provided route is spared-merged with any existing route.
364
- * This option is typically relevant when integrating with OpenAPI.
365
- *
366
- * @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
367
- * @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
368
- */
369
- route(route: Route): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
370
- /**
371
- * Defines the input validation schema.
372
- *
373
- * @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Input Validation Docs}
374
- */
375
- input<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, USchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
376
- /**
377
- * Defines the output validation schema.
378
- *
379
- * @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
380
- */
381
- output<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
382
- /**
383
- * Defines the handler of the procedure.
384
- *
385
- * @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
386
- */
387
- handler<UFuncOutput>(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, UFuncOutput, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, Schema<UFuncOutput, UFuncOutput>, TErrorMap, TMeta>;
388
- /**
389
- * Prefixes all procedures in the router.
390
- * The provided prefix is post-appended to any existing router prefix.
391
- *
392
- * @note This option does not affect procedures that do not define a path in their route definition.
393
- *
394
- * @see {@link https://orpc.unnoq.com/docs/openapi/routing#route-prefixes OpenAPI Route Prefixes Docs}
395
- */
396
- prefix(prefix: HTTPPath): RouterBuilder<TInitialContext, TCurrentContext, TErrorMap, TMeta>;
397
- /**
398
- * Adds tags to all procedures in the router.
399
- * This helpful when you want to group procedures together in the OpenAPI specification.
400
- *
401
- * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
402
- */
403
- tag(...tags: string[]): RouterBuilder<TInitialContext, TCurrentContext, TErrorMap, TMeta>;
404
- /**
405
- * Applies all of the previously defined options to the specified router.
406
- *
407
- * @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
408
- */
409
- router<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext, TErrorMap>;
410
- /**
411
- * Create a lazy router
412
- * And applies all of the previously defined options to the specified router.
413
- *
414
- * @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
415
- */
416
- lazyRoute<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(loader: () => Promise<{
417
- default: U;
418
- }>): EnhancedRouter<Lazy<U>, TInitialContext, TCurrentContext, TErrorMap>;
419
238
  }
420
239
  type ApiBuilder<TMeta extends Meta> = Builder<Record<never, never>, Record<never, never>, Schema<unknown, unknown>, Schema<unknown, unknown>, Record<never, never>, TMeta, never>;
421
240
  interface ApiBuilderOpts<TMeta extends Meta> {
@@ -457,7 +276,7 @@ interface ImplementedProcedure<TInitialContext extends Context, TCurrentContext
457
276
  * Like `ProcedureBuilderWithoutHandler`, but removed all method that can change the contract.
458
277
  */
459
278
  interface ProcedureImplementer<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> {
460
- '~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, string>;
279
+ '~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
461
280
  /**
462
281
  * Uses a middleware to modify the context or improve the pipeline.
463
282
  *
@@ -599,5 +418,5 @@ declare function createRouterClient<T extends AnyRouter, TClientContext extends
599
418
  declare function setHiddenRouterContract<T extends Lazyable<AnyRouter>>(router: T, contract: AnyContractRouter): T;
600
419
  declare function getHiddenRouterContract(router: Lazyable<AnyRouter | AnyContractRouter>): AnyContractRouter | undefined;
601
420
 
602
- export { AnyMiddleware, AnyProcedure, AnyRouter, Builder, Context, CreateProcedureClientOptions, DecoratedProcedure, InferRouterInitialContext, Lazy, Lazyable, MapInputMiddleware, MergedCurrentContext, MergedInitialContext, Middleware, ORPCErrorConstructorMap, Procedure, ProcedureClient, ProcedureHandler, Router, addMiddleware, call, createAccessibleLazyRouter, createApiBuilder, createAssertedLazyProcedure, createContractedProcedure, createRouterClient, decorateMiddleware, enhanceRouter, getHiddenRouterContract, getRouter, implement, implementerInternal, isStartWithMiddlewares, mergeMiddlewares, os, resolveContractProcedures, setHiddenRouterContract, traverseContractProcedures, unlazyRouter };
603
- export type { AccessibleLazyRouter, ApiBuilder, BuilderDef, BuilderWithMiddlewares, ContractProcedureCallbackOptions, DecoratedMiddleware, EnhanceRouterOptions, EnhancedRouter, ImplementedProcedure, Implementer, ImplementerInternal, ImplementerInternalWithMiddlewares, LazyTraverseContractProceduresOptions, ProcedureBuilder, ProcedureImplementer, RouterBuilder, RouterClient, RouterImplementer, RouterImplementerWithMiddlewares, TraverseContractProcedureCallbackOptions, TraverseContractProceduresOptions, UnlaziedRouter };
421
+ export { AnyMiddleware, AnyProcedure, AnyRouter, Builder, BuilderWithMiddlewares, Context, CreateProcedureClientOptions, DecoratedProcedure, InferRouterInitialContext, Lazy, Lazyable, MapInputMiddleware, MergedCurrentContext, MergedInitialContext, Middleware, ORPCErrorConstructorMap, Procedure, ProcedureBuilder, ProcedureClient, ProcedureHandler, Router, addMiddleware, call, createAccessibleLazyRouter, createApiBuilder, createAssertedLazyProcedure, createContractedProcedure, createRouterClient, decorateMiddleware, enhanceRouter, getHiddenRouterContract, getRouter, implement, implementerInternal, isStartWithMiddlewares, mergeMiddlewares, os, resolveContractProcedures, setHiddenRouterContract, traverseContractProcedures, unlazyRouter };
422
+ export type { AccessibleLazyRouter, ApiBuilder, BuilderDef, ContractProcedureCallbackOptions, DecoratedMiddleware, EnhanceRouterOptions, EnhancedRouter, ImplementedProcedure, Implementer, ImplementerInternal, ImplementerInternalWithMiddlewares, LazyTraverseContractProceduresOptions, ProcedureImplementer, RouterBuilder, RouterClient, RouterImplementer, RouterImplementerWithMiddlewares, TraverseContractProcedureCallbackOptions, TraverseContractProceduresOptions, UnlaziedRouter };