@elysiumjs/core 0.8.0 → 0.11.0
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/CHANGELOG.md +227 -0
- package/README.md +62 -4
- package/dist/app.d.ts +126 -13
- package/dist/config.d.ts +74 -0
- package/dist/console.d.ts +46 -9
- package/dist/container.d.ts +76 -14
- package/dist/errors.d.ts +37 -2
- package/dist/filter.d.ts +78 -0
- package/dist/http-client.d.ts +80 -0
- package/dist/http.d.ts +153 -45
- package/dist/index.d.ts +24 -11
- package/dist/index.js +10 -8
- package/dist/interceptor.d.ts +80 -0
- package/dist/kernel.d.ts +15 -1
- package/dist/{event-wiring.d.ts → lifecycle-wiring.d.ts} +4 -4
- package/dist/{event.d.ts → lifecycle.d.ts} +26 -18
- package/dist/logger.d.ts +15 -0
- package/dist/middleware.d.ts +30 -8
- package/dist/module-context.d.ts +6 -0
- package/dist/module-graph.d.ts +3 -2
- package/dist/module.d.ts +18 -0
- package/dist/problem.d.ts +815 -0
- package/dist/rate-limit.d.ts +194 -0
- package/dist/resource.d.ts +77 -0
- package/dist/runtime.d.ts +148 -0
- package/dist/security.d.ts +159 -0
- package/dist/service.d.ts +51 -15
- package/dist/testing.d.ts +45 -2
- package/dist/token.d.ts +22 -0
- package/dist/user.d.ts +13 -0
- package/dist/utils.d.ts +3 -3
- package/dist/websocket.d.ts +42 -16
- package/package.json +24 -8
- package/dist/redis.d.ts +0 -86
- package/tsconfig.json +0 -12
package/dist/http.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { Context as ElysiaContext
|
|
1
|
+
import type { Context as ElysiaContext } from 'elysia';
|
|
2
2
|
import type { Class, MergeDeep } from 'type-fest';
|
|
3
|
+
import type { Static, TSchema } from 'typebox';
|
|
3
4
|
import type { AppHttpContext } from '.';
|
|
5
|
+
import type { FilterClass } from './filter';
|
|
6
|
+
import type { InterceptorClass } from './interceptor';
|
|
4
7
|
import type { Module } from './module';
|
|
5
8
|
import { Elysia } from 'elysia';
|
|
6
9
|
/**
|
|
@@ -8,6 +11,16 @@ import { Elysia } from 'elysia';
|
|
|
8
11
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
9
12
|
*/
|
|
10
13
|
export type Route = `/${string}`;
|
|
14
|
+
/**
|
|
15
|
+
* An HTTP method name.
|
|
16
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
17
|
+
*/
|
|
18
|
+
export type HTTPMethod = string;
|
|
19
|
+
/**
|
|
20
|
+
* A function computing a value from the request context, used by custom parameter decorators.
|
|
21
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
22
|
+
*/
|
|
23
|
+
type Handler = (c: Context) => unknown;
|
|
11
24
|
/**
|
|
12
25
|
* A class for validating data against a schema.
|
|
13
26
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
@@ -22,14 +35,14 @@ export type ValidatorClass<T extends TSchema = TSchema> = {
|
|
|
22
35
|
* Whether the request should be authorized before validation. If the request is not authorized,
|
|
23
36
|
* the validation will be skipped.
|
|
24
37
|
*/
|
|
25
|
-
authorize(ctx: Context<T
|
|
38
|
+
authorize(ctx: Context<Static<T>>): Promise<boolean>;
|
|
26
39
|
/**
|
|
27
40
|
* Processes custom validation logic. This method is called after the validation schema is checked
|
|
28
41
|
* against the input data. So it's safe to assume that the schema is valid.
|
|
29
42
|
* @param data The input data to validate.
|
|
30
43
|
* @returns Whether the input data is valid.
|
|
31
44
|
*/
|
|
32
|
-
validate(ctx: Context<T
|
|
45
|
+
validate(ctx: Context<Static<T>>): Promise<boolean>;
|
|
33
46
|
};
|
|
34
47
|
/**
|
|
35
48
|
* Metadata for the HTTP context.
|
|
@@ -47,7 +60,7 @@ export type Singleton<TController = unknown, TModule extends Module = Module> =
|
|
|
47
60
|
*/
|
|
48
61
|
module: TModule;
|
|
49
62
|
};
|
|
50
|
-
|
|
63
|
+
derive: {
|
|
51
64
|
/**
|
|
52
65
|
* The tenant ID.
|
|
53
66
|
*/
|
|
@@ -61,7 +74,13 @@ export type Singleton<TController = unknown, TModule extends Module = Module> =
|
|
|
61
74
|
export type Context<TBody = unknown, TController = unknown, TModule extends Module = Module> = ElysiaContext<{
|
|
62
75
|
body: TBody;
|
|
63
76
|
}, Singleton<TController, TModule>>;
|
|
64
|
-
export type ElysiaApp = Elysia<Route, Singleton>;
|
|
77
|
+
export type ElysiaApp = Elysia<Route, 'local', Singleton>;
|
|
78
|
+
/**
|
|
79
|
+
* Name of the global service running a callback in a database transaction, used by
|
|
80
|
+
* `@transactional` handlers. Provided by database modules such as `DrizzleModule`.
|
|
81
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
82
|
+
*/
|
|
83
|
+
export declare const DATABASE_TRANSACTION_SERVICE = "db.transaction";
|
|
65
84
|
/**
|
|
66
85
|
* The scope of an HTTP controller.
|
|
67
86
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
@@ -77,14 +96,10 @@ export declare enum HttpControllerScope {
|
|
|
77
96
|
REQUEST = 1
|
|
78
97
|
}
|
|
79
98
|
/**
|
|
80
|
-
*
|
|
99
|
+
* Options of `@Http.controller()`.
|
|
81
100
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
82
101
|
*/
|
|
83
|
-
export type
|
|
84
|
-
/**
|
|
85
|
-
* The path of the HTTP route.
|
|
86
|
-
*/
|
|
87
|
-
path: Route;
|
|
102
|
+
export type HttpControllerOptions = {
|
|
88
103
|
/**
|
|
89
104
|
* The scope of the HTTP controller.
|
|
90
105
|
* @default HttpControllerScope.SERVER
|
|
@@ -100,20 +115,30 @@ export type HttpControllerProps = {
|
|
|
100
115
|
* for all the request handlers in this controller.
|
|
101
116
|
*/
|
|
102
117
|
transactional?: boolean;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Properties required when declaring an HTTP request handler.
|
|
106
|
-
* @author Axel Nana <axel.nana@workbud.com>
|
|
107
|
-
*/
|
|
108
|
-
export type RequestHandlerDecoratorProps = {
|
|
109
118
|
/**
|
|
110
|
-
*
|
|
119
|
+
* Exception filters for every route of the controller. They run after the filters of the route,
|
|
120
|
+
* and before those of the module and the app.
|
|
111
121
|
*/
|
|
112
|
-
|
|
122
|
+
filters?: FilterClass[];
|
|
113
123
|
/**
|
|
114
|
-
*
|
|
124
|
+
* Interceptors around every handler of the controller, inside those of the module and the app,
|
|
125
|
+
* and outside those of the route.
|
|
115
126
|
*/
|
|
116
|
-
|
|
127
|
+
interceptors?: InterceptorClass[];
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* What an HTTP controller records: its path and its options.
|
|
131
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
132
|
+
*/
|
|
133
|
+
export type HttpControllerProps = HttpControllerOptions & {
|
|
134
|
+
/** The path of the controller. */
|
|
135
|
+
path: Route;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Options of the route decorators, such as `@Http.get()`.
|
|
139
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
140
|
+
*/
|
|
141
|
+
export type HttpRouteOptions = {
|
|
117
142
|
/**
|
|
118
143
|
* The schema of the response body.
|
|
119
144
|
*/
|
|
@@ -133,76 +158,158 @@ export type RequestHandlerDecoratorProps = {
|
|
|
133
158
|
* for this request handler.
|
|
134
159
|
*/
|
|
135
160
|
transactional?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Whether to serialize the handler result through the `response` schema: undeclared and hidden
|
|
163
|
+
* fields are stripped, dates become ISO strings, and `?fields=` selects fields. Defaults to
|
|
164
|
+
* `true` when the route has a `response` schema.
|
|
165
|
+
*/
|
|
166
|
+
serialize?: boolean;
|
|
167
|
+
/** Exception filters for this route. They run before those of the controller. */
|
|
168
|
+
filters?: FilterClass[];
|
|
169
|
+
/** Interceptors around this handler, inside those of the controller. */
|
|
170
|
+
interceptors?: InterceptorClass[];
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* What a route decorator records: its method, its path and its options.
|
|
174
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
175
|
+
*/
|
|
176
|
+
export type RequestHandlerDecoratorProps = HttpRouteOptions & {
|
|
177
|
+
/** The HTTP method of the handler. */
|
|
178
|
+
method?: HTTPMethod;
|
|
179
|
+
/** The path of the route, relative to the controller path. */
|
|
180
|
+
path?: Route;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* A route of an HTTP controller, as `Http.describe()` reports it.
|
|
184
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
185
|
+
*/
|
|
186
|
+
export type HttpRouteDescription = {
|
|
187
|
+
/** The name of the controller method handling the route. */
|
|
188
|
+
name: string;
|
|
189
|
+
/** The HTTP method, in upper case. Server-sent events routes use `GET`. */
|
|
190
|
+
method: string;
|
|
191
|
+
/** The path of the route, relative to the controller path. */
|
|
192
|
+
path: Route;
|
|
193
|
+
/** Whether the route streams server-sent events. */
|
|
194
|
+
sse: boolean;
|
|
195
|
+
/** The index of the method parameter receiving the request body. */
|
|
196
|
+
body?: number;
|
|
197
|
+
/** The index of the method parameter receiving the query. */
|
|
198
|
+
query?: number;
|
|
199
|
+
/** The method parameters receiving URL parameters. */
|
|
200
|
+
params: Array<{
|
|
201
|
+
slug: string;
|
|
202
|
+
index: number;
|
|
203
|
+
}>;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* An HTTP controller, as `Http.describe()` reports it.
|
|
207
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
208
|
+
*/
|
|
209
|
+
export type HttpControllerDescription = {
|
|
210
|
+
/** The path of the controller. */
|
|
211
|
+
path: Route;
|
|
212
|
+
/** The routes of the controller. */
|
|
213
|
+
routes: HttpRouteDescription[];
|
|
136
214
|
};
|
|
137
215
|
export declare namespace Http {
|
|
216
|
+
/**
|
|
217
|
+
* Describes the routes of an HTTP controller, for tools such as the route type generator.
|
|
218
|
+
* Route decorators register their routes on the next tick, so call it after importing the
|
|
219
|
+
* controller and awaiting a tick.
|
|
220
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
221
|
+
* @param controller The controller class.
|
|
222
|
+
* @returns The description, or `undefined` when the class is not an HTTP controller.
|
|
223
|
+
*/
|
|
224
|
+
const describe: (controller: Class<any>) => HttpControllerDescription | undefined;
|
|
138
225
|
/**
|
|
139
226
|
* Marks a class as an HTTP controller.
|
|
140
227
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
141
|
-
* @param
|
|
228
|
+
* @param path The path of the controller. Defaults to `/`.
|
|
229
|
+
* @param options The options of the controller.
|
|
230
|
+
* @example
|
|
231
|
+
* ```ts
|
|
232
|
+
* @Http.controller('/wallets', { tags: ['wallets'] })
|
|
233
|
+
* class WalletController {}
|
|
234
|
+
* ```
|
|
142
235
|
*/
|
|
143
|
-
const controller: (
|
|
236
|
+
const controller: (path?: Route, options?: HttpControllerOptions) => (target: Class<any>) => void;
|
|
144
237
|
/**
|
|
145
238
|
* Marks a method as an HTTP "server-sent events" request handler.
|
|
146
239
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
147
|
-
* @param
|
|
240
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
241
|
+
* @param options The options of the route.
|
|
148
242
|
*/
|
|
149
|
-
const sse: (
|
|
243
|
+
const sse: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
150
244
|
/**
|
|
151
245
|
* Marks a method as an HTTP "get" request handler.
|
|
152
246
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
153
|
-
* @param
|
|
247
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
248
|
+
* @param options The options of the route.
|
|
249
|
+
* @example
|
|
250
|
+
* ```ts
|
|
251
|
+
* @Http.get('/:id', { response: WalletSchema })
|
|
252
|
+
* public show(@Http.param('id') id: string) {}
|
|
253
|
+
* ```
|
|
154
254
|
*/
|
|
155
|
-
const get: (
|
|
255
|
+
const get: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
156
256
|
/**
|
|
157
257
|
* Marks a method as an HTTP "post" request handler.
|
|
158
258
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
159
|
-
* @param
|
|
259
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
260
|
+
* @param options The options of the route.
|
|
160
261
|
*/
|
|
161
|
-
const post: (
|
|
262
|
+
const post: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
162
263
|
/**
|
|
163
264
|
* Marks a method as an HTTP "put" request handler.
|
|
164
265
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
165
|
-
* @param
|
|
266
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
267
|
+
* @param options The options of the route.
|
|
166
268
|
*/
|
|
167
|
-
const put: (
|
|
269
|
+
const put: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
168
270
|
/**
|
|
169
271
|
* Marks a method as an HTTP "delete" request handler.
|
|
170
272
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
171
|
-
* @param
|
|
273
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
274
|
+
* @param options The options of the route.
|
|
172
275
|
*/
|
|
173
|
-
const del: (
|
|
276
|
+
const del: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
174
277
|
/**
|
|
175
278
|
* Marks a method as an HTTP "patch" request handler.
|
|
176
279
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
177
|
-
* @param
|
|
280
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
281
|
+
* @param options The options of the route.
|
|
178
282
|
*/
|
|
179
|
-
const patch: (
|
|
283
|
+
const patch: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
180
284
|
/**
|
|
181
285
|
* Marks a method as an HTTP "head" request handler.
|
|
182
286
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
183
|
-
* @param
|
|
287
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
288
|
+
* @param options The options of the route.
|
|
184
289
|
*/
|
|
185
|
-
const head: (
|
|
290
|
+
const head: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
186
291
|
/**
|
|
187
292
|
* Marks a method as an HTTP "options" request handler.
|
|
188
293
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
189
|
-
* @param
|
|
294
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
295
|
+
* @param options The options of the route.
|
|
190
296
|
*/
|
|
191
|
-
const options: (
|
|
297
|
+
const options: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
192
298
|
/**
|
|
193
299
|
* Marks a method as an HTTP "trace" request handler.
|
|
194
300
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
195
|
-
* @param
|
|
301
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
302
|
+
* @param options The options of the route.
|
|
196
303
|
*/
|
|
197
|
-
const trace: (
|
|
304
|
+
const trace: (path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
198
305
|
/**
|
|
199
306
|
* Marks a method as an HTTP request handler with a custom method.
|
|
200
307
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
201
|
-
* @param
|
|
308
|
+
* @param method The HTTP method.
|
|
309
|
+
* @param path The path of the route, relative to the controller path. Defaults to `/`.
|
|
310
|
+
* @param options The options of the route.
|
|
202
311
|
*/
|
|
203
|
-
const custom: (
|
|
204
|
-
method: HTTPMethod;
|
|
205
|
-
}) => MethodDecorator;
|
|
312
|
+
const custom: (method: HTTPMethod, path?: Route, options?: HttpRouteOptions) => MethodDecorator;
|
|
206
313
|
/**
|
|
207
314
|
* Marks a method as the callback for the request handler.
|
|
208
315
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
@@ -239,3 +346,4 @@ export declare namespace Http {
|
|
|
239
346
|
*/
|
|
240
347
|
const decorate: (handler: Handler) => (() => ParameterDecorator);
|
|
241
348
|
}
|
|
349
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
export { type
|
|
3
|
-
export { type AppContext, type ElysiumPlugin, Application } from './app';
|
|
1
|
+
export { type Elysia, t } from 'elysia';
|
|
2
|
+
export { type Static, type TObject, type TSchema } from 'typebox';
|
|
3
|
+
export { type AppContext, type ElysiumPlugin, type ServerError, Application } from './app';
|
|
4
4
|
export { type CommandArgumentProps, type CommandClass, Command, CommandArgumentType } from './command';
|
|
5
|
-
export { ConsoleFormat, InteractsWithConsole } from './console';
|
|
5
|
+
export { ConsoleFormat, type ConsoleTag, type ConsoleTagStyle, InteractsWithConsole } from './console';
|
|
6
6
|
export { Env } from './env';
|
|
7
|
-
export { type
|
|
8
|
-
export { type LoggerInterface, ConsoleLogger } from './logger';
|
|
9
|
-
export { type Context, type Route, HttpControllerScope, Http } from './http';
|
|
7
|
+
export { type LifecycleEvent, type LifecycleHandler, Lifecycle } from './lifecycle';
|
|
8
|
+
export { type LoggerInterface, ConsoleLogger, getLogger, LOGGER_SERVICE } from './logger';
|
|
9
|
+
export { type Context, type HttpControllerDescription, type HttpControllerOptions, type HttpControllerProps, type HttpRouteDescription, type HttpRouteOptions, type RequestHandlerDecoratorProps, type Route, DATABASE_TRANSACTION_SERVICE, HttpControllerScope, Http } from './http';
|
|
10
10
|
export { Metadata } from './metadata';
|
|
11
|
+
export { currentUserId, userIdOf } from './user';
|
|
12
|
+
export { currentEnvironment } from './utils';
|
|
11
13
|
export { Middleware } from './middleware';
|
|
12
14
|
export { RequestLoggerMiddleware } from './middlewares/request-logger.middleware';
|
|
13
|
-
export { CircularDependencyError, ConflictingModuleConfigError, DuplicateCommandError, DuplicateGlobalServiceError, DuplicateModuleNameError, ElysiumError, EnvironmentSkippedModuleError,
|
|
15
|
+
export { CircularDependencyError, ConflictingModuleConfigError, DuplicateCommandError, DuplicateGlobalServiceError, DuplicateModuleNameError, ElysiumError, EnvironmentSkippedModuleError, LifecycleListenerNotSupportedError, InvalidModuleError, InvalidModuleConfigError, MissingModuleConfigError, ModuleCycleError, OutsideRequestScopeError, ScopeMismatchError, InterceptorNextCalledTwiceError, ServiceNotFoundError, ServiceNotReadyError, ServiceNotVisibleError } from './errors';
|
|
14
16
|
export { needsDefaultAlias, runAll } from './connections';
|
|
15
17
|
export { Kernel, KERNEL_SERVICE } from './kernel';
|
|
16
18
|
export { type ConfiguredModule, type ModuleClass, type ModuleProps, Module } from './module';
|
|
17
19
|
export { ModuleContext } from './module-context';
|
|
18
20
|
export { type ModuleGraph, type ModuleNode } from './module-graph';
|
|
19
|
-
export { type TestingApp, type TestingOptions } from './testing';
|
|
20
|
-
export { type
|
|
21
|
+
export { type TestingApp, type TestingAppOptions, type TestingHttpApp, type TestingOptions, resetContainer } from './testing';
|
|
22
|
+
export { type HttpTestClient, type RequestHandler, type TestResponse, createHttpClient, TestRequest, UnexpectedStatusError } from './http-client';
|
|
23
|
+
export { type OutputLevel, type ServeHandle, type ShutdownSignal, Runtime, RuntimeNotConfiguredError, RuntimeNotSupportedError } from './runtime';
|
|
21
24
|
export { type ServiceDefinition, type ServiceFactoryDefinition, ServiceScope, Service } from './service';
|
|
22
25
|
export { type WampRegistrationOptions, type WampSubscriptionOptions, type WampProps, type WampRegistrationHandlerArgs, type WampSubscriptionHandlerArgs, type WampRegistrationHandler, type WampSubscriptionHandler, type WampClientProps, type WampModuleConfig, Wamp, WampModule } from './wamp';
|
|
23
26
|
export { type WS, type WSError, Websocket } from './websocket';
|
|
@@ -25,7 +28,10 @@ export { type WS, type WSError, Websocket } from './websocket';
|
|
|
25
28
|
* The type for the context of the application.
|
|
26
29
|
* @author Axel Nana <axel.nana@workbud.com>
|
|
27
30
|
*/
|
|
28
|
-
export interface AppHttpContext
|
|
31
|
+
export interface AppHttpContext {
|
|
32
|
+
decorator: Record<string, unknown>;
|
|
33
|
+
store: Record<string, unknown>;
|
|
34
|
+
derive: Record<string, unknown>;
|
|
29
35
|
}
|
|
30
36
|
/**
|
|
31
37
|
* The type for all registered environment variables.
|
|
@@ -34,3 +40,10 @@ export interface AppHttpContext extends SingletonBase {
|
|
|
34
40
|
export interface AppEnv {
|
|
35
41
|
[key: string]: string;
|
|
36
42
|
}
|
|
43
|
+
export { type DomainErrorOptions, type ElysiumProblemCode, type ProblemCatalogue, type ProblemCode, type ProblemContext, type ProblemDetails, type ProblemOptions, type ProblemValidationError, BadRequestError, ConflictError, DomainError, ELYSIUM_PROBLEM_CODES, ForbiddenError, isDomainError, isProblemDetails, NotFoundError, PROBLEM_CONTENT_TYPE, ProblemDetailsSchema, problemResponse, problemType, requestIdOf, statusTitle, toProblem, UnauthenticatedError, ValidationFailedError, validationErrors } from './problem';
|
|
44
|
+
export { type ExceptionFilter, type FilterClass, type FilterContext, Catch } from './filter';
|
|
45
|
+
export { type ResponseSchemas, Resource } from './resource';
|
|
46
|
+
export { type AppRateLimitOptions, type RateLimitHit, type RateLimitKeyContext, type RateLimitOptions, type RateLimitStore, MemoryRateLimitStore, RateLimit, TooManyRequestsError } from './rate-limit';
|
|
47
|
+
export { type Interceptor, type InterceptorClass, type InterceptorContext, TimingInterceptor, TransformInterceptor } from './interceptor';
|
|
48
|
+
export { type EnvironmentIssue, ConflictingEnvironmentSchemaError, InvalidEnvironmentError, mergeEnvironmentSchemas, Secret, validateEnvironment } from './config';
|
|
49
|
+
export { type CorsOptions, type HttpOptions, type SecurityHeadersOptions, clientAddress, DEFAULT_BODY_LIMIT, InvalidCorsOptionsError, PayloadTooLargeError } from './security';
|