@temporary-name/server 1.9.3-alpha.03f5d40e5b399f85012c2fb4e98167e26d551d36 → 1.9.3-alpha.0489b23089852dc674460c2b1311b592746e58e1
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.
- package/dist/adapters/aws-lambda/index.d.mts +4 -6
- package/dist/adapters/aws-lambda/index.d.ts +4 -6
- package/dist/adapters/aws-lambda/index.mjs +4 -4
- package/dist/adapters/fetch/index.d.mts +8 -86
- package/dist/adapters/fetch/index.d.ts +8 -86
- package/dist/adapters/fetch/index.mjs +16 -155
- package/dist/adapters/node/index.d.mts +8 -63
- package/dist/adapters/node/index.d.ts +8 -63
- package/dist/adapters/node/index.mjs +14 -120
- package/dist/adapters/standard/index.d.mts +10 -7
- package/dist/adapters/standard/index.d.ts +10 -7
- package/dist/adapters/standard/index.mjs +4 -4
- package/dist/helpers/index.mjs +3 -29
- package/dist/index.d.mts +121 -258
- package/dist/index.d.ts +121 -258
- package/dist/index.mjs +168 -359
- package/dist/openapi/index.d.mts +12 -28
- package/dist/openapi/index.d.ts +12 -28
- package/dist/openapi/index.mjs +134 -152
- package/dist/shared/server.B0LJ_wu-.d.ts +41 -0
- package/dist/shared/server.BQZMQrPe.d.mts +41 -0
- package/dist/shared/server.C1RJffw4.mjs +30 -0
- package/dist/shared/server.CQIFwyhc.mjs +40 -0
- package/dist/shared/server.CYa9puL2.mjs +403 -0
- package/dist/shared/server.ChOv1yG3.mjs +319 -0
- package/dist/shared/server.Cza0RB3u.mjs +160 -0
- package/dist/shared/server.DXPMDozZ.d.mts +388 -0
- package/dist/shared/server.DXPMDozZ.d.ts +388 -0
- package/dist/shared/server.YUvuxHty.mjs +48 -0
- package/package.json +10 -28
- package/dist/plugins/index.d.mts +0 -160
- package/dist/plugins/index.d.ts +0 -160
- package/dist/plugins/index.mjs +0 -288
- package/dist/shared/server.BEHw7Eyx.mjs +0 -247
- package/dist/shared/server.BVxcyR6X.mjs +0 -287
- package/dist/shared/server.Bk5r0-2R.d.ts +0 -56
- package/dist/shared/server.Bs6ka_UE.d.mts +0 -23
- package/dist/shared/server.CZNLCQBm.d.mts +0 -192
- package/dist/shared/server.CZNLCQBm.d.ts +0 -192
- package/dist/shared/server.CbLTWfgn.d.mts +0 -56
- package/dist/shared/server.D2UFMrxf.d.ts +0 -23
- package/dist/shared/server.DcfsPloY.mjs +0 -202
package/dist/index.d.mts
CHANGED
|
@@ -1,79 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { C as Context,
|
|
7
|
-
export {
|
|
1
|
+
import * as z from '@temporary-name/zod';
|
|
2
|
+
import { SchemaClass, core } from '@temporary-name/zod';
|
|
3
|
+
import * as zod_v4_core from 'zod/v4/core';
|
|
4
|
+
import { ClientContext, Value, Promisable, Client, MaybeOptionalOptions, HTTPEndpoint as HTTPEndpoint$1, IntersectPick, HTTPPath, AsyncIteratorClass, ClientOptions, HTTPMethod } from '@temporary-name/shared';
|
|
5
|
+
export { AsyncIteratorClass, ClientContext, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, HTTPMethod, HTTPPath, IntersectPick, ORPCError, asyncIteratorToStream as eventIteratorToStream, isDefinedError, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@temporary-name/shared';
|
|
6
|
+
import { C as Context, S as Schemas, I as InferProcedureClientInputs, a as InferSchemaOutput, M as Meta, L as Lazyable, P as Procedure, b as Contract, A as AnyShape, c as MergedSchemas, W as WrapShape, U as UnionToIntersection, d as AnySchema, R as Route, e as Middleware, f as MergedCurrentContext, g as MergedInitialContext, V as ValidatedAuthContext, h as AuthConfig, B as BuildContextWithAuth, i as ProcedureHandler, j as InferHandlerInputs, k as InferSchemaInput, E as EnhanceRouterOptions, l as Router, m as EnhancedRouter, n as MapInputMiddleware, o as ContractDef, p as SchemaIssue, q as Schema, r as AnyMiddleware, s as Lazy, t as AnyProcedure, u as AnyRouter, v as InferRouterInitialContext } from './shared/server.DXPMDozZ.mjs';
|
|
7
|
+
export { a5 as AccessibleLazyRouter, Y as AnyContractDef, aa as ContractProcedureCallbackOptions, $ as ContractRouter, a1 as InferRouterCurrentContexts, a0 as InferRouterInitialContexts, a2 as InferRouterInputs, a3 as InferRouterOutputs, ai as InitialSchemas, x as LAZY_SYMBOL, y as LazyMeta, ab as LazyTraverseContractProceduresOptions, N as MiddlewareNextFn, Q as MiddlewareOptions, O as MiddlewareOutputFn, K as MiddlewareResult, Z as ProcedureDef, X as ProcedureHandlerOptions, a9 as TraverseContractProcedureCallbackOptions, a8 as TraverseContractProceduresOptions, ag as TypeRest, ae as UnlaziedRouter, a6 as createAccessibleLazyRouter, a7 as enhanceRouter, G as getLazyMeta, a4 as getRouter, ah as initialSchemas, F as isLazy, _ as isProcedure, D as lazy, z as lazyInternal, w as mergeCurrentContext, J as mergeMeta, T as middlewareOutputFn, ad as resolveContractProcedures, ac as traverseContractProcedures, H as unlazy, af as unlazyRouter } from './shared/server.DXPMDozZ.mjs';
|
|
8
8
|
export { getEventMeta, withEventMeta } from '@temporary-name/standard-server';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type ProcedureClient<TClientContext extends ClientContext, TSchemas extends Schemas> = Client<TClientContext, InferProcedureClientInputs<TSchemas>, InferSchemaOutput<TSchemas['outputSchema']>>;
|
|
11
|
+
type CreateProcedureClientOptions<TInitialContext extends Context, TClientContext extends ClientContext> = {
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @see {@link https://orpc.unnoq.com/docs/client/server-side Server-side Client Docs}
|
|
13
|
+
* This is helpful for logging and analytics.
|
|
15
14
|
*/
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
declare function createAccessibleLazyRouter<T extends Lazy<AnyRouter | undefined>>(lazied: T): AccessibleLazyRouter<T>;
|
|
24
|
-
type EnhancedRouter<T extends Lazyable<AnyRouter>, TInitialContext extends Context, TCurrentContext extends Context, TErrorMap extends ErrorMap> = T extends Lazy<infer U extends AnyRouter> ? AccessibleLazyRouter<EnhancedRouter<U, TInitialContext, TCurrentContext, TErrorMap>> : T extends (Procedure<infer UInitialContext, infer UCurrentContext, infer UInputSchema, infer UOutputSchema, infer UErrorMap, infer UMeta>) ? Procedure<MergedInitialContext<TInitialContext, UInitialContext, TCurrentContext>, UCurrentContext, UInputSchema, UOutputSchema, MergedErrorMap<TErrorMap, UErrorMap>, UMeta> : {
|
|
25
|
-
[K in keyof T]: T[K] extends Lazyable<AnyRouter> ? EnhancedRouter<T[K], TInitialContext, TCurrentContext, TErrorMap> : never;
|
|
26
|
-
};
|
|
27
|
-
interface EnhanceRouterOptions<TErrorMap extends ErrorMap> extends EnhanceRouteOptions {
|
|
28
|
-
middlewares: readonly AnyMiddleware[];
|
|
29
|
-
errorMap: TErrorMap;
|
|
30
|
-
dedupeLeadingMiddlewares: boolean;
|
|
31
|
-
}
|
|
32
|
-
declare function enhanceRouter<T extends Lazyable<AnyRouter>, TInitialContext extends Context, TCurrentContext extends Context, TErrorMap extends ErrorMap>(router: T, options: EnhanceRouterOptions<TErrorMap>): EnhancedRouter<T, TInitialContext, TCurrentContext, TErrorMap>;
|
|
33
|
-
interface TraverseContractProceduresOptions {
|
|
34
|
-
router: AnyContractRouter | AnyRouter;
|
|
35
|
-
path: readonly string[];
|
|
36
|
-
}
|
|
37
|
-
interface TraverseContractProcedureCallbackOptions {
|
|
38
|
-
contract: AnyContractProcedure | AnyProcedure;
|
|
39
|
-
path: readonly string[];
|
|
40
|
-
}
|
|
15
|
+
path?: readonly string[];
|
|
16
|
+
} & (object extends TInitialContext ? {
|
|
17
|
+
context?: Value<Promisable<TInitialContext>, [clientContext: TClientContext]>;
|
|
18
|
+
} : {
|
|
19
|
+
context: Value<Promisable<TInitialContext>, [clientContext: TClientContext]>;
|
|
20
|
+
});
|
|
41
21
|
/**
|
|
42
|
-
*
|
|
22
|
+
* Create Server-side client from a procedure.
|
|
23
|
+
*
|
|
24
|
+
* @see {@link https://orpc.unnoq.com/docs/client/server-side Server-side Client Docs}
|
|
43
25
|
*/
|
|
44
|
-
|
|
45
|
-
interface LazyTraverseContractProceduresOptions {
|
|
46
|
-
router: Lazy<AnyRouter>;
|
|
47
|
-
path: readonly string[];
|
|
48
|
-
}
|
|
49
|
-
declare function traverseContractProcedures(options: TraverseContractProceduresOptions, callback: (options: TraverseContractProcedureCallbackOptions) => void, lazyOptions?: LazyTraverseContractProceduresOptions[]): LazyTraverseContractProceduresOptions[];
|
|
50
|
-
declare function resolveContractProcedures(options: TraverseContractProceduresOptions, callback: (options: TraverseContractProcedureCallbackOptions) => void): Promise<void>;
|
|
51
|
-
type UnlaziedRouter<T extends AnyRouter> = T extends AnyProcedure ? T : {
|
|
52
|
-
[K in keyof T]: T[K] extends Lazyable<infer U extends AnyRouter> ? UnlaziedRouter<U> : never;
|
|
53
|
-
};
|
|
54
|
-
declare function unlazyRouter<T extends AnyRouter>(router: T): Promise<UnlaziedRouter<T>>;
|
|
26
|
+
declare function createProcedureClient<TInitialContext extends Context, TSchemas extends Schemas, TMeta extends Meta, TClientContext extends ClientContext>(lazyableProcedure: Lazyable<Procedure<TInitialContext, any, TSchemas, TMeta>>, ...rest: MaybeOptionalOptions<CreateProcedureClientOptions<TInitialContext, TClientContext>>): ProcedureClient<TClientContext, TSchemas>;
|
|
55
27
|
|
|
56
|
-
declare class
|
|
57
|
-
z: SchemaClass;
|
|
58
|
-
/**
|
|
59
|
-
* This property holds the defined options.
|
|
60
|
-
*/
|
|
61
|
-
'~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
62
|
-
constructor(def: BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>);
|
|
28
|
+
declare class DecoratedProcedure<TInitialContext extends Context, TCurrentContext extends Context, TSchemas extends Schemas, TMeta extends Meta> extends Procedure<TInitialContext, TCurrentContext, TSchemas, TMeta> {
|
|
63
29
|
/**
|
|
64
|
-
*
|
|
65
|
-
* The provided errors are spared-merged with any existing errors in the contract.
|
|
30
|
+
* Make this procedure callable (works like a function while still being a procedure).
|
|
66
31
|
*
|
|
67
|
-
* @see {@link https://orpc.unnoq.com/docs/
|
|
32
|
+
* @see {@link https://orpc.unnoq.com/docs/client/server-side Server-side Client Docs}
|
|
68
33
|
*/
|
|
69
|
-
|
|
34
|
+
callable<TClientContext extends ClientContext>(...rest: MaybeOptionalOptions<CreateProcedureClientOptions<TInitialContext, TClientContext>>): DecoratedProcedure<TInitialContext, TCurrentContext, TSchemas, TMeta> & ProcedureClient<TClientContext, TSchemas>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare class ProcedureBuilder<TInitialContext extends Context, TCurrentContext extends Context, TSchemas extends Schemas, TMeta extends Meta, TGateName extends string> extends Contract<BuilderDef<TSchemas, TMeta>> {
|
|
38
|
+
z: SchemaClass<TGateName>;
|
|
39
|
+
constructor(def: BuilderDef<TSchemas, TMeta>);
|
|
70
40
|
/**
|
|
71
41
|
* Sets or updates the metadata for the contract.
|
|
72
42
|
* The provided metadata is spared-merged with any existing metadata in the contract.
|
|
73
43
|
*
|
|
74
44
|
* @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
|
|
75
45
|
*/
|
|
76
|
-
meta(meta: TMeta): ProcedureBuilder<TInitialContext, TCurrentContext,
|
|
46
|
+
meta(meta: TMeta): ProcedureBuilder<TInitialContext, TCurrentContext, TSchemas, TMeta, TGateName>;
|
|
47
|
+
endpoint<U extends AnyShape[]>(strings: TemplateStringsArray, ...values: [...U]): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
48
|
+
pathSchema: WrapShape<UnionToIntersection<U>>;
|
|
49
|
+
}>, TMeta, TGateName>;
|
|
50
|
+
endpoint<U extends AnySchema | AnyShape = core.$ZodType<Record<string, never>, Record<string, never>>>(endpoint: HTTPEndpoint$1, schema?: U): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
51
|
+
pathSchema: WrapShape<U>;
|
|
52
|
+
}>, TMeta, TGateName>;
|
|
77
53
|
/**
|
|
78
54
|
* Sets or updates the route definition for the contract.
|
|
79
55
|
* The provided route is spared-merged with any existing route in the contract.
|
|
@@ -82,19 +58,21 @@ declare class ProcedureBuilder<TInitialContext extends Context, TCurrentContext
|
|
|
82
58
|
* @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
|
|
83
59
|
* @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
|
|
84
60
|
*/
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
61
|
+
endpointOpts(route: Route): ProcedureBuilder<TInitialContext, TCurrentContext, TSchemas, TMeta, TGateName>;
|
|
62
|
+
query<U extends AnySchema | AnyShape>(schema: U): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
63
|
+
querySchema: WrapShape<U>;
|
|
64
|
+
}>, TMeta, TGateName>;
|
|
65
|
+
body<U extends AnySchema | AnyShape>(schema: U): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
66
|
+
bodySchema: WrapShape<U>;
|
|
67
|
+
}>, TMeta, TGateName>;
|
|
92
68
|
/**
|
|
93
69
|
* Defines the output validation schema.
|
|
94
70
|
*
|
|
95
71
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
96
72
|
*/
|
|
97
|
-
output<
|
|
73
|
+
output<U extends AnySchema | AnyShape>(schema: U): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
74
|
+
outputSchema: WrapShape<U>;
|
|
75
|
+
}>, TMeta, TGateName>;
|
|
98
76
|
/**
|
|
99
77
|
* Uses a middleware to modify the context or improve the pipeline.
|
|
100
78
|
*
|
|
@@ -102,18 +80,20 @@ declare class ProcedureBuilder<TInitialContext extends Context, TCurrentContext
|
|
|
102
80
|
* @note The current context must be satisfy middleware dependent-context
|
|
103
81
|
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
104
82
|
*/
|
|
105
|
-
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext
|
|
83
|
+
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>>(middleware: Middleware<TCurrentContext, UOutContext, unknown, unknown, TMeta>): ProcedureBuilder<TInitialContext, MergedCurrentContext<TCurrentContext, UOutContext>, TSchemas, TMeta, TGateName>;
|
|
84
|
+
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext, UOutContext, unknown, unknown, TMeta>): ProcedureBuilder<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TSchemas, TMeta, TGateName>;
|
|
85
|
+
useAuth<TAuthContext extends ValidatedAuthContext = false>(config: AuthConfig<TAuthContext, TCurrentContext, TMeta>): ProcedureBuilder<TInitialContext, BuildContextWithAuth<TCurrentContext, TAuthContext>, TSchemas, TMeta, TGateName>;
|
|
106
86
|
useGating<const TInferredGateName extends string>(gates: TInferredGateName[], isGateEnabled: (gate: TInferredGateName, ctx: TCurrentContext) => boolean): BuilderWithMiddlewares<MergedInitialContext<TInitialContext, Context, TCurrentContext>, MergedCurrentContext<TCurrentContext, {
|
|
107
87
|
isGateEnabled: typeof isGateEnabled;
|
|
108
|
-
}>,
|
|
88
|
+
}>, TSchemas, TMeta, TInferredGateName>;
|
|
109
89
|
/**
|
|
110
90
|
* Defines the handler of the procedure.
|
|
111
91
|
*
|
|
112
92
|
* @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
|
|
113
93
|
*/
|
|
114
|
-
handler
|
|
94
|
+
handler(handler: ProcedureHandler<TCurrentContext, InferHandlerInputs<TSchemas>, InferSchemaInput<TSchemas['outputSchema']>, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TSchemas, TMeta>;
|
|
115
95
|
}
|
|
116
|
-
declare class BuilderWithMiddlewares<TInitialContext extends Context, TCurrentContext extends Context,
|
|
96
|
+
declare class BuilderWithMiddlewares<TInitialContext extends Context, TCurrentContext extends Context, TSchemas extends Schemas, TMeta extends Meta, TGateName extends string> extends ProcedureBuilder<TInitialContext, TCurrentContext, TSchemas, TMeta, TGateName> {
|
|
117
97
|
/**
|
|
118
98
|
* Prefixes all procedures in the router.
|
|
119
99
|
* The provided prefix is post-appended to any existing router prefix.
|
|
@@ -122,224 +102,90 @@ declare class BuilderWithMiddlewares<TInitialContext extends Context, TCurrentCo
|
|
|
122
102
|
*
|
|
123
103
|
* @see {@link https://orpc.unnoq.com/docs/openapi/routing#route-prefixes OpenAPI Route Prefixes Docs}
|
|
124
104
|
*/
|
|
125
|
-
prefix(prefix: HTTPPath): BuilderWithMiddlewares<TInitialContext, TCurrentContext,
|
|
105
|
+
prefix(prefix: HTTPPath): BuilderWithMiddlewares<TInitialContext, TCurrentContext, TSchemas, TMeta, TGateName>;
|
|
126
106
|
/**
|
|
127
107
|
* Adds tags to all procedures in the router.
|
|
128
108
|
* This helpful when you want to group procedures together in the OpenAPI specification.
|
|
129
109
|
*
|
|
130
110
|
* @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
|
|
131
111
|
*/
|
|
132
|
-
tag(...tags: string[]): RouterBuilder<TInitialContext, TCurrentContext,
|
|
112
|
+
tag(...tags: string[]): RouterBuilder<TInitialContext, TCurrentContext, TMeta>;
|
|
133
113
|
/**
|
|
134
114
|
* Applies all of the previously defined options to the specified router.
|
|
135
115
|
*
|
|
136
116
|
* @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
|
|
137
117
|
*/
|
|
138
|
-
router<U extends Router<
|
|
139
|
-
/**
|
|
140
|
-
* Create a lazy router
|
|
141
|
-
* And applies all of the previously defined options to the specified router.
|
|
142
|
-
*
|
|
143
|
-
* @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
|
|
144
|
-
*/
|
|
145
|
-
lazyRoute<U extends Router<ContractRouter<TMeta>, TCurrentContext>>(loader: () => Promise<{
|
|
146
|
-
default: U;
|
|
147
|
-
}>): EnhancedRouter<Lazy<U>, TInitialContext, TCurrentContext, TErrorMap>;
|
|
118
|
+
router<U extends Router<TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext>;
|
|
148
119
|
}
|
|
149
|
-
interface RouterBuilder<TInitialContext extends Context, TCurrentContext extends Context,
|
|
120
|
+
interface RouterBuilder<TInitialContext extends Context, TCurrentContext extends Context, TMeta extends Meta> extends Pick<BuilderWithMiddlewares<TInitialContext, TCurrentContext, any, TMeta, any>, 'prefix' | 'tag' | 'router'> {
|
|
150
121
|
/**
|
|
151
122
|
* This property holds the defined options.
|
|
152
123
|
*/
|
|
153
|
-
'~orpc': EnhanceRouterOptions
|
|
124
|
+
'~orpc': EnhanceRouterOptions;
|
|
154
125
|
}
|
|
155
126
|
|
|
156
|
-
interface DecoratedMiddleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput,
|
|
127
|
+
interface DecoratedMiddleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput, TMeta extends Meta> extends Middleware<TInContext, TOutContext, TInput, TOutput, TMeta> {
|
|
157
128
|
/**
|
|
158
129
|
* Change the expected input type by providing a map function.
|
|
159
130
|
*/
|
|
160
|
-
mapInput<UInput>(map: MapInputMiddleware<UInput, TInput>): DecoratedMiddleware<TInContext, TOutContext, UInput, TOutput,
|
|
161
|
-
/**
|
|
162
|
-
* Concatenates two middlewares.
|
|
163
|
-
*
|
|
164
|
-
* @info Pass second argument to map the input.
|
|
165
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware#concatenation Middleware Concatenation Docs}
|
|
166
|
-
*/
|
|
167
|
-
concat<UOutContext extends IntersectPick<MergedCurrentContext<TInContext, TOutContext>, UOutContext>, UInput extends TInput, UInContext extends Context = MergedCurrentContext<TInContext, TOutContext>>(middleware: Middleware<UInContext | MergedCurrentContext<TInContext, TOutContext>, UOutContext, UInput, TOutput, TErrorConstructorMap, TMeta>): DecoratedMiddleware<MergedInitialContext<TInContext, UInContext, MergedCurrentContext<TInContext, TOutContext>>, MergedCurrentContext<TOutContext, UOutContext>, UInput, TOutput, TErrorConstructorMap, TMeta>;
|
|
168
|
-
/**
|
|
169
|
-
* Concatenates two middlewares.
|
|
170
|
-
*
|
|
171
|
-
* @info Pass second argument to map the input.
|
|
172
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware#concatenation Middleware Concatenation Docs}
|
|
173
|
-
*/
|
|
174
|
-
concat<UOutContext extends IntersectPick<MergedCurrentContext<TInContext, TOutContext>, UOutContext>, UInput extends TInput, UMappedInput, UInContext extends Context = MergedCurrentContext<TInContext, TOutContext>>(middleware: Middleware<UInContext | MergedCurrentContext<TInContext, TOutContext>, UOutContext, UMappedInput, TOutput, TErrorConstructorMap, TMeta>, mapInput: MapInputMiddleware<UInput, UMappedInput>): DecoratedMiddleware<MergedInitialContext<TInContext, UInContext, MergedCurrentContext<TInContext, TOutContext>>, MergedCurrentContext<TOutContext, UOutContext>, UInput, TOutput, TErrorConstructorMap, TMeta>;
|
|
131
|
+
mapInput<UInput>(map: MapInputMiddleware<UInput, TInput>): DecoratedMiddleware<TInContext, TOutContext, UInput, TOutput, TMeta>;
|
|
175
132
|
}
|
|
176
|
-
declare function decorateMiddleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput,
|
|
133
|
+
declare function decorateMiddleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput, TMeta extends Meta>(middleware: Middleware<TInContext, TOutContext, TInput, TOutput, TMeta>): DecoratedMiddleware<TInContext, TOutContext, TInput, TOutput, TMeta>;
|
|
177
134
|
|
|
178
|
-
interface BuilderDef<
|
|
179
|
-
middlewares: readonly AnyMiddleware[];
|
|
180
|
-
inputValidationIndex: number;
|
|
181
|
-
outputValidationIndex: number;
|
|
135
|
+
interface BuilderDef<TSchemas extends Schemas, TMeta extends Meta> extends ContractDef<TSchemas, TMeta>, EnhanceRouterOptions {
|
|
182
136
|
}
|
|
183
|
-
declare class Builder<TInitialContext extends Context, TCurrentContext extends Context,
|
|
137
|
+
declare class Builder<TInitialContext extends Context, TCurrentContext extends Context, TSchemas extends Schemas, TMeta extends Meta, TGateName extends string> extends BuilderWithMiddlewares<TInitialContext, TCurrentContext, TSchemas, TMeta, TGateName> {
|
|
184
138
|
/**
|
|
185
139
|
* Set or override the initial context.
|
|
186
140
|
*
|
|
187
141
|
* @see {@link https://orpc.unnoq.com/docs/context Context Docs}
|
|
188
142
|
*/
|
|
189
|
-
$context<U extends Context>(): Builder<U, U,
|
|
143
|
+
$context<U extends Context>(): Builder<U, U, TSchemas, TMeta, TGateName>;
|
|
190
144
|
/**
|
|
191
145
|
* Creates a middleware.
|
|
192
146
|
*
|
|
193
147
|
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
194
148
|
*/
|
|
195
149
|
middleware<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, TInput, TOutput = any>(// = any here is important to make middleware can be used in any output by default
|
|
196
|
-
middleware: Middleware<TInitialContext, UOutContext, TInput, TOutput,
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
150
|
+
middleware: Middleware<TInitialContext, UOutContext, TInput, TOutput, TMeta>): DecoratedMiddleware<TInitialContext, UOutContext, TInput, TOutput, TMeta>;
|
|
151
|
+
}
|
|
152
|
+
declare const baseApi: Builder<{}, {}, {
|
|
153
|
+
pathSchema: z.KrustyObject<{}, zod_v4_core.$strict, z.KrustyInternals<string>>;
|
|
154
|
+
querySchema: z.KrustyObject<{}, zod_v4_core.$strict, z.KrustyInternals<string>>;
|
|
155
|
+
bodySchema: z.KrustyObject<{}, zod_v4_core.$strict, z.KrustyInternals<string>>;
|
|
156
|
+
outputSchema: z.KrustyUnknown<z.KrustyInternals<string>>;
|
|
157
|
+
}, Record<never, never>, never>;
|
|
204
158
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
interface ImplementedProcedure<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> {
|
|
209
|
-
/**
|
|
210
|
-
* Uses a middleware to modify the context or improve the pipeline.
|
|
211
|
-
*
|
|
212
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
213
|
-
* @info Pass second argument to map the input.
|
|
214
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
215
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
216
|
-
*/
|
|
217
|
-
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ImplementedProcedure<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
218
|
-
/**
|
|
219
|
-
* Uses a middleware to modify the context or improve the pipeline.
|
|
220
|
-
*
|
|
221
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
222
|
-
* @info Pass second argument to map the input.
|
|
223
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
224
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
225
|
-
*/
|
|
226
|
-
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInput, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, UInput, InferSchemaInput<TOutputSchema>, ORPCErrorConstructorMap<TErrorMap>, TMeta>, mapInput: MapInputMiddleware<InferSchemaOutput<TInputSchema>, UInput>): ImplementedProcedure<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
159
|
+
interface ValidationErrorOptions extends ErrorOptions {
|
|
160
|
+
message: string;
|
|
161
|
+
issues: readonly SchemaIssue[];
|
|
227
162
|
/**
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
* @see {@link https://orpc.unnoq.com/docs/client/server-side Server-side Client Docs}
|
|
163
|
+
* @todo require this field in v2
|
|
231
164
|
*/
|
|
232
|
-
|
|
165
|
+
data?: unknown;
|
|
233
166
|
}
|
|
234
167
|
/**
|
|
235
|
-
*
|
|
168
|
+
* This errors usually used for ORPCError.cause when the error is a validation error.
|
|
169
|
+
*
|
|
170
|
+
* @see {@link https://orpc.unnoq.com/docs/advanced/validation-errors Validation Errors Docs}
|
|
236
171
|
*/
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
*
|
|
242
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
243
|
-
* @info Pass second argument to map the input.
|
|
244
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
245
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
246
|
-
*/
|
|
247
|
-
'use'<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ProcedureImplementer<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
248
|
-
/**
|
|
249
|
-
* Uses a middleware to modify the context or improve the pipeline.
|
|
250
|
-
*
|
|
251
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
252
|
-
* @info Pass second argument to map the input.
|
|
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>, UInput, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, UInput, InferSchemaInput<TOutputSchema>, ORPCErrorConstructorMap<TErrorMap>, TMeta>, mapInput: MapInputMiddleware<InferSchemaOutput<TInputSchema>, UInput>): ProcedureImplementer<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
257
|
-
/**
|
|
258
|
-
* Defines the handler of the procedure.
|
|
259
|
-
*
|
|
260
|
-
* @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
|
|
261
|
-
*/
|
|
262
|
-
'handler'(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, TErrorMap, TMeta>): ImplementedProcedure<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
172
|
+
declare class ValidationError extends Error {
|
|
173
|
+
readonly issues: readonly SchemaIssue[];
|
|
174
|
+
readonly data: unknown;
|
|
175
|
+
constructor(options: ValidationErrorOptions);
|
|
263
176
|
}
|
|
264
177
|
|
|
265
|
-
interface
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
*
|
|
269
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
270
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
271
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
272
|
-
*/
|
|
273
|
-
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<InferContractRouterErrorMap<T>>, InferContractRouterMeta<T>>): ImplementerInternalWithMiddlewares<T, MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>>;
|
|
274
|
-
/**
|
|
275
|
-
* Applies all of the previously defined options to the specified router.
|
|
276
|
-
* And enforces the router match the contract.
|
|
277
|
-
*
|
|
278
|
-
* @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
|
|
279
|
-
*/
|
|
280
|
-
router<U extends Router<T, TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext, Record<never, never>>;
|
|
281
|
-
/**
|
|
282
|
-
* Create a lazy router
|
|
283
|
-
* And applies all of the previously defined options to the specified router.
|
|
284
|
-
* And enforces the router match the contract.
|
|
285
|
-
*
|
|
286
|
-
* @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
|
|
287
|
-
*/
|
|
288
|
-
lazyRoute<U extends Router<T, TInitialContext>>(loader: () => Promise<{
|
|
289
|
-
default: U;
|
|
290
|
-
}>): EnhancedRouter<Lazy<U>, TInitialContext, TCurrentContext, Record<never, never>>;
|
|
178
|
+
interface EventIteratorSchemaDetails {
|
|
179
|
+
yields: AnySchema;
|
|
180
|
+
returns?: AnySchema;
|
|
291
181
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
*
|
|
300
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
301
|
-
*/
|
|
302
|
-
middleware<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, TInput, TOutput = any>(// = any here is important to make middleware can be used in any output by default
|
|
303
|
-
middleware: Middleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<InferContractRouterErrorMap<T>>, InferContractRouterMeta<T>>): DecoratedMiddleware<TInitialContext, UOutContext, TInput, TOutput, any, InferContractRouterMeta<T>>;
|
|
304
|
-
/**
|
|
305
|
-
* Uses a middleware to modify the context or improve the pipeline.
|
|
306
|
-
*
|
|
307
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
308
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
309
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
310
|
-
*/
|
|
311
|
-
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<InferContractRouterErrorMap<T>>, InferContractRouterMeta<T>>): ImplementerInternalWithMiddlewares<T, MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>>;
|
|
312
|
-
/**
|
|
313
|
-
* Applies all of the previously defined options to the specified router.
|
|
314
|
-
* And enforces the router match the contract.
|
|
315
|
-
*
|
|
316
|
-
* @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
|
|
317
|
-
*/
|
|
318
|
-
router<U extends Router<T, TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext, Record<never, never>>;
|
|
319
|
-
/**
|
|
320
|
-
* Create a lazy router
|
|
321
|
-
* And applies all of the previously defined options to the specified router.
|
|
322
|
-
* And enforces the router match the contract.
|
|
323
|
-
*
|
|
324
|
-
* @see {@link https://orpc.unnoq.com/docs/router#extending-router Extending Router Docs}
|
|
325
|
-
*/
|
|
326
|
-
lazyRoute<U extends Router<T, TCurrentContext>>(loader: () => Promise<{
|
|
327
|
-
default: U;
|
|
328
|
-
}>): EnhancedRouter<Lazy<U>, TInitialContext, TCurrentContext, Record<never, never>>;
|
|
329
|
-
}
|
|
330
|
-
type ImplementerInternal<TContract extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context> = TContract extends ContractProcedure<infer UInputSchema, infer UOutputSchema, infer UErrorMap, infer UMeta> ? ProcedureImplementer<TInitialContext, TCurrentContext, UInputSchema, UOutputSchema, UErrorMap, UMeta> : RouterImplementer<TContract, TInitialContext, TCurrentContext> & {
|
|
331
|
-
[K in keyof TContract]: TContract[K] extends AnyContractRouter ? ImplementerInternal<TContract[K], TInitialContext, TCurrentContext> : never;
|
|
332
|
-
};
|
|
333
|
-
declare function implementerInternal<T extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context>(contract: T, middlewares: AnyMiddleware[]): ImplementerInternal<T, TInitialContext, TCurrentContext>;
|
|
334
|
-
type Implementer<TContract extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context> = {
|
|
335
|
-
/**
|
|
336
|
-
* Set or override the initial context.
|
|
337
|
-
*
|
|
338
|
-
* @see {@link https://orpc.unnoq.com/docs/context Context Docs}
|
|
339
|
-
*/
|
|
340
|
-
$context<U extends Context>(): Implementer<TContract, U, U>;
|
|
341
|
-
} & ImplementerInternal<TContract, TInitialContext, TCurrentContext>;
|
|
342
|
-
declare function implement<T extends AnyContractRouter, TContext extends Context = Record<never, never>>(contract: T): Implementer<T, TContext, TContext>;
|
|
182
|
+
/**
|
|
183
|
+
* Define schema for an event iterator.
|
|
184
|
+
*
|
|
185
|
+
* @see {@link https://orpc.unnoq.com/docs/event-iterator#validate-event-iterator Validate Event Iterator Docs}
|
|
186
|
+
*/
|
|
187
|
+
declare function eventIterator<TYieldIn, TYieldOut, TReturnIn = unknown, TReturnOut = unknown>(yields: Schema<TYieldIn, TYieldOut>, returns?: Schema<TReturnIn, TReturnOut>): Schema<AsyncIteratorObject<TYieldIn, TReturnIn, void>, AsyncIteratorClass<TYieldOut, TReturnOut, void>>;
|
|
188
|
+
declare function getEventIteratorSchemaDetails(schema: AnySchema | undefined): undefined | EventIteratorSchemaDetails;
|
|
343
189
|
|
|
344
190
|
declare function isStartWithMiddlewares(middlewares: readonly AnyMiddleware[], compare: readonly AnyMiddleware[]): boolean;
|
|
345
191
|
declare function mergeMiddlewares(first: readonly AnyMiddleware[], second: readonly AnyMiddleware[], options: {
|
|
@@ -348,10 +194,6 @@ declare function mergeMiddlewares(first: readonly AnyMiddleware[], second: reado
|
|
|
348
194
|
declare function addMiddleware(middlewares: readonly AnyMiddleware[], addition: AnyMiddleware): AnyMiddleware[];
|
|
349
195
|
|
|
350
196
|
declare function createAssertedLazyProcedure(lazied: Lazy<any>): Lazy<AnyProcedure>;
|
|
351
|
-
/**
|
|
352
|
-
* Create a new procedure that ensure the contract is applied to the procedure.
|
|
353
|
-
*/
|
|
354
|
-
declare function createContractedProcedure(procedure: AnyProcedure, contract: AnyContractProcedure): AnyProcedure;
|
|
355
197
|
/**
|
|
356
198
|
* Directly call a procedure without creating a client.
|
|
357
199
|
*
|
|
@@ -362,9 +204,9 @@ declare function createContractedProcedure(procedure: AnyProcedure, contract: An
|
|
|
362
204
|
* ```
|
|
363
205
|
*
|
|
364
206
|
*/
|
|
365
|
-
declare function call<TInitialContext extends Context,
|
|
207
|
+
declare function call<TInitialContext extends Context, TSchemas extends Schemas, TMeta extends Meta>(procedure: Lazyable<Procedure<TInitialContext, any, TSchemas, TMeta>>, input: InferProcedureClientInputs<TSchemas>, ...rest: MaybeOptionalOptions<CreateProcedureClientOptions<TInitialContext, {}> & Omit<ClientOptions<{}>, 'context'>>): Promise<InferSchemaOutput<TSchemas['outputSchema']>>;
|
|
366
208
|
|
|
367
|
-
type RouterClient<TRouter extends AnyRouter, TClientContext extends ClientContext =
|
|
209
|
+
type RouterClient<TRouter extends AnyRouter, TClientContext extends ClientContext = {}> = TRouter extends Procedure<any, any, infer USchemas, any> ? ProcedureClient<TClientContext, USchemas> : {
|
|
368
210
|
[K in keyof TRouter]: TRouter[K] extends Lazyable<infer U extends AnyRouter> ? RouterClient<U, TClientContext> : never;
|
|
369
211
|
};
|
|
370
212
|
/**
|
|
@@ -372,10 +214,31 @@ type RouterClient<TRouter extends AnyRouter, TClientContext extends ClientContex
|
|
|
372
214
|
*
|
|
373
215
|
* @see {@link https://orpc.unnoq.com/docs/client/server-side Server-side Client Docs}
|
|
374
216
|
*/
|
|
375
|
-
declare function createRouterClient<T extends AnyRouter, TClientContext extends ClientContext>(router: Lazyable<T | undefined>, ...rest: MaybeOptionalOptions<CreateProcedureClientOptions<InferRouterInitialContext<T>,
|
|
217
|
+
declare function createRouterClient<T extends AnyRouter, TClientContext extends ClientContext>(router: Lazyable<T | undefined>, ...rest: MaybeOptionalOptions<CreateProcedureClientOptions<InferRouterInitialContext<T>, TClientContext>>): RouterClient<T, TClientContext>;
|
|
376
218
|
|
|
377
|
-
declare function
|
|
378
|
-
|
|
219
|
+
declare function isSchemaIssue(issue: unknown): issue is SchemaIssue;
|
|
220
|
+
|
|
221
|
+
type HTTPEndpoint = `${HTTPMethod} ${HTTPPath}`;
|
|
222
|
+
declare const endpointRegex: RegExp;
|
|
223
|
+
/**
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
|
+
declare function standardizeHTTPPath(path: HTTPPath): HTTPPath;
|
|
227
|
+
/**
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
declare function getDynamicParams(path: HTTPPath | undefined): {
|
|
231
|
+
raw: string;
|
|
232
|
+
name: string;
|
|
233
|
+
}[] | undefined;
|
|
234
|
+
/**
|
|
235
|
+
* @internal
|
|
236
|
+
*/
|
|
237
|
+
declare function parseEndpointDefinition(stringsOrEndpoint: TemplateStringsArray | HTTPEndpoint, values: AnyShape[] | [AnySchema | AnyShape] | []): {
|
|
238
|
+
method: HTTPMethod;
|
|
239
|
+
path: HTTPPath;
|
|
240
|
+
pathSchema: AnySchema;
|
|
241
|
+
};
|
|
379
242
|
|
|
380
|
-
export { AnyMiddleware, AnyProcedure, AnyRouter, Builder, BuilderWithMiddlewares, Context,
|
|
381
|
-
export type {
|
|
243
|
+
export { AnyMiddleware, AnyProcedure, AnyRouter, AnySchema, AnyShape, BuildContextWithAuth, Builder, BuilderWithMiddlewares, Context, Contract, ContractDef, DecoratedProcedure, EnhanceRouterOptions, EnhancedRouter, InferHandlerInputs, InferProcedureClientInputs, InferRouterInitialContext, InferSchemaInput, InferSchemaOutput, Lazy, Lazyable, MapInputMiddleware, MergedCurrentContext, MergedInitialContext, MergedSchemas, Meta, Middleware, Procedure, ProcedureBuilder, ProcedureHandler, Router, Schema, SchemaIssue, Schemas, UnionToIntersection, ValidationError, WrapShape, addMiddleware, baseApi, call, createAssertedLazyProcedure, createProcedureClient, createRouterClient, decorateMiddleware, endpointRegex, eventIterator, getDynamicParams, getEventIteratorSchemaDetails, isSchemaIssue, isStartWithMiddlewares, mergeMiddlewares, parseEndpointDefinition, standardizeHTTPPath };
|
|
244
|
+
export type { BuilderDef, CreateProcedureClientOptions, DecoratedMiddleware, EventIteratorSchemaDetails, HTTPEndpoint, ProcedureClient, RouterBuilder, RouterClient, ValidationErrorOptions };
|