@temporary-name/server 1.9.3-alpha.4275e976ddda4d8be107c2cfde9899bdea9a337d → 1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649
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 -53
- package/dist/index.d.ts +4 -53
- package/package.json +11 -12
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,55 +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
237
|
interface ProcedureBuilderWithInputOutput<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
|
|
287
238
|
/**
|
|
288
239
|
* This property holds the defined options.
|
|
@@ -480,7 +431,7 @@ declare class Builder<TInitialContext extends Context, TCurrentContext extends C
|
|
|
480
431
|
*
|
|
481
432
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
482
433
|
*/
|
|
483
|
-
output<USchema extends AnySchema>(schema: USchema):
|
|
434
|
+
output<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
|
|
484
435
|
/**
|
|
485
436
|
* Defines the handler of the procedure.
|
|
486
437
|
*
|
|
@@ -702,4 +653,4 @@ declare function setHiddenRouterContract<T extends Lazyable<AnyRouter>>(router:
|
|
|
702
653
|
declare function getHiddenRouterContract(router: Lazyable<AnyRouter | AnyContractRouter>): AnyContractRouter | undefined;
|
|
703
654
|
|
|
704
655
|
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, ProcedureBuilderWithInputOutput,
|
|
656
|
+
export type { AccessibleLazyRouter, ApiBuilder, BuilderDef, BuilderWithMiddlewares, ContractProcedureCallbackOptions, DecoratedMiddleware, EnhanceRouterOptions, EnhancedRouter, ImplementedProcedure, Implementer, ImplementerInternal, ImplementerInternalWithMiddlewares, LazyTraverseContractProceduresOptions, ProcedureBuilder, ProcedureBuilderWithInputOutput, 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,55 +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
237
|
interface ProcedureBuilderWithInputOutput<TInitialContext extends Context, TCurrentContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TGateName extends string> {
|
|
287
238
|
/**
|
|
288
239
|
* This property holds the defined options.
|
|
@@ -480,7 +431,7 @@ declare class Builder<TInitialContext extends Context, TCurrentContext extends C
|
|
|
480
431
|
*
|
|
481
432
|
* @see {@link https://orpc.unnoq.com/docs/procedure#input-output-validation Output Validation Docs}
|
|
482
433
|
*/
|
|
483
|
-
output<USchema extends AnySchema>(schema: USchema):
|
|
434
|
+
output<USchema extends AnySchema>(schema: USchema): ProcedureBuilder<TInitialContext, TCurrentContext, TInputSchema, USchema, TErrorMap, TMeta, TGateName>;
|
|
484
435
|
/**
|
|
485
436
|
* Defines the handler of the procedure.
|
|
486
437
|
*
|
|
@@ -702,4 +653,4 @@ declare function setHiddenRouterContract<T extends Lazyable<AnyRouter>>(router:
|
|
|
702
653
|
declare function getHiddenRouterContract(router: Lazyable<AnyRouter | AnyContractRouter>): AnyContractRouter | undefined;
|
|
703
654
|
|
|
704
655
|
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, ProcedureBuilderWithInputOutput,
|
|
656
|
+
export type { AccessibleLazyRouter, ApiBuilder, BuilderDef, BuilderWithMiddlewares, ContractProcedureCallbackOptions, DecoratedMiddleware, EnhanceRouterOptions, EnhancedRouter, ImplementedProcedure, Implementer, ImplementerInternal, ImplementerInternalWithMiddlewares, LazyTraverseContractProceduresOptions, ProcedureBuilder, ProcedureBuilderWithInputOutput, 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.6ef4729e23affbe6454d37025d1dfc4d998b0649",
|
|
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,19 +68,18 @@
|
|
|
68
68
|
"cookie": "^1.0.2",
|
|
69
69
|
"@standard-schema/spec": "^1.0.0",
|
|
70
70
|
"zod": "^4.1.12",
|
|
71
|
-
"@temporary-name/contract": "1.9.3-alpha.
|
|
72
|
-
"@temporary-name/interop": "1.9.3-alpha.
|
|
73
|
-
"@temporary-name/
|
|
74
|
-
"@temporary-name/standard-server": "1.9.3-alpha.
|
|
75
|
-
"@temporary-name/standard-server-
|
|
76
|
-
"@temporary-name/
|
|
77
|
-
"@temporary-name/
|
|
78
|
-
"@temporary-name/standard-server-node": "1.9.3-alpha.
|
|
71
|
+
"@temporary-name/contract": "1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649",
|
|
72
|
+
"@temporary-name/interop": "1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649",
|
|
73
|
+
"@temporary-name/shared": "1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649",
|
|
74
|
+
"@temporary-name/standard-server": "1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649",
|
|
75
|
+
"@temporary-name/standard-server-fetch": "1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649",
|
|
76
|
+
"@temporary-name/standard-server-aws-lambda": "1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649",
|
|
77
|
+
"@temporary-name/openapi": "1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649",
|
|
78
|
+
"@temporary-name/standard-server-node": "1.9.3-alpha.6ef4729e23affbe6454d37025d1dfc4d998b0649"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@types/ws": "^8.18.1",
|
|
82
|
-
"supertest": "^7.1.4"
|
|
83
|
-
"type-fest": "^5.0.1"
|
|
82
|
+
"supertest": "^7.1.4"
|
|
84
83
|
},
|
|
85
84
|
"scripts": {
|
|
86
85
|
"build": "unbuild",
|