@trpc/server 11.0.0-next-beta.251 → 11.0.0-next-beta.254

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.
Files changed (60) hide show
  1. package/dist/adapters/aws-lambda/index.js +2 -2
  2. package/dist/adapters/aws-lambda/index.mjs +2 -2
  3. package/dist/adapters/aws-lambda/utils.js +1 -1
  4. package/dist/adapters/aws-lambda/utils.mjs +1 -1
  5. package/dist/adapters/fastify/fastifyRequestHandler.js +1 -1
  6. package/dist/adapters/fastify/fastifyRequestHandler.mjs +1 -1
  7. package/dist/adapters/fetch/fetchRequestHandler.js +1 -1
  8. package/dist/adapters/fetch/fetchRequestHandler.mjs +1 -1
  9. package/dist/adapters/next.js +2 -2
  10. package/dist/adapters/next.mjs +2 -2
  11. package/dist/adapters/node-http/content-type/json/getPostBody.js +1 -1
  12. package/dist/adapters/node-http/content-type/json/getPostBody.mjs +1 -1
  13. package/dist/adapters/node-http/content-type/json/index.js +1 -1
  14. package/dist/adapters/node-http/content-type/json/index.mjs +1 -1
  15. package/dist/adapters/node-http/nodeHTTPRequestHandler.js +1 -1
  16. package/dist/adapters/node-http/nodeHTTPRequestHandler.mjs +1 -1
  17. package/dist/adapters/ws.js +4 -4
  18. package/dist/adapters/ws.mjs +4 -4
  19. package/dist/bundle-analysis.json +74 -58
  20. package/dist/http.js +1 -1
  21. package/dist/http.mjs +1 -1
  22. package/dist/index.js +10 -10
  23. package/dist/index.mjs +5 -5
  24. package/dist/shared.js +3 -3
  25. package/dist/shared.mjs +2 -2
  26. package/dist/unstable-core-do-not-import/clientish/inference.d.ts +17 -0
  27. package/dist/unstable-core-do-not-import/clientish/inference.d.ts.map +1 -0
  28. package/dist/unstable-core-do-not-import/clientish/inferrable.d.ts +33 -0
  29. package/dist/unstable-core-do-not-import/clientish/inferrable.d.ts.map +1 -0
  30. package/dist/unstable-core-do-not-import/{serialize.d.ts → clientish/serialize.d.ts} +1 -1
  31. package/dist/unstable-core-do-not-import/clientish/serialize.d.ts.map +1 -0
  32. package/dist/unstable-core-do-not-import/procedure.d.ts +0 -9
  33. package/dist/unstable-core-do-not-import/procedure.d.ts.map +1 -1
  34. package/dist/unstable-core-do-not-import/rootConfig.d.ts +1 -1
  35. package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +1 -1
  36. package/dist/unstable-core-do-not-import/router.d.ts +1 -6
  37. package/dist/unstable-core-do-not-import/router.d.ts.map +1 -1
  38. package/dist/unstable-core-do-not-import/types.js +11 -0
  39. package/dist/unstable-core-do-not-import/types.mjs +9 -0
  40. package/dist/unstable-core-do-not-import.d.ts +31 -0
  41. package/dist/unstable-core-do-not-import.d.ts.map +1 -0
  42. package/dist/unstable-core-do-not-import.js +64 -0
  43. package/dist/unstable-core-do-not-import.mjs +20 -0
  44. package/package.json +5 -5
  45. package/src/unstable-core-do-not-import/clientish/inference.ts +56 -0
  46. package/src/unstable-core-do-not-import/clientish/inferrable.ts +55 -0
  47. package/src/unstable-core-do-not-import/{serialize.ts → clientish/serialize.ts} +1 -1
  48. package/src/unstable-core-do-not-import/procedure.ts +0 -21
  49. package/src/unstable-core-do-not-import/rootConfig.ts +1 -1
  50. package/src/unstable-core-do-not-import/router.ts +1 -33
  51. package/src/unstable-core-do-not-import.ts +30 -0
  52. package/dist/unstable-core-do-not-import/TRPCInferrable.d.ts +0 -27
  53. package/dist/unstable-core-do-not-import/TRPCInferrable.d.ts.map +0 -1
  54. package/dist/unstable-core-do-not-import/index.d.ts +0 -38
  55. package/dist/unstable-core-do-not-import/index.d.ts.map +0 -1
  56. package/dist/unstable-core-do-not-import/index.js +0 -52
  57. package/dist/unstable-core-do-not-import/index.mjs +0 -17
  58. package/dist/unstable-core-do-not-import/serialize.d.ts.map +0 -1
  59. package/src/unstable-core-do-not-import/TRPCInferrable.ts +0 -44
  60. package/src/unstable-core-do-not-import/index.ts +0 -105
@@ -1,27 +0,0 @@
1
- import type { AnyRootTypes, RootConfig } from './rootConfig';
2
- /**
3
- * Result of `initTRPC.create()`
4
- */
5
- type InitLike = {
6
- _config: RootConfig<AnyRootTypes>;
7
- };
8
- /**
9
- * Result of `initTRPC.create().router()`
10
- */
11
- type RouterLike = {
12
- _def: InitLike;
13
- };
14
- /**
15
- * Result of `initTRPC.create()._config`
16
- */
17
- type RootConfigLike = {
18
- $types: AnyRootTypes;
19
- };
20
- /**
21
- * Anything that can be inferred to the root config types
22
- */
23
- export type TRPCInferrable = RouterLike | InitLike | RootConfigLike | AnyRootTypes;
24
- export type inferRootTypes<TInferrable extends TRPCInferrable> = TInferrable extends AnyRootTypes ? TInferrable : TInferrable extends RootConfigLike ? TInferrable['$types'] : TInferrable extends InitLike ? TInferrable['_config']['$types'] : TInferrable extends RouterLike ? TInferrable['_def']['_config']['$types'] : never;
25
- export type inferErrorShape<TInferrable extends TRPCInferrable> = inferRootTypes<TInferrable>['errorShape'];
26
- export {};
27
- //# sourceMappingURL=TRPCInferrable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TRPCInferrable.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/TRPCInferrable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,QAAQ,GACR,cAAc,GACd,YAAY,CAAC;AAEjB,MAAM,MAAM,cAAc,CAAC,WAAW,SAAS,cAAc,IAC3D,WAAW,SAAS,YAAY,GAC5B,WAAW,GACX,WAAW,SAAS,cAAc,GAClC,WAAW,CAAC,QAAQ,CAAC,GACrB,WAAW,SAAS,QAAQ,GAC5B,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GAChC,WAAW,SAAS,UAAU,GAC9B,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GACxC,KAAK,CAAC;AAEZ,MAAM,MAAM,eAAe,CAAC,WAAW,SAAS,cAAc,IAC5D,cAAc,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC"}
@@ -1,38 +0,0 @@
1
- /**
2
- * **DO NOT IMPORT FROM HERE FILE**
3
- *
4
- * This file is here to:
5
- * - make TypeScript happy and prevent _"The inferred type of 'createContext' cannot be named without a reference to [...]"_.
6
- * - the the glue between the official `@trpc/*`-packages
7
- *
8
- *
9
- * If you seem to need to import anything from here, please open an issue at https://github.com/trpc/trpc/issues
10
- */
11
- export { TRPCError, getCauseFromUnknown, getTRPCErrorFromUnknown, } from './error/TRPCError';
12
- export type { DefaultErrorData, DefaultErrorShape } from './error/formatter';
13
- export { getErrorShape } from './error/getErrorShape';
14
- export { initTRPC } from './initTRPC';
15
- export { createInputMiddleware, createOutputMiddleware, experimental_standaloneMiddleware, middlewareMarker, } from './middleware';
16
- export type { AnyMiddlewareFunction, MiddlewareBuilder, MiddlewareFunction, } from './middleware';
17
- export type { inferParser } from './parser';
18
- export { procedureTypes } from './procedure';
19
- export type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnySubscriptionProcedure, MutationProcedure, Procedure, ProcedureOptions, ProcedureType, QueryProcedure, SubscriptionProcedure, inferProcedureInput, inferProcedureOutput, inferProcedureParams, inferTransformedProcedureOutput, inferTransformedSubscriptionOutput, } from './procedure';
20
- export { createBuilder, unsetMarker } from './procedureBuilder';
21
- export type { ProcedureBuilder } from './procedureBuilder';
22
- export * from './rootConfig';
23
- export type { AnyRouter, Router, RouterCaller, createRouterFactory, inferRouterContext, inferRouterError, inferRouterInputs, inferRouterMeta, inferRouterOutputs, } from './router';
24
- export * from './TRPCInferrable';
25
- export * from './router';
26
- export { transformResult, transformTRPCResponse } from './transformer';
27
- export type { CombinedDataTransformer, CombinedDataTransformerClient, DataTransformer, DataTransformerOptions, } from './transformer';
28
- export { createFlatProxy, createRecursiveProxy } from './createProxy';
29
- export type { Serialize, SerializeObject } from './serialize';
30
- export type { DeepPartial, Dict, DistributiveOmit, Filter, FilterKeys, IntersectionError, Maybe, MaybePromise, Overwrite, PickFirstDefined, ProtectedIntersection, Simplify, Unwrap, ValidateShape, WithoutIndexSignature, TypeError, } from './types';
31
- export { isObject } from './utils';
32
- export * from './TRPCInferrable';
33
- /**
34
- * These should be re-exported from separate entrypoints in server package
35
- */
36
- export * from './http';
37
- export * from './rpc';
38
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,iCAAiC,EACjC,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,cAAc,cAAc,CAAC;AAC7B,YAAY,EACV,SAAS,EACT,MAAM,EACN,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAElB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvE,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,eAAe,EACf,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGtE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9D,YAAY,EACV,WAAW,EACX,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,KAAK,EACL,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,QAAQ,EACR,MAAM,EACN,aAAa,EACb,qBAAqB,EACrB,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,cAAc,kBAAkB,CAAC;AACjC;;GAEG;AACH,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC"}
@@ -1,52 +0,0 @@
1
- 'use strict';
2
-
3
- var TRPCError = require('./error/TRPCError.js');
4
- var getErrorShape = require('./error/getErrorShape.js');
5
- var initTRPC = require('./initTRPC.js');
6
- var middleware = require('./middleware.js');
7
- var procedure = require('./procedure.js');
8
- var procedureBuilder = require('./procedureBuilder.js');
9
- var rootConfig = require('./rootConfig.js');
10
- var router = require('./router.js');
11
- var transformer = require('./transformer.js');
12
- var createProxy = require('./createProxy.js');
13
- var utils = require('./utils.js');
14
- var getHTTPStatusCode = require('./http/getHTTPStatusCode.js');
15
- var resolveHTTPResponse = require('./http/resolveHTTPResponse.js');
16
- var batchStreamFormatter = require('./http/batchStreamFormatter.js');
17
- var contentType = require('./http/contentType.js');
18
- var codes = require('./rpc/codes.js');
19
- var parseTRPCMessage = require('./rpc/parseTRPCMessage.js');
20
-
21
-
22
-
23
- exports.TRPCError = TRPCError.TRPCError;
24
- exports.getCauseFromUnknown = TRPCError.getCauseFromUnknown;
25
- exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
26
- exports.getErrorShape = getErrorShape.getErrorShape;
27
- exports.initTRPC = initTRPC.initTRPC;
28
- exports.createInputMiddleware = middleware.createInputMiddleware;
29
- exports.createOutputMiddleware = middleware.createOutputMiddleware;
30
- exports.experimental_standaloneMiddleware = middleware.experimental_standaloneMiddleware;
31
- exports.middlewareMarker = middleware.middlewareMarker;
32
- exports.procedureTypes = procedure.procedureTypes;
33
- exports.createBuilder = procedureBuilder.createBuilder;
34
- exports.unsetMarker = procedureBuilder.unsetMarker;
35
- exports.isServerDefault = rootConfig.isServerDefault;
36
- exports.callProcedure = router.callProcedure;
37
- exports.createCallerFactory = router.createCallerFactory;
38
- exports.createRouterFactory = router.createRouterFactory;
39
- exports.mergeRouters = router.mergeRouters;
40
- exports.transformResult = transformer.transformResult;
41
- exports.transformTRPCResponse = transformer.transformTRPCResponse;
42
- exports.createFlatProxy = createProxy.createFlatProxy;
43
- exports.createRecursiveProxy = createProxy.createRecursiveProxy;
44
- exports.isObject = utils.isObject;
45
- exports.getHTTPStatusCode = getHTTPStatusCode.getHTTPStatusCode;
46
- exports.getHTTPStatusCodeFromError = getHTTPStatusCode.getHTTPStatusCodeFromError;
47
- exports.resolveHTTPResponse = resolveHTTPResponse.resolveHTTPResponse;
48
- exports.getBatchStreamFormatter = batchStreamFormatter.getBatchStreamFormatter;
49
- exports.getJsonContentTypeInputs = contentType.getJsonContentTypeInputs;
50
- exports.TRPC_ERROR_CODES_BY_KEY = codes.TRPC_ERROR_CODES_BY_KEY;
51
- exports.TRPC_ERROR_CODES_BY_NUMBER = codes.TRPC_ERROR_CODES_BY_NUMBER;
52
- exports.parseTRPCMessage = parseTRPCMessage.parseTRPCMessage;
@@ -1,17 +0,0 @@
1
- export { TRPCError, getCauseFromUnknown, getTRPCErrorFromUnknown } from './error/TRPCError.mjs';
2
- export { getErrorShape } from './error/getErrorShape.mjs';
3
- export { initTRPC } from './initTRPC.mjs';
4
- export { createInputMiddleware, createOutputMiddleware, experimental_standaloneMiddleware, middlewareMarker } from './middleware.mjs';
5
- export { procedureTypes } from './procedure.mjs';
6
- export { createBuilder, unsetMarker } from './procedureBuilder.mjs';
7
- export { isServerDefault } from './rootConfig.mjs';
8
- export { callProcedure, createCallerFactory, createRouterFactory, mergeRouters } from './router.mjs';
9
- export { transformResult, transformTRPCResponse } from './transformer.mjs';
10
- export { createFlatProxy, createRecursiveProxy } from './createProxy.mjs';
11
- export { isObject } from './utils.mjs';
12
- export { getHTTPStatusCode, getHTTPStatusCodeFromError } from './http/getHTTPStatusCode.mjs';
13
- export { resolveHTTPResponse } from './http/resolveHTTPResponse.mjs';
14
- export { getBatchStreamFormatter } from './http/batchStreamFormatter.mjs';
15
- export { getJsonContentTypeInputs } from './http/contentType.mjs';
16
- export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER } from './rpc/codes.mjs';
17
- export { parseTRPCMessage } from './rpc/parseTRPCMessage.mjs';
@@ -1 +0,0 @@
1
- {"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/serialize.ts"],"names":[],"mappings":"AACA,OAAO,KAA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9D,CAAC,CAAC,EAAE,CAAC,CAAC;CACP,GACG,KAAK,GACL,IAAI,CAAC;AAET;;GAEG;AACH,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,SAAS,MAAM,CAAC,GAC7D,IAAI,GACJ,KAAK,CAAC;AAEV;;GAEG;AACH,KAAK,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI;KAC3C,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAC3D,CAAC,CAAC,CAAC,CAAC,EACJ,SAAS,CACV;CACF,CAAC;AAEF;;;GAGG;AACH,KAAK,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI;KACtC,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC;CACtE,CAAC;AAEF;;GAEG;AACH,KAAK,mBAAmB,CAAC,CAAC,SAAS,MAAM,IAEvC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,GAEzE,CAAC,0BAA0B,SAAS,IAAI,GACpC,oBAAoB,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,GACnE,iBAAiB,CAAC,CAAC,CAAC,SAAS,IAAI,GACjC,oBAAoB,CAAC,CAAC,CAAC,GACvB,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -1,44 +0,0 @@
1
- import type { AnyRootTypes, RootConfig } from './rootConfig';
2
-
3
- /**
4
- * Result of `initTRPC.create()`
5
- */
6
- type InitLike = {
7
- _config: RootConfig<AnyRootTypes>;
8
- };
9
-
10
- /**
11
- * Result of `initTRPC.create().router()`
12
- */
13
- type RouterLike = {
14
- _def: InitLike;
15
- };
16
-
17
- /**
18
- * Result of `initTRPC.create()._config`
19
- */
20
- type RootConfigLike = {
21
- $types: AnyRootTypes;
22
- };
23
- /**
24
- * Anything that can be inferred to the root config types
25
- */
26
- export type TRPCInferrable =
27
- | RouterLike
28
- | InitLike
29
- | RootConfigLike
30
- | AnyRootTypes;
31
-
32
- export type inferRootTypes<TInferrable extends TRPCInferrable> =
33
- TInferrable extends AnyRootTypes
34
- ? TInferrable
35
- : TInferrable extends RootConfigLike
36
- ? TInferrable['$types']
37
- : TInferrable extends InitLike
38
- ? TInferrable['_config']['$types']
39
- : TInferrable extends RouterLike
40
- ? TInferrable['_def']['_config']['$types']
41
- : never;
42
-
43
- export type inferErrorShape<TInferrable extends TRPCInferrable> =
44
- inferRootTypes<TInferrable>['errorShape'];
@@ -1,105 +0,0 @@
1
- /**
2
- * **DO NOT IMPORT FROM HERE FILE**
3
- *
4
- * This file is here to:
5
- * - make TypeScript happy and prevent _"The inferred type of 'createContext' cannot be named without a reference to [...]"_.
6
- * - the the glue between the official `@trpc/*`-packages
7
- *
8
- *
9
- * If you seem to need to import anything from here, please open an issue at https://github.com/trpc/trpc/issues
10
- */
11
- export {
12
- TRPCError,
13
- getCauseFromUnknown,
14
- getTRPCErrorFromUnknown,
15
- } from './error/TRPCError';
16
- export type { DefaultErrorData, DefaultErrorShape } from './error/formatter';
17
- export { getErrorShape } from './error/getErrorShape';
18
-
19
- export { initTRPC } from './initTRPC';
20
- export {
21
- createInputMiddleware,
22
- createOutputMiddleware,
23
- experimental_standaloneMiddleware,
24
- middlewareMarker,
25
- } from './middleware';
26
- export type {
27
- AnyMiddlewareFunction,
28
- MiddlewareBuilder,
29
- MiddlewareFunction,
30
- } from './middleware';
31
- export type { inferParser } from './parser';
32
- export { procedureTypes } from './procedure';
33
- export type {
34
- AnyMutationProcedure,
35
- AnyProcedure,
36
- AnyQueryProcedure,
37
- AnySubscriptionProcedure,
38
- MutationProcedure,
39
- Procedure,
40
- ProcedureOptions,
41
- ProcedureType,
42
- QueryProcedure,
43
- SubscriptionProcedure,
44
- inferProcedureInput,
45
- inferProcedureOutput,
46
- inferProcedureParams,
47
- inferTransformedProcedureOutput,
48
- inferTransformedSubscriptionOutput,
49
- } from './procedure';
50
- export { createBuilder, unsetMarker } from './procedureBuilder';
51
- export type { ProcedureBuilder } from './procedureBuilder';
52
- export * from './rootConfig';
53
- export type {
54
- AnyRouter,
55
- Router,
56
- RouterCaller,
57
- createRouterFactory,
58
- inferRouterContext,
59
- inferRouterError,
60
- inferRouterInputs,
61
- inferRouterMeta,
62
- inferRouterOutputs,
63
- } from './router';
64
-
65
- export * from './TRPCInferrable';
66
- export * from './router';
67
- export { transformResult, transformTRPCResponse } from './transformer';
68
- export type {
69
- CombinedDataTransformer,
70
- CombinedDataTransformerClient,
71
- DataTransformer,
72
- DataTransformerOptions,
73
- } from './transformer';
74
-
75
- export { createFlatProxy, createRecursiveProxy } from './createProxy';
76
-
77
- // For `.d.ts` files https://github.com/trpc/trpc/issues/3943
78
- export type { Serialize, SerializeObject } from './serialize';
79
-
80
- export type {
81
- DeepPartial,
82
- Dict,
83
- DistributiveOmit,
84
- Filter,
85
- FilterKeys,
86
- IntersectionError,
87
- Maybe,
88
- MaybePromise,
89
- Overwrite,
90
- PickFirstDefined,
91
- ProtectedIntersection,
92
- Simplify,
93
- Unwrap,
94
- ValidateShape,
95
- WithoutIndexSignature,
96
- TypeError,
97
- } from './types';
98
- export { isObject } from './utils';
99
-
100
- export * from './TRPCInferrable';
101
- /**
102
- * These should be re-exported from separate entrypoints in server package
103
- */
104
- export * from './http';
105
- export * from './rpc';