wexts 4.1.0 → 4.1.6

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 (113) hide show
  1. package/dist/chunk-27NEYQD2.mjs +222 -0
  2. package/dist/chunk-27NEYQD2.mjs.map +1 -0
  3. package/dist/{chunk-YBM3IJEA.mjs → chunk-5DBFN65W.mjs} +92 -3
  4. package/dist/chunk-5DBFN65W.mjs.map +1 -0
  5. package/dist/{chunk-7HNQWJWV.js → chunk-75HBI2XG.js} +3 -3
  6. package/dist/{chunk-7HNQWJWV.js.map → chunk-75HBI2XG.js.map} +1 -1
  7. package/dist/{chunk-JHOVXH3X.mjs → chunk-C2AG7Q3C.mjs} +2 -2
  8. package/dist/{chunk-7TLSPR65.mjs → chunk-DS5KVVWJ.mjs} +2 -2
  9. package/dist/{chunk-YN6WIWNQ.mjs → chunk-FUPLZMSR.mjs} +3 -3
  10. package/dist/{chunk-7QKLIVRF.js → chunk-HLT3IHJY.js} +92 -3
  11. package/dist/chunk-HLT3IHJY.js.map +1 -0
  12. package/dist/{chunk-7WULUGLH.mjs → chunk-L77ANWWT.mjs} +2 -2
  13. package/dist/{chunk-7WULUGLH.mjs.map → chunk-L77ANWWT.mjs.map} +1 -1
  14. package/dist/chunk-P3Q4I5FD.js +222 -0
  15. package/dist/chunk-P3Q4I5FD.js.map +1 -0
  16. package/dist/{chunk-342VRT25.mjs → chunk-VBIQGUDI.mjs} +6 -6
  17. package/dist/cli/index.js +32 -3
  18. package/dist/cli/index.js.map +1 -1
  19. package/dist/cli/index.mjs +35 -6
  20. package/dist/cli/index.mjs.map +1 -1
  21. package/dist/client/index.d.mts +23 -1
  22. package/dist/client/index.d.ts +23 -1
  23. package/dist/client/index.js +183 -9
  24. package/dist/client/index.js.map +1 -1
  25. package/dist/client/index.mjs +160 -7
  26. package/dist/client/index.mjs.map +1 -1
  27. package/dist/codegen/index.d.mts +2 -2
  28. package/dist/codegen/index.d.ts +2 -2
  29. package/dist/codegen/index.js +3 -3
  30. package/dist/codegen/index.mjs +4 -4
  31. package/dist/decorators-BiQtOHuF.d.ts +60 -0
  32. package/dist/decorators-vBopODtr.d.mts +60 -0
  33. package/dist/dev-server/index.mjs +3 -3
  34. package/dist/errors-D545UvXf.d.mts +37 -0
  35. package/dist/errors-D545UvXf.d.ts +37 -0
  36. package/dist/{index-7QeQEf37.d.ts → index-CJKs4wtN.d.ts} +1 -1
  37. package/dist/index-CUR6CnLk.d.ts +27 -0
  38. package/dist/{index-8nzxy0NN.d.mts → index-h66Vq9dK.d.mts} +1 -1
  39. package/dist/index-tqmYsTUn.d.mts +27 -0
  40. package/dist/index.d.mts +82 -87
  41. package/dist/index.d.ts +82 -87
  42. package/dist/index.js +140 -20
  43. package/dist/index.js.map +1 -1
  44. package/dist/index.mjs +142 -22
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/nest/index.d.mts +2 -3
  47. package/dist/nest/index.d.ts +2 -3
  48. package/dist/nest/index.js +2 -4
  49. package/dist/nest/index.js.map +1 -1
  50. package/dist/nest/index.mjs +3 -5
  51. package/dist/next/index.js +0 -7
  52. package/dist/next/index.js.map +1 -1
  53. package/dist/next/index.mjs.map +1 -1
  54. package/dist/rpc/index.d.mts +32 -2
  55. package/dist/rpc/index.d.ts +32 -2
  56. package/dist/rpc/index.js +18 -22
  57. package/dist/rpc/index.js.map +1 -1
  58. package/dist/rpc/index.mjs +0 -22
  59. package/dist/runtime/index.d.mts +1 -1
  60. package/dist/runtime/index.d.ts +1 -1
  61. package/dist/runtime/index.js +5 -211
  62. package/dist/runtime/index.js.map +1 -1
  63. package/dist/runtime/index.mjs +7 -213
  64. package/dist/runtime/index.mjs.map +1 -1
  65. package/dist/server/index.d.mts +7 -0
  66. package/dist/server/index.d.ts +7 -0
  67. package/dist/server/index.js +58 -0
  68. package/dist/server/index.js.map +1 -0
  69. package/dist/server/index.mjs +58 -0
  70. package/dist/types/index.js +18 -1
  71. package/dist/types/index.js.map +1 -1
  72. package/dist/types/index.mjs +0 -2
  73. package/dist/{types-7d_fC-C3.d.ts → types-CQ_aexOX.d.mts} +1 -1
  74. package/dist/{types-7d_fC-C3.d.mts → types-CQ_aexOX.d.ts} +1 -1
  75. package/dist/vercel-builder/index.mjs +1 -1
  76. package/package.json +6 -1
  77. package/templates/nestjs-api/README.md +1 -1
  78. package/dist/chunk-2KAQYLVN.js +0 -1
  79. package/dist/chunk-2KAQYLVN.js.map +0 -1
  80. package/dist/chunk-7QKLIVRF.js.map +0 -1
  81. package/dist/chunk-7SSCNCTW.mjs +0 -137
  82. package/dist/chunk-7SSCNCTW.mjs.map +0 -1
  83. package/dist/chunk-BG56B4DE.js +0 -106
  84. package/dist/chunk-BG56B4DE.js.map +0 -1
  85. package/dist/chunk-CLM5PNSG.mjs +0 -496
  86. package/dist/chunk-CLM5PNSG.mjs.map +0 -1
  87. package/dist/chunk-DNLGCKTT.js +0 -31
  88. package/dist/chunk-DNLGCKTT.js.map +0 -1
  89. package/dist/chunk-MXINIFPC.js +0 -105
  90. package/dist/chunk-MXINIFPC.js.map +0 -1
  91. package/dist/chunk-O4II6N34.js +0 -137
  92. package/dist/chunk-O4II6N34.js.map +0 -1
  93. package/dist/chunk-SE32ZPOZ.js +0 -496
  94. package/dist/chunk-SE32ZPOZ.js.map +0 -1
  95. package/dist/chunk-UAL54DVV.mjs +0 -106
  96. package/dist/chunk-UAL54DVV.mjs.map +0 -1
  97. package/dist/chunk-WU6FW77M.mjs +0 -105
  98. package/dist/chunk-WU6FW77M.mjs.map +0 -1
  99. package/dist/chunk-YBM3IJEA.mjs.map +0 -1
  100. package/dist/chunk-YSLEF5C5.mjs +0 -1
  101. package/dist/chunk-ZX7QIN24.mjs +0 -31
  102. package/dist/chunk-ZX7QIN24.mjs.map +0 -1
  103. package/dist/decorators-BT1FFqN0.d.mts +0 -29
  104. package/dist/decorators-DvS58PqC.d.ts +0 -29
  105. package/dist/index-Co5ZsLqq.d.ts +0 -58
  106. package/dist/index-D94W1__r.d.mts +0 -58
  107. package/dist/index-DQmyVp6F.d.mts +0 -27
  108. package/dist/index-KL_1BrQb.d.ts +0 -27
  109. /package/dist/{chunk-JHOVXH3X.mjs.map → chunk-C2AG7Q3C.mjs.map} +0 -0
  110. /package/dist/{chunk-7TLSPR65.mjs.map → chunk-DS5KVVWJ.mjs.map} +0 -0
  111. /package/dist/{chunk-YN6WIWNQ.mjs.map → chunk-FUPLZMSR.mjs.map} +0 -0
  112. /package/dist/{chunk-342VRT25.mjs.map → chunk-VBIQGUDI.mjs.map} +0 -0
  113. /package/dist/{chunk-YSLEF5C5.mjs.map → server/index.mjs.map} +0 -0
@@ -0,0 +1,37 @@
1
+ interface WextsErrorOptions {
2
+ code: string;
3
+ message: string;
4
+ cause?: unknown;
5
+ suggestedFix?: string;
6
+ docsSlug?: string;
7
+ }
8
+ declare class WextsError extends Error {
9
+ readonly code: string;
10
+ readonly suggestedFix?: string;
11
+ readonly docsSlug?: string;
12
+ constructor(options: WextsErrorOptions);
13
+ get docsUrl(): string | undefined;
14
+ }
15
+ declare class WextsRpcError extends WextsError {
16
+ constructor(options: Omit<WextsErrorOptions, 'code'> & {
17
+ code?: string;
18
+ });
19
+ }
20
+ declare class WextsCodegenError extends WextsError {
21
+ constructor(options: Omit<WextsErrorOptions, 'code'> & {
22
+ code?: string;
23
+ });
24
+ }
25
+ declare class WextsRuntimeError extends WextsError {
26
+ constructor(options: Omit<WextsErrorOptions, 'code'> & {
27
+ code?: string;
28
+ });
29
+ }
30
+ declare class WextsSecurityError extends WextsError {
31
+ constructor(options: Omit<WextsErrorOptions, 'code'> & {
32
+ code?: string;
33
+ });
34
+ }
35
+ declare function formatWextsError(error: unknown): string;
36
+
37
+ export { WextsError as W, WextsRpcError as a, WextsRuntimeError as b, WextsSecurityError as c, WextsCodegenError as d, type WextsErrorOptions as e, formatWextsError as f };
@@ -1,4 +1,4 @@
1
- import { c as RpcManifest } from './types-7d_fC-C3.js';
1
+ import { a as RpcManifest } from './types-CQ_aexOX.js';
2
2
 
3
3
  interface RouteInfo {
4
4
  method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
@@ -0,0 +1,27 @@
1
+ import { F as FusionController, a as FusionDelete, b as FusionGet, c as FusionPost, d as FusionPut, e as FusionRoute, f as FusionRouteMetadata, R as RequireAuth, g as RpcMethod, h as RpcMethodOptions, i as RpcService, j as RpcServiceOptions, k as RuntimeRpcMethodMetadata, l as RuntimeRpcServiceMetadata, W as WextsRpc, m as WextsRpcService, n as getFusionMetadata, o as getRpcAuthPolicy, p as getRuntimeRpcMethodsMetadata, q as getRuntimeRpcServiceMetadata } from './decorators-BiQtOHuF.js';
2
+
3
+ declare const index_FusionController: typeof FusionController;
4
+ declare const index_FusionDelete: typeof FusionDelete;
5
+ declare const index_FusionGet: typeof FusionGet;
6
+ declare const index_FusionPost: typeof FusionPost;
7
+ declare const index_FusionPut: typeof FusionPut;
8
+ declare const index_FusionRoute: typeof FusionRoute;
9
+ declare const index_FusionRouteMetadata: typeof FusionRouteMetadata;
10
+ declare const index_RequireAuth: typeof RequireAuth;
11
+ declare const index_RpcMethod: typeof RpcMethod;
12
+ declare const index_RpcMethodOptions: typeof RpcMethodOptions;
13
+ declare const index_RpcService: typeof RpcService;
14
+ declare const index_RpcServiceOptions: typeof RpcServiceOptions;
15
+ declare const index_RuntimeRpcMethodMetadata: typeof RuntimeRpcMethodMetadata;
16
+ declare const index_RuntimeRpcServiceMetadata: typeof RuntimeRpcServiceMetadata;
17
+ declare const index_WextsRpc: typeof WextsRpc;
18
+ declare const index_WextsRpcService: typeof WextsRpcService;
19
+ declare const index_getFusionMetadata: typeof getFusionMetadata;
20
+ declare const index_getRpcAuthPolicy: typeof getRpcAuthPolicy;
21
+ declare const index_getRuntimeRpcMethodsMetadata: typeof getRuntimeRpcMethodsMetadata;
22
+ declare const index_getRuntimeRpcServiceMetadata: typeof getRuntimeRpcServiceMetadata;
23
+ declare namespace index {
24
+ export { index_FusionController as FusionController, index_FusionDelete as FusionDelete, index_FusionGet as FusionGet, index_FusionPost as FusionPost, index_FusionPut as FusionPut, index_FusionRoute as FusionRoute, index_FusionRouteMetadata as FusionRouteMetadata, index_RequireAuth as RequireAuth, index_RpcMethod as RpcMethod, index_RpcMethodOptions as RpcMethodOptions, index_RpcService as RpcService, index_RpcServiceOptions as RpcServiceOptions, index_RuntimeRpcMethodMetadata as RuntimeRpcMethodMetadata, index_RuntimeRpcServiceMetadata as RuntimeRpcServiceMetadata, index_WextsRpc as WextsRpc, index_WextsRpcService as WextsRpcService, index_getFusionMetadata as getFusionMetadata, index_getRpcAuthPolicy as getRpcAuthPolicy, index_getRuntimeRpcMethodsMetadata as getRuntimeRpcMethodsMetadata, index_getRuntimeRpcServiceMetadata as getRuntimeRpcServiceMetadata };
25
+ }
26
+
27
+ export { index as i };
@@ -1,4 +1,4 @@
1
- import { c as RpcManifest } from './types-7d_fC-C3.mjs';
1
+ import { a as RpcManifest } from './types-CQ_aexOX.mjs';
2
2
 
3
3
  interface RouteInfo {
4
4
  method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
@@ -0,0 +1,27 @@
1
+ import { F as FusionController, a as FusionDelete, b as FusionGet, c as FusionPost, d as FusionPut, e as FusionRoute, f as FusionRouteMetadata, R as RequireAuth, g as RpcMethod, h as RpcMethodOptions, i as RpcService, j as RpcServiceOptions, k as RuntimeRpcMethodMetadata, l as RuntimeRpcServiceMetadata, W as WextsRpc, m as WextsRpcService, n as getFusionMetadata, o as getRpcAuthPolicy, p as getRuntimeRpcMethodsMetadata, q as getRuntimeRpcServiceMetadata } from './decorators-vBopODtr.mjs';
2
+
3
+ declare const index_FusionController: typeof FusionController;
4
+ declare const index_FusionDelete: typeof FusionDelete;
5
+ declare const index_FusionGet: typeof FusionGet;
6
+ declare const index_FusionPost: typeof FusionPost;
7
+ declare const index_FusionPut: typeof FusionPut;
8
+ declare const index_FusionRoute: typeof FusionRoute;
9
+ declare const index_FusionRouteMetadata: typeof FusionRouteMetadata;
10
+ declare const index_RequireAuth: typeof RequireAuth;
11
+ declare const index_RpcMethod: typeof RpcMethod;
12
+ declare const index_RpcMethodOptions: typeof RpcMethodOptions;
13
+ declare const index_RpcService: typeof RpcService;
14
+ declare const index_RpcServiceOptions: typeof RpcServiceOptions;
15
+ declare const index_RuntimeRpcMethodMetadata: typeof RuntimeRpcMethodMetadata;
16
+ declare const index_RuntimeRpcServiceMetadata: typeof RuntimeRpcServiceMetadata;
17
+ declare const index_WextsRpc: typeof WextsRpc;
18
+ declare const index_WextsRpcService: typeof WextsRpcService;
19
+ declare const index_getFusionMetadata: typeof getFusionMetadata;
20
+ declare const index_getRpcAuthPolicy: typeof getRpcAuthPolicy;
21
+ declare const index_getRuntimeRpcMethodsMetadata: typeof getRuntimeRpcMethodsMetadata;
22
+ declare const index_getRuntimeRpcServiceMetadata: typeof getRuntimeRpcServiceMetadata;
23
+ declare namespace index {
24
+ export { index_FusionController as FusionController, index_FusionDelete as FusionDelete, index_FusionGet as FusionGet, index_FusionPost as FusionPost, index_FusionPut as FusionPut, index_FusionRoute as FusionRoute, index_FusionRouteMetadata as FusionRouteMetadata, index_RequireAuth as RequireAuth, index_RpcMethod as RpcMethod, index_RpcMethodOptions as RpcMethodOptions, index_RpcService as RpcService, index_RpcServiceOptions as RpcServiceOptions, index_RuntimeRpcMethodMetadata as RuntimeRpcMethodMetadata, index_RuntimeRpcServiceMetadata as RuntimeRpcServiceMetadata, index_WextsRpc as WextsRpc, index_WextsRpcService as WextsRpcService, index_getFusionMetadata as getFusionMetadata, index_getRpcAuthPolicy as getRpcAuthPolicy, index_getRuntimeRpcMethodsMetadata as getRuntimeRpcMethodsMetadata, index_getRuntimeRpcServiceMetadata as getRuntimeRpcServiceMetadata };
25
+ }
26
+
27
+ export { index as i };
package/dist/index.d.mts CHANGED
@@ -1,12 +1,10 @@
1
- export { i as Codegen } from './index-8nzxy0NN.mjs';
1
+ export { i as Codegen } from './index-h66Vq9dK.mjs';
2
2
  export { i as DevServer } from './index-7RvU-jGE.mjs';
3
- export { i as Nest } from './index-D94W1__r.mjs';
3
+ export { i as Nest } from './index-tqmYsTUn.mjs';
4
4
  import React, { ReactNode } from 'react';
5
- import { FusionFetcher, WextsRpcClient } from './client/index.mjs';
6
- export { i as Rpc } from './index-DQmyVp6F.mjs';
7
- export { Todo, User } from './types/index.mjs';
8
- import './types-7d_fC-C3.mjs';
9
- import './decorators-BT1FFqN0.mjs';
5
+ import { R as RpcAuthPolicy, b as RpcInvocationRequest, c as RpcInvocationResponse, a as RpcManifest, d as RpcMethodManifest, e as RpcParameterManifest, f as RpcServiceManifest } from './types-CQ_aexOX.mjs';
6
+ export { d as WextsCodegenError, W as WextsError, e as WextsErrorOptions, a as WextsRpcError, b as WextsRuntimeError, c as WextsSecurityError, f as formatWextsError } from './errors-D545UvXf.mjs';
7
+ import './decorators-vBopODtr.mjs';
10
8
 
11
9
  interface FusionConfig {
12
10
  [key: string]: any;
@@ -123,51 +121,51 @@ declare class APIError extends FusionError {
123
121
  constructor(message: string, statusCode?: number | undefined);
124
122
  }
125
123
 
126
- type index$4_APIError = APIError;
127
- declare const index$4_APIError: typeof APIError;
128
- type index$4_ConfigError = ConfigError;
129
- declare const index$4_ConfigError: typeof ConfigError;
130
- type index$4_ConfigLoader = ConfigLoader;
131
- declare const index$4_ConfigLoader: typeof ConfigLoader;
132
- type index$4_FileSystem = FileSystem;
133
- declare const index$4_FileSystem: typeof FileSystem;
134
- type index$4_FusionConfig = FusionConfig;
135
- type index$4_FusionError = FusionError;
136
- declare const index$4_FusionError: typeof FusionError;
137
- type index$4_LogLevel = LogLevel;
138
- declare const index$4_LogLevel: typeof LogLevel;
139
- type index$4_Logger = Logger;
140
- declare const index$4_Logger: typeof Logger;
141
- type index$4_LoggerOptions = LoggerOptions;
142
- type index$4_ProcessManager = ProcessManager;
143
- declare const index$4_ProcessManager: typeof ProcessManager;
144
- type index$4_ValidationError = ValidationError;
145
- declare const index$4_ValidationError: typeof ValidationError;
146
- declare const index$4_config: typeof config;
147
- declare const index$4_createLogger: typeof createLogger;
148
- declare const index$4_filesystem: typeof filesystem;
149
- declare const index$4_load: typeof load;
150
- declare const index$4_logger: typeof logger;
151
- declare namespace index$4 {
152
- export { index$4_APIError as APIError, index$4_ConfigError as ConfigError, index$4_ConfigLoader as ConfigLoader, index$4_FileSystem as FileSystem, type index$4_FusionConfig as FusionConfig, index$4_FusionError as FusionError, index$4_LogLevel as LogLevel, index$4_Logger as Logger, type index$4_LoggerOptions as LoggerOptions, index$4_ProcessManager as ProcessManager, index$4_ValidationError as ValidationError, index$4_config as config, index$4_createLogger as createLogger, index$4_filesystem as filesystem, index$4_load as load, index$4_logger as logger };
124
+ type index$5_APIError = APIError;
125
+ declare const index$5_APIError: typeof APIError;
126
+ type index$5_ConfigError = ConfigError;
127
+ declare const index$5_ConfigError: typeof ConfigError;
128
+ type index$5_ConfigLoader = ConfigLoader;
129
+ declare const index$5_ConfigLoader: typeof ConfigLoader;
130
+ type index$5_FileSystem = FileSystem;
131
+ declare const index$5_FileSystem: typeof FileSystem;
132
+ type index$5_FusionConfig = FusionConfig;
133
+ type index$5_FusionError = FusionError;
134
+ declare const index$5_FusionError: typeof FusionError;
135
+ type index$5_LogLevel = LogLevel;
136
+ declare const index$5_LogLevel: typeof LogLevel;
137
+ type index$5_Logger = Logger;
138
+ declare const index$5_Logger: typeof Logger;
139
+ type index$5_LoggerOptions = LoggerOptions;
140
+ type index$5_ProcessManager = ProcessManager;
141
+ declare const index$5_ProcessManager: typeof ProcessManager;
142
+ type index$5_ValidationError = ValidationError;
143
+ declare const index$5_ValidationError: typeof ValidationError;
144
+ declare const index$5_config: typeof config;
145
+ declare const index$5_createLogger: typeof createLogger;
146
+ declare const index$5_filesystem: typeof filesystem;
147
+ declare const index$5_load: typeof load;
148
+ declare const index$5_logger: typeof logger;
149
+ declare namespace index$5 {
150
+ export { index$5_APIError as APIError, index$5_ConfigError as ConfigError, index$5_ConfigLoader as ConfigLoader, index$5_FileSystem as FileSystem, type index$5_FusionConfig as FusionConfig, index$5_FusionError as FusionError, index$5_LogLevel as LogLevel, index$5_Logger as Logger, type index$5_LoggerOptions as LoggerOptions, index$5_ProcessManager as ProcessManager, index$5_ValidationError as ValidationError, index$5_config as config, index$5_createLogger as createLogger, index$5_filesystem as filesystem, index$5_load as load, index$5_logger as logger };
153
151
  }
154
152
 
155
153
  declare const loader: {
156
154
  load: () => {};
157
155
  };
158
156
 
159
- declare const index$3_loader: typeof loader;
160
- declare namespace index$3 {
161
- export { index$3_loader as loader };
157
+ declare const index$4_loader: typeof loader;
158
+ declare namespace index$4 {
159
+ export { index$4_loader as loader };
162
160
  }
163
161
 
164
162
  declare const server: {
165
163
  start: () => void;
166
164
  };
167
165
 
168
- declare const index$2_server: typeof server;
169
- declare namespace index$2 {
170
- export { index$2_server as server };
166
+ declare const index$3_server: typeof server;
167
+ declare namespace index$3 {
168
+ export { index$3_server as server };
171
169
  }
172
170
 
173
171
  interface ScaffoldOptions {
@@ -185,13 +183,24 @@ declare class ProjectScaffolder {
185
183
  private createNextJSApp;
186
184
  }
187
185
 
188
- type index$1_ProjectScaffolder = ProjectScaffolder;
189
- declare const index$1_ProjectScaffolder: typeof ProjectScaffolder;
190
- type index$1_ScaffoldOptions = ScaffoldOptions;
191
- declare namespace index$1 {
192
- export { index$1_ProjectScaffolder as ProjectScaffolder, type index$1_ScaffoldOptions as ScaffoldOptions };
186
+ type index$2_ProjectScaffolder = ProjectScaffolder;
187
+ declare const index$2_ProjectScaffolder: typeof ProjectScaffolder;
188
+ type index$2_ScaffoldOptions = ScaffoldOptions;
189
+ declare namespace index$2 {
190
+ export { index$2_ProjectScaffolder as ProjectScaffolder, type index$2_ScaffoldOptions as ScaffoldOptions };
193
191
  }
194
192
 
193
+ declare class FusionFetcher {
194
+ private baseUrl;
195
+ constructor(baseUrl?: string);
196
+ private request;
197
+ get<T>(path: string): Promise<T>;
198
+ post<T>(path: string, body: any): Promise<T>;
199
+ put<T>(path: string, body: any): Promise<T>;
200
+ delete<T>(path: string): Promise<T>;
201
+ }
202
+ type WextsRpcClient = Record<string, Record<string, (...args: unknown[]) => Promise<unknown>>>;
203
+
195
204
  interface FusionContextType {
196
205
  client: FusionFetcher;
197
206
  wexts: WextsRpcClient;
@@ -244,51 +253,37 @@ interface UseAuthReturn {
244
253
  */
245
254
  declare function useAuth(): UseAuthReturn;
246
255
 
247
- type index_AuthUser = AuthUser;
248
- declare const index_FusionProvider: typeof FusionProvider;
249
- type index_FusionProviderProps = FusionProviderProps;
250
- type index_UseAuthReturn = UseAuthReturn;
251
- declare const index_useAuth: typeof useAuth;
252
- declare const index_useFusion: typeof useFusion;
253
- declare const index_useWexts: typeof useWexts;
254
- declare namespace index {
255
- export { type index_AuthUser as AuthUser, index_FusionProvider as FusionProvider, type index_FusionProviderProps as FusionProviderProps, type index_UseAuthReturn as UseAuthReturn, index_useAuth as useAuth, index_useFusion as useFusion, index_useWexts as useWexts };
256
+ type index$1_AuthUser = AuthUser;
257
+ declare const index$1_FusionProvider: typeof FusionProvider;
258
+ type index$1_FusionProviderProps = FusionProviderProps;
259
+ type index$1_UseAuthReturn = UseAuthReturn;
260
+ declare const index$1_useAuth: typeof useAuth;
261
+ declare const index$1_useFusion: typeof useFusion;
262
+ declare const index$1_useWexts: typeof useWexts;
263
+ declare namespace index$1 {
264
+ export { type index$1_AuthUser as AuthUser, index$1_FusionProvider as FusionProvider, type index$1_FusionProviderProps as FusionProviderProps, type index$1_UseAuthReturn as UseAuthReturn, index$1_useAuth as useAuth, index$1_useFusion as useFusion, index$1_useWexts as useWexts };
256
265
  }
257
266
 
258
- interface WextsErrorOptions {
259
- code: string;
260
- message: string;
261
- cause?: unknown;
262
- suggestedFix?: string;
263
- docsSlug?: string;
264
- }
265
- declare class WextsError extends Error {
266
- readonly code: string;
267
- readonly suggestedFix?: string;
268
- readonly docsSlug?: string;
269
- constructor(options: WextsErrorOptions);
270
- get docsUrl(): string | undefined;
271
- }
272
- declare class WextsRpcError extends WextsError {
273
- constructor(options: Omit<WextsErrorOptions, 'code'> & {
274
- code?: string;
275
- });
276
- }
277
- declare class WextsCodegenError extends WextsError {
278
- constructor(options: Omit<WextsErrorOptions, 'code'> & {
279
- code?: string;
280
- });
267
+ declare const index_RpcAuthPolicy: typeof RpcAuthPolicy;
268
+ declare const index_RpcInvocationRequest: typeof RpcInvocationRequest;
269
+ declare const index_RpcInvocationResponse: typeof RpcInvocationResponse;
270
+ declare const index_RpcManifest: typeof RpcManifest;
271
+ declare const index_RpcMethodManifest: typeof RpcMethodManifest;
272
+ declare const index_RpcParameterManifest: typeof RpcParameterManifest;
273
+ declare const index_RpcServiceManifest: typeof RpcServiceManifest;
274
+ declare namespace index {
275
+ export { index_RpcAuthPolicy as RpcAuthPolicy, index_RpcInvocationRequest as RpcInvocationRequest, index_RpcInvocationResponse as RpcInvocationResponse, index_RpcManifest as RpcManifest, index_RpcMethodManifest as RpcMethodManifest, index_RpcParameterManifest as RpcParameterManifest, index_RpcServiceManifest as RpcServiceManifest };
281
276
  }
282
- declare class WextsRuntimeError extends WextsError {
283
- constructor(options: Omit<WextsErrorOptions, 'code'> & {
284
- code?: string;
285
- });
277
+
278
+ interface User {
279
+ id: string;
280
+ email: string;
281
+ name?: string;
286
282
  }
287
- declare class WextsSecurityError extends WextsError {
288
- constructor(options: Omit<WextsErrorOptions, 'code'> & {
289
- code?: string;
290
- });
283
+ interface Todo {
284
+ id: string;
285
+ title: string;
286
+ completed: boolean;
291
287
  }
292
- declare function formatWextsError(error: unknown): string;
293
288
 
294
- export { index$3 as Config, index$4 as Core, index$1 as CreateFusion, index$2 as Insight, index as Next, WextsCodegenError, WextsError, type WextsErrorOptions, WextsRpcError, WextsRuntimeError, WextsSecurityError, formatWextsError };
289
+ export { index$4 as Config, index$5 as Core, index$2 as CreateFusion, index$3 as Insight, index$1 as Next, index as Rpc, type Todo, type User };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,10 @@
1
- export { i as Codegen } from './index-7QeQEf37.js';
1
+ export { i as Codegen } from './index-CJKs4wtN.js';
2
2
  export { i as DevServer } from './index-7RvU-jGE.js';
3
- export { i as Nest } from './index-Co5ZsLqq.js';
3
+ export { i as Nest } from './index-CUR6CnLk.js';
4
4
  import React, { ReactNode } from 'react';
5
- import { FusionFetcher, WextsRpcClient } from './client/index.js';
6
- export { i as Rpc } from './index-KL_1BrQb.js';
7
- export { Todo, User } from './types/index.js';
8
- import './types-7d_fC-C3.js';
9
- import './decorators-DvS58PqC.js';
5
+ import { R as RpcAuthPolicy, b as RpcInvocationRequest, c as RpcInvocationResponse, a as RpcManifest, d as RpcMethodManifest, e as RpcParameterManifest, f as RpcServiceManifest } from './types-CQ_aexOX.js';
6
+ export { d as WextsCodegenError, W as WextsError, e as WextsErrorOptions, a as WextsRpcError, b as WextsRuntimeError, c as WextsSecurityError, f as formatWextsError } from './errors-D545UvXf.js';
7
+ import './decorators-BiQtOHuF.js';
10
8
 
11
9
  interface FusionConfig {
12
10
  [key: string]: any;
@@ -123,51 +121,51 @@ declare class APIError extends FusionError {
123
121
  constructor(message: string, statusCode?: number | undefined);
124
122
  }
125
123
 
126
- type index$4_APIError = APIError;
127
- declare const index$4_APIError: typeof APIError;
128
- type index$4_ConfigError = ConfigError;
129
- declare const index$4_ConfigError: typeof ConfigError;
130
- type index$4_ConfigLoader = ConfigLoader;
131
- declare const index$4_ConfigLoader: typeof ConfigLoader;
132
- type index$4_FileSystem = FileSystem;
133
- declare const index$4_FileSystem: typeof FileSystem;
134
- type index$4_FusionConfig = FusionConfig;
135
- type index$4_FusionError = FusionError;
136
- declare const index$4_FusionError: typeof FusionError;
137
- type index$4_LogLevel = LogLevel;
138
- declare const index$4_LogLevel: typeof LogLevel;
139
- type index$4_Logger = Logger;
140
- declare const index$4_Logger: typeof Logger;
141
- type index$4_LoggerOptions = LoggerOptions;
142
- type index$4_ProcessManager = ProcessManager;
143
- declare const index$4_ProcessManager: typeof ProcessManager;
144
- type index$4_ValidationError = ValidationError;
145
- declare const index$4_ValidationError: typeof ValidationError;
146
- declare const index$4_config: typeof config;
147
- declare const index$4_createLogger: typeof createLogger;
148
- declare const index$4_filesystem: typeof filesystem;
149
- declare const index$4_load: typeof load;
150
- declare const index$4_logger: typeof logger;
151
- declare namespace index$4 {
152
- export { index$4_APIError as APIError, index$4_ConfigError as ConfigError, index$4_ConfigLoader as ConfigLoader, index$4_FileSystem as FileSystem, type index$4_FusionConfig as FusionConfig, index$4_FusionError as FusionError, index$4_LogLevel as LogLevel, index$4_Logger as Logger, type index$4_LoggerOptions as LoggerOptions, index$4_ProcessManager as ProcessManager, index$4_ValidationError as ValidationError, index$4_config as config, index$4_createLogger as createLogger, index$4_filesystem as filesystem, index$4_load as load, index$4_logger as logger };
124
+ type index$5_APIError = APIError;
125
+ declare const index$5_APIError: typeof APIError;
126
+ type index$5_ConfigError = ConfigError;
127
+ declare const index$5_ConfigError: typeof ConfigError;
128
+ type index$5_ConfigLoader = ConfigLoader;
129
+ declare const index$5_ConfigLoader: typeof ConfigLoader;
130
+ type index$5_FileSystem = FileSystem;
131
+ declare const index$5_FileSystem: typeof FileSystem;
132
+ type index$5_FusionConfig = FusionConfig;
133
+ type index$5_FusionError = FusionError;
134
+ declare const index$5_FusionError: typeof FusionError;
135
+ type index$5_LogLevel = LogLevel;
136
+ declare const index$5_LogLevel: typeof LogLevel;
137
+ type index$5_Logger = Logger;
138
+ declare const index$5_Logger: typeof Logger;
139
+ type index$5_LoggerOptions = LoggerOptions;
140
+ type index$5_ProcessManager = ProcessManager;
141
+ declare const index$5_ProcessManager: typeof ProcessManager;
142
+ type index$5_ValidationError = ValidationError;
143
+ declare const index$5_ValidationError: typeof ValidationError;
144
+ declare const index$5_config: typeof config;
145
+ declare const index$5_createLogger: typeof createLogger;
146
+ declare const index$5_filesystem: typeof filesystem;
147
+ declare const index$5_load: typeof load;
148
+ declare const index$5_logger: typeof logger;
149
+ declare namespace index$5 {
150
+ export { index$5_APIError as APIError, index$5_ConfigError as ConfigError, index$5_ConfigLoader as ConfigLoader, index$5_FileSystem as FileSystem, type index$5_FusionConfig as FusionConfig, index$5_FusionError as FusionError, index$5_LogLevel as LogLevel, index$5_Logger as Logger, type index$5_LoggerOptions as LoggerOptions, index$5_ProcessManager as ProcessManager, index$5_ValidationError as ValidationError, index$5_config as config, index$5_createLogger as createLogger, index$5_filesystem as filesystem, index$5_load as load, index$5_logger as logger };
153
151
  }
154
152
 
155
153
  declare const loader: {
156
154
  load: () => {};
157
155
  };
158
156
 
159
- declare const index$3_loader: typeof loader;
160
- declare namespace index$3 {
161
- export { index$3_loader as loader };
157
+ declare const index$4_loader: typeof loader;
158
+ declare namespace index$4 {
159
+ export { index$4_loader as loader };
162
160
  }
163
161
 
164
162
  declare const server: {
165
163
  start: () => void;
166
164
  };
167
165
 
168
- declare const index$2_server: typeof server;
169
- declare namespace index$2 {
170
- export { index$2_server as server };
166
+ declare const index$3_server: typeof server;
167
+ declare namespace index$3 {
168
+ export { index$3_server as server };
171
169
  }
172
170
 
173
171
  interface ScaffoldOptions {
@@ -185,13 +183,24 @@ declare class ProjectScaffolder {
185
183
  private createNextJSApp;
186
184
  }
187
185
 
188
- type index$1_ProjectScaffolder = ProjectScaffolder;
189
- declare const index$1_ProjectScaffolder: typeof ProjectScaffolder;
190
- type index$1_ScaffoldOptions = ScaffoldOptions;
191
- declare namespace index$1 {
192
- export { index$1_ProjectScaffolder as ProjectScaffolder, type index$1_ScaffoldOptions as ScaffoldOptions };
186
+ type index$2_ProjectScaffolder = ProjectScaffolder;
187
+ declare const index$2_ProjectScaffolder: typeof ProjectScaffolder;
188
+ type index$2_ScaffoldOptions = ScaffoldOptions;
189
+ declare namespace index$2 {
190
+ export { index$2_ProjectScaffolder as ProjectScaffolder, type index$2_ScaffoldOptions as ScaffoldOptions };
193
191
  }
194
192
 
193
+ declare class FusionFetcher {
194
+ private baseUrl;
195
+ constructor(baseUrl?: string);
196
+ private request;
197
+ get<T>(path: string): Promise<T>;
198
+ post<T>(path: string, body: any): Promise<T>;
199
+ put<T>(path: string, body: any): Promise<T>;
200
+ delete<T>(path: string): Promise<T>;
201
+ }
202
+ type WextsRpcClient = Record<string, Record<string, (...args: unknown[]) => Promise<unknown>>>;
203
+
195
204
  interface FusionContextType {
196
205
  client: FusionFetcher;
197
206
  wexts: WextsRpcClient;
@@ -244,51 +253,37 @@ interface UseAuthReturn {
244
253
  */
245
254
  declare function useAuth(): UseAuthReturn;
246
255
 
247
- type index_AuthUser = AuthUser;
248
- declare const index_FusionProvider: typeof FusionProvider;
249
- type index_FusionProviderProps = FusionProviderProps;
250
- type index_UseAuthReturn = UseAuthReturn;
251
- declare const index_useAuth: typeof useAuth;
252
- declare const index_useFusion: typeof useFusion;
253
- declare const index_useWexts: typeof useWexts;
254
- declare namespace index {
255
- export { type index_AuthUser as AuthUser, index_FusionProvider as FusionProvider, type index_FusionProviderProps as FusionProviderProps, type index_UseAuthReturn as UseAuthReturn, index_useAuth as useAuth, index_useFusion as useFusion, index_useWexts as useWexts };
256
+ type index$1_AuthUser = AuthUser;
257
+ declare const index$1_FusionProvider: typeof FusionProvider;
258
+ type index$1_FusionProviderProps = FusionProviderProps;
259
+ type index$1_UseAuthReturn = UseAuthReturn;
260
+ declare const index$1_useAuth: typeof useAuth;
261
+ declare const index$1_useFusion: typeof useFusion;
262
+ declare const index$1_useWexts: typeof useWexts;
263
+ declare namespace index$1 {
264
+ export { type index$1_AuthUser as AuthUser, index$1_FusionProvider as FusionProvider, type index$1_FusionProviderProps as FusionProviderProps, type index$1_UseAuthReturn as UseAuthReturn, index$1_useAuth as useAuth, index$1_useFusion as useFusion, index$1_useWexts as useWexts };
256
265
  }
257
266
 
258
- interface WextsErrorOptions {
259
- code: string;
260
- message: string;
261
- cause?: unknown;
262
- suggestedFix?: string;
263
- docsSlug?: string;
264
- }
265
- declare class WextsError extends Error {
266
- readonly code: string;
267
- readonly suggestedFix?: string;
268
- readonly docsSlug?: string;
269
- constructor(options: WextsErrorOptions);
270
- get docsUrl(): string | undefined;
271
- }
272
- declare class WextsRpcError extends WextsError {
273
- constructor(options: Omit<WextsErrorOptions, 'code'> & {
274
- code?: string;
275
- });
276
- }
277
- declare class WextsCodegenError extends WextsError {
278
- constructor(options: Omit<WextsErrorOptions, 'code'> & {
279
- code?: string;
280
- });
267
+ declare const index_RpcAuthPolicy: typeof RpcAuthPolicy;
268
+ declare const index_RpcInvocationRequest: typeof RpcInvocationRequest;
269
+ declare const index_RpcInvocationResponse: typeof RpcInvocationResponse;
270
+ declare const index_RpcManifest: typeof RpcManifest;
271
+ declare const index_RpcMethodManifest: typeof RpcMethodManifest;
272
+ declare const index_RpcParameterManifest: typeof RpcParameterManifest;
273
+ declare const index_RpcServiceManifest: typeof RpcServiceManifest;
274
+ declare namespace index {
275
+ export { index_RpcAuthPolicy as RpcAuthPolicy, index_RpcInvocationRequest as RpcInvocationRequest, index_RpcInvocationResponse as RpcInvocationResponse, index_RpcManifest as RpcManifest, index_RpcMethodManifest as RpcMethodManifest, index_RpcParameterManifest as RpcParameterManifest, index_RpcServiceManifest as RpcServiceManifest };
281
276
  }
282
- declare class WextsRuntimeError extends WextsError {
283
- constructor(options: Omit<WextsErrorOptions, 'code'> & {
284
- code?: string;
285
- });
277
+
278
+ interface User {
279
+ id: string;
280
+ email: string;
281
+ name?: string;
286
282
  }
287
- declare class WextsSecurityError extends WextsError {
288
- constructor(options: Omit<WextsErrorOptions, 'code'> & {
289
- code?: string;
290
- });
283
+ interface Todo {
284
+ id: string;
285
+ title: string;
286
+ completed: boolean;
291
287
  }
292
- declare function formatWextsError(error: unknown): string;
293
288
 
294
- export { index$3 as Config, index$4 as Core, index$1 as CreateFusion, index$2 as Insight, index as Next, WextsCodegenError, WextsError, type WextsErrorOptions, WextsRpcError, WextsRuntimeError, WextsSecurityError, formatWextsError };
289
+ export { index$4 as Config, index$5 as Core, index$2 as CreateFusion, index$3 as Insight, index$1 as Next, index as Rpc, type Todo, type User };