@temporary-name/server 1.9.3-alpha.0d2fa3247b6b23bbc2e3097a95f631b86740e4d8 → 1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52
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/index.d.mts +4 -106
- package/dist/index.d.ts +4 -106
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -140,7 +140,7 @@ interface BuilderWithMiddlewares<TInitialContext extends Context, TCurrentContex
|
|
|
140
140
|
*
|
|
141
141
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
142
142
|
*/
|
|
143
|
-
'output'<USchema extends AnySchema>(schema: USchema):
|
|
143
|
+
'output'<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
|
|
144
144
|
/**
|
|
145
145
|
* Defines the handler of the procedure.
|
|
146
146
|
*
|
|
@@ -226,7 +226,7 @@ interface ProcedureBuilder<TInitialContext extends Context, TCurrentContext exte
|
|
|
226
226
|
*
|
|
227
227
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
228
228
|
*/
|
|
229
|
-
'output'<USchema extends AnySchema>(schema: USchema):
|
|
229
|
+
'output'<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
|
|
230
230
|
/**
|
|
231
231
|
* Defines the handler of the procedure.
|
|
232
232
|
*
|
|
@@ -234,108 +234,6 @@ interface ProcedureBuilder<TInitialContext extends Context, TCurrentContext exte
|
|
|
234
234
|
*/
|
|
235
235
|
'handler'<UFuncOutput>(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, UFuncOutput, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, Schema<UFuncOutput, UFuncOutput>, TErrorMap, TMeta>;
|
|
236
236
|
}
|
|
237
|
-
interface ProcedureBuilderWithOutput<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
|
|
238
|
-
/**
|
|
239
|
-
* This property holds the defined options.
|
|
240
|
-
*/
|
|
241
|
-
'~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
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): ProcedureBuilderWithOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta, TGateName>;
|
|
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, InferSchemaInput<TOutputSchema>, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ProcedureBuilderWithOutput<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
257
|
-
/**
|
|
258
|
-
* Sets or updates the metadata.
|
|
259
|
-
* The provided metadata is spared-merged with any existing metadata.
|
|
260
|
-
*
|
|
261
|
-
* @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
|
|
262
|
-
*/
|
|
263
|
-
'meta'(meta: TMeta): ProcedureBuilderWithOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
264
|
-
/**
|
|
265
|
-
* Sets or updates the route definition.
|
|
266
|
-
* The provided route is spared-merged with any existing route.
|
|
267
|
-
* This option is typically relevant when integrating with OpenAPI.
|
|
268
|
-
*
|
|
269
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
|
|
270
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
|
|
271
|
-
*/
|
|
272
|
-
'route'(route: Route): ProcedureBuilderWithOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
273
|
-
/**
|
|
274
|
-
* Defines the input validation schema.
|
|
275
|
-
*
|
|
276
|
-
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Input Validation Docs}
|
|
277
|
-
*/
|
|
278
|
-
'input'<USchema extends AnySchema>(schema: USchema): ProcedureBuilderWithInputOutput<TInitialContext, TCurrentContext, USchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
279
|
-
/**
|
|
280
|
-
* Defines the handler of the procedure.
|
|
281
|
-
*
|
|
282
|
-
* @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
|
|
283
|
-
*/
|
|
284
|
-
'handler'(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
285
|
-
}
|
|
286
|
-
interface ProcedureBuilderWithInputOutput<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
|
|
287
|
-
/**
|
|
288
|
-
* This property holds the defined options.
|
|
289
|
-
*/
|
|
290
|
-
'~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
291
|
-
/**
|
|
292
|
-
* Adds type-safe custom errors.
|
|
293
|
-
* The provided errors are spared-merged with any existing errors.
|
|
294
|
-
*
|
|
295
|
-
* @see {@link https://orpc.unnoq.com/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
|
|
296
|
-
*/
|
|
297
|
-
'errors'<U extends ErrorMap>(errors: U): ProcedureBuilderWithInputOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta, TGateName>;
|
|
298
|
-
/**
|
|
299
|
-
* Uses a middleware to modify the context or improve the pipeline.
|
|
300
|
-
*
|
|
301
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
302
|
-
* @info Pass second argument to map the input.
|
|
303
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
304
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
305
|
-
*/
|
|
306
|
-
'use'<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ProcedureBuilderWithInputOutput<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
307
|
-
/**
|
|
308
|
-
* Uses a middleware to modify the context or improve the pipeline.
|
|
309
|
-
*
|
|
310
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
311
|
-
* @info Pass second argument to map the input.
|
|
312
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
313
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
314
|
-
*/
|
|
315
|
-
'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>): ProcedureBuilderWithInputOutput<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
316
|
-
/**
|
|
317
|
-
* Sets or updates the metadata.
|
|
318
|
-
* The provided metadata is spared-merged with any existing metadata.
|
|
319
|
-
*
|
|
320
|
-
* @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
|
|
321
|
-
*/
|
|
322
|
-
'meta'(meta: TMeta): ProcedureBuilderWithInputOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
323
|
-
/**
|
|
324
|
-
* Sets or updates the route definition.
|
|
325
|
-
* The provided route is spared-merged with any existing route.
|
|
326
|
-
* This option is typically relevant when integrating with OpenAPI.
|
|
327
|
-
*
|
|
328
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
|
|
329
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
|
|
330
|
-
*/
|
|
331
|
-
'route'(route: Route): ProcedureBuilderWithInputOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
332
|
-
/**
|
|
333
|
-
* Defines the handler of the procedure.
|
|
334
|
-
*
|
|
335
|
-
* @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
|
|
336
|
-
*/
|
|
337
|
-
'handler'(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
338
|
-
}
|
|
339
237
|
interface RouterBuilder<TInitialContext extends Context, TCurrentContext extends Context, TErrorMap extends ErrorMap, TMeta extends Meta> {
|
|
340
238
|
/**
|
|
341
239
|
* This property holds the defined options.
|
|
@@ -480,7 +378,7 @@ declare class Builder<TInitialContext extends Context, TCurrentContext extends C
|
|
|
480
378
|
*
|
|
481
379
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
482
380
|
*/
|
|
483
|
-
output<USchema extends AnySchema>(schema: USchema):
|
|
381
|
+
output<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
|
|
484
382
|
/**
|
|
485
383
|
* Defines the handler of the procedure.
|
|
486
384
|
*
|
|
@@ -702,4 +600,4 @@ declare function setHiddenRouterContract<T extends Lazyable<AnyRouter>>(router:
|
|
|
702
600
|
declare function getHiddenRouterContract(router: Lazyable<AnyRouter | AnyContractRouter>): AnyContractRouter | undefined;
|
|
703
601
|
|
|
704
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 };
|
|
705
|
-
export type { AccessibleLazyRouter, ApiBuilder, BuilderDef, BuilderWithMiddlewares, ContractProcedureCallbackOptions, DecoratedMiddleware, EnhanceRouterOptions, EnhancedRouter, ImplementedProcedure, Implementer, ImplementerInternal, ImplementerInternalWithMiddlewares, LazyTraverseContractProceduresOptions, ProcedureBuilder,
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -140,7 +140,7 @@ interface BuilderWithMiddlewares<TInitialContext extends Context, TCurrentContex
|
|
|
140
140
|
*
|
|
141
141
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
142
142
|
*/
|
|
143
|
-
'output'<USchema extends AnySchema>(schema: USchema):
|
|
143
|
+
'output'<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
|
|
144
144
|
/**
|
|
145
145
|
* Defines the handler of the procedure.
|
|
146
146
|
*
|
|
@@ -226,7 +226,7 @@ interface ProcedureBuilder<TInitialContext extends Context, TCurrentContext exte
|
|
|
226
226
|
*
|
|
227
227
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
228
228
|
*/
|
|
229
|
-
'output'<USchema extends AnySchema>(schema: USchema):
|
|
229
|
+
'output'<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
|
|
230
230
|
/**
|
|
231
231
|
* Defines the handler of the procedure.
|
|
232
232
|
*
|
|
@@ -234,108 +234,6 @@ interface ProcedureBuilder<TInitialContext extends Context, TCurrentContext exte
|
|
|
234
234
|
*/
|
|
235
235
|
'handler'<UFuncOutput>(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, UFuncOutput, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, Schema<UFuncOutput, UFuncOutput>, TErrorMap, TMeta>;
|
|
236
236
|
}
|
|
237
|
-
interface ProcedureBuilderWithOutput<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
|
|
238
|
-
/**
|
|
239
|
-
* This property holds the defined options.
|
|
240
|
-
*/
|
|
241
|
-
'~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
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): ProcedureBuilderWithOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta, TGateName>;
|
|
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, InferSchemaInput<TOutputSchema>, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ProcedureBuilderWithOutput<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
257
|
-
/**
|
|
258
|
-
* Sets or updates the metadata.
|
|
259
|
-
* The provided metadata is spared-merged with any existing metadata.
|
|
260
|
-
*
|
|
261
|
-
* @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
|
|
262
|
-
*/
|
|
263
|
-
'meta'(meta: TMeta): ProcedureBuilderWithOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
264
|
-
/**
|
|
265
|
-
* Sets or updates the route definition.
|
|
266
|
-
* The provided route is spared-merged with any existing route.
|
|
267
|
-
* This option is typically relevant when integrating with OpenAPI.
|
|
268
|
-
*
|
|
269
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
|
|
270
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
|
|
271
|
-
*/
|
|
272
|
-
'route'(route: Route): ProcedureBuilderWithOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
273
|
-
/**
|
|
274
|
-
* Defines the input validation schema.
|
|
275
|
-
*
|
|
276
|
-
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Input Validation Docs}
|
|
277
|
-
*/
|
|
278
|
-
'input'<USchema extends AnySchema>(schema: USchema): ProcedureBuilderWithInputOutput<TInitialContext, TCurrentContext, USchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
279
|
-
/**
|
|
280
|
-
* Defines the handler of the procedure.
|
|
281
|
-
*
|
|
282
|
-
* @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
|
|
283
|
-
*/
|
|
284
|
-
'handler'(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
285
|
-
}
|
|
286
|
-
interface ProcedureBuilderWithInputOutput<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
|
|
287
|
-
/**
|
|
288
|
-
* This property holds the defined options.
|
|
289
|
-
*/
|
|
290
|
-
'~orpc': BuilderDef<TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
291
|
-
/**
|
|
292
|
-
* Adds type-safe custom errors.
|
|
293
|
-
* The provided errors are spared-merged with any existing errors.
|
|
294
|
-
*
|
|
295
|
-
* @see {@link https://orpc.unnoq.com/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
|
|
296
|
-
*/
|
|
297
|
-
'errors'<U extends ErrorMap>(errors: U): ProcedureBuilderWithInputOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta, TGateName>;
|
|
298
|
-
/**
|
|
299
|
-
* Uses a middleware to modify the context or improve the pipeline.
|
|
300
|
-
*
|
|
301
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
302
|
-
* @info Pass second argument to map the input.
|
|
303
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
304
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
305
|
-
*/
|
|
306
|
-
'use'<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext | TCurrentContext, UOutContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ProcedureBuilderWithInputOutput<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
307
|
-
/**
|
|
308
|
-
* Uses a middleware to modify the context or improve the pipeline.
|
|
309
|
-
*
|
|
310
|
-
* @info Supports both normal middleware and inline middleware implementations.
|
|
311
|
-
* @info Pass second argument to map the input.
|
|
312
|
-
* @note The current context must be satisfy middleware dependent-context
|
|
313
|
-
* @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
|
|
314
|
-
*/
|
|
315
|
-
'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>): ProcedureBuilderWithInputOutput<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
316
|
-
/**
|
|
317
|
-
* Sets or updates the metadata.
|
|
318
|
-
* The provided metadata is spared-merged with any existing metadata.
|
|
319
|
-
*
|
|
320
|
-
* @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
|
|
321
|
-
*/
|
|
322
|
-
'meta'(meta: TMeta): ProcedureBuilderWithInputOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
323
|
-
/**
|
|
324
|
-
* Sets or updates the route definition.
|
|
325
|
-
* The provided route is spared-merged with any existing route.
|
|
326
|
-
* This option is typically relevant when integrating with OpenAPI.
|
|
327
|
-
*
|
|
328
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
|
|
329
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
|
|
330
|
-
*/
|
|
331
|
-
'route'(route: Route): ProcedureBuilderWithInputOutput<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta, TGateName>;
|
|
332
|
-
/**
|
|
333
|
-
* Defines the handler of the procedure.
|
|
334
|
-
*
|
|
335
|
-
* @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
|
|
336
|
-
*/
|
|
337
|
-
'handler'(handler: ProcedureHandler<TCurrentContext, InferSchemaOutput<TInputSchema>, InferSchemaInput<TOutputSchema>, TErrorMap, TMeta>): DecoratedProcedure<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
|
338
|
-
}
|
|
339
237
|
interface RouterBuilder<TInitialContext extends Context, TCurrentContext extends Context, TErrorMap extends ErrorMap, TMeta extends Meta> {
|
|
340
238
|
/**
|
|
341
239
|
* This property holds the defined options.
|
|
@@ -480,7 +378,7 @@ declare class Builder<TInitialContext extends Context, TCurrentContext extends C
|
|
|
480
378
|
*
|
|
481
379
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
482
380
|
*/
|
|
483
|
-
output<USchema extends AnySchema>(schema: USchema):
|
|
381
|
+
output<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
|
|
484
382
|
/**
|
|
485
383
|
* Defines the handler of the procedure.
|
|
486
384
|
*
|
|
@@ -702,4 +600,4 @@ declare function setHiddenRouterContract<T extends Lazyable<AnyRouter>>(router:
|
|
|
702
600
|
declare function getHiddenRouterContract(router: Lazyable<AnyRouter | AnyContractRouter>): AnyContractRouter | undefined;
|
|
703
601
|
|
|
704
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 };
|
|
705
|
-
export type { AccessibleLazyRouter, ApiBuilder, BuilderDef, BuilderWithMiddlewares, ContractProcedureCallbackOptions, DecoratedMiddleware, EnhanceRouterOptions, EnhancedRouter, ImplementedProcedure, Implementer, ImplementerInternal, ImplementerInternalWithMiddlewares, LazyTraverseContractProceduresOptions, ProcedureBuilder,
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporary-name/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.9.3-alpha.
|
|
4
|
+
"version": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.stainless.com/",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/stainless-api/krusty.git",
|
|
10
10
|
"directory": "packages/server"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
"cookie": "^1.0.2",
|
|
69
69
|
"@standard-schema/spec": "^1.0.0",
|
|
70
70
|
"zod": "^4.1.12",
|
|
71
|
-
"@temporary-name/
|
|
72
|
-
"@temporary-name/
|
|
73
|
-
"@temporary-name/
|
|
74
|
-
"@temporary-name/
|
|
75
|
-
"@temporary-name/standard-server": "1.9.3-alpha.
|
|
76
|
-
"@temporary-name/standard-server-
|
|
77
|
-
"@temporary-name/standard-server-
|
|
78
|
-
"@temporary-name/
|
|
71
|
+
"@temporary-name/interop": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52",
|
|
72
|
+
"@temporary-name/contract": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52",
|
|
73
|
+
"@temporary-name/shared": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52",
|
|
74
|
+
"@temporary-name/standard-server": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52",
|
|
75
|
+
"@temporary-name/standard-server-aws-lambda": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52",
|
|
76
|
+
"@temporary-name/standard-server-fetch": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52",
|
|
77
|
+
"@temporary-name/standard-server-node": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52",
|
|
78
|
+
"@temporary-name/openapi": "1.9.3-alpha.30822ad82102dcf9276d473ba372416778807e52"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@types/ws": "^8.18.1",
|