@vercube/core 0.0.3 → 0.0.5
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 +1193 -0
- package/dist/index.mjs +181 -180
- package/package.json +8 -23
- package/dist/Common/App.d.ts +0 -65
- package/dist/Common/Container.d.ts +0 -8
- package/dist/Common/CreateApp.d.ts +0 -8
- package/dist/Config/Config.d.ts +0 -7
- package/dist/Config/DefaultConfig.d.ts +0 -6
- package/dist/Config/Loader.d.ts +0 -7
- package/dist/Decorators/Hooks/Listen.d.ts +0 -9
- package/dist/Decorators/Http/Body.d.ts +0 -15
- package/dist/Decorators/Http/Connect.d.ts +0 -10
- package/dist/Decorators/Http/Controller.d.ts +0 -10
- package/dist/Decorators/Http/Delete.d.ts +0 -10
- package/dist/Decorators/Http/Get.d.ts +0 -10
- package/dist/Decorators/Http/Head.d.ts +0 -10
- package/dist/Decorators/Http/Header.d.ts +0 -11
- package/dist/Decorators/Http/Headers.d.ts +0 -9
- package/dist/Decorators/Http/Middleware.d.ts +0 -27
- package/dist/Decorators/Http/MultipartFormData.d.ts +0 -15
- package/dist/Decorators/Http/Options.d.ts +0 -10
- package/dist/Decorators/Http/Param.d.ts +0 -12
- package/dist/Decorators/Http/Patch.d.ts +0 -10
- package/dist/Decorators/Http/Post.d.ts +0 -10
- package/dist/Decorators/Http/Put.d.ts +0 -10
- package/dist/Decorators/Http/QueryParam.d.ts +0 -16
- package/dist/Decorators/Http/QueryParams.d.ts +0 -15
- package/dist/Decorators/Http/Redirect.d.ts +0 -13
- package/dist/Decorators/Http/Request.d.ts +0 -9
- package/dist/Decorators/Http/Response.d.ts +0 -9
- package/dist/Decorators/Http/Session.d.ts +0 -9
- package/dist/Decorators/Http/SetHeader.d.ts +0 -7
- package/dist/Decorators/Http/Status.d.ts +0 -11
- package/dist/Decorators/Http/Trace.d.ts +0 -10
- package/dist/Errors/Http/BadRequestError.d.ts +0 -17
- package/dist/Errors/Http/ForbiddenError.d.ts +0 -17
- package/dist/Errors/Http/InternalServerError.d.ts +0 -17
- package/dist/Errors/Http/MethodNotAllowedError.d.ts +0 -17
- package/dist/Errors/Http/NotAcceptableError.d.ts +0 -17
- package/dist/Errors/Http/NotFoundError.d.ts +0 -17
- package/dist/Errors/Http/UnauthorizedError.d.ts +0 -17
- package/dist/Errors/HttpError.d.ts +0 -17
- package/dist/Hooks/Router/RouterAfterInitHook.d.ts +0 -1
- package/dist/Hooks/Router/RouterBeforeInitHook.d.ts +0 -1
- package/dist/Middleware/ValidationMiddleware.d.ts +0 -23
- package/dist/Resolvers/Body.d.ts +0 -22
- package/dist/Resolvers/Headers.d.ts +0 -14
- package/dist/Resolvers/Query.d.ts +0 -14
- package/dist/Resolvers/RouterParam.d.ts +0 -13
- package/dist/Services/Config/RuntimeConfig.d.ts +0 -22
- package/dist/Services/ErrorHandler/DefaultErrorHandlerProvider.d.ts +0 -16
- package/dist/Services/ErrorHandler/ErrorHandlerProvider.d.ts +0 -16
- package/dist/Services/Hooks/HooksService.d.ts +0 -76
- package/dist/Services/HttpServer/HttpServer.d.ts +0 -57
- package/dist/Services/Metadata/MetadataResolver.d.ts +0 -42
- package/dist/Services/Middleware/BaseMiddleware.d.ts +0 -31
- package/dist/Services/Middleware/GlobalMiddlewareRegistry.d.ts +0 -31
- package/dist/Services/Plugins/BasePlugin.d.ts +0 -16
- package/dist/Services/Plugins/PluginsRegistry.d.ts +0 -26
- package/dist/Services/Router/RequestHandler.d.ts +0 -63
- package/dist/Services/Router/Router.d.ts +0 -40
- package/dist/Services/Router/StaticRequestHandler.d.ts +0 -38
- package/dist/Services/Validation/StandardSchemaValidationProvider.d.ts +0 -17
- package/dist/Services/Validation/ValidationProvider.d.ts +0 -17
- package/dist/Types/CommonTypes.d.ts +0 -7
- package/dist/Types/ConfigTypes.d.ts +0 -124
- package/dist/Types/HooksTypes.d.ts +0 -17
- package/dist/Types/HttpTypes.d.ts +0 -63
- package/dist/Types/MetadataTypes.d.ts +0 -56
- package/dist/Types/RouterTypes.d.ts +0 -37
- package/dist/Types/ValidationTypes.d.ts +0 -6
- package/dist/Utils/InternalUtils.d.ts +0 -1
- package/dist/Utils/Mine.d.ts +0 -3
- package/dist/Utils/Utils.d.ts +0 -22
- package/dist/index.cjs +0 -2704
- package/dist/index.d.ts +0 -52
package/package.json
CHANGED
|
@@ -1,45 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Core module for Vercube framework",
|
|
5
5
|
"repository": "@vercube/core",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
|
-
".":
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.mjs",
|
|
13
|
-
"require": "./dist/index.cjs"
|
|
14
|
-
}
|
|
10
|
+
".": "./dist/index.mjs"
|
|
15
11
|
},
|
|
16
|
-
"
|
|
17
|
-
"module": "./dist/index.mjs",
|
|
18
|
-
"types": "./dist/index.d.ts",
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
19
13
|
"files": [
|
|
20
14
|
"dist",
|
|
21
15
|
"README.md"
|
|
22
16
|
],
|
|
23
17
|
"dependencies": {
|
|
24
18
|
"@standard-schema/spec": "1.0.0",
|
|
25
|
-
"c12": "3.0.
|
|
19
|
+
"c12": "3.0.4",
|
|
26
20
|
"defu": "6.1.4",
|
|
27
21
|
"pathe": "2.0.3",
|
|
28
|
-
"rou3": "0.6.
|
|
29
|
-
"srvx": "0.
|
|
30
|
-
"@vercube/di": "0.0.
|
|
31
|
-
"@vercube/logger": "0.0.
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@vitest/coverage-v8": "^3.1.2",
|
|
35
|
-
"vitest": "^3.1.2"
|
|
22
|
+
"rou3": "0.6.3",
|
|
23
|
+
"srvx": "0.7.5",
|
|
24
|
+
"@vercube/di": "0.0.5",
|
|
25
|
+
"@vercube/logger": "0.0.5"
|
|
36
26
|
},
|
|
37
27
|
"publishConfig": {
|
|
38
28
|
"access": "public"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"test": "vitest",
|
|
42
|
-
"test:watch": "vitest watch",
|
|
43
|
-
"test:coverage": "vitest run --coverage"
|
|
44
29
|
}
|
|
45
30
|
}
|
package/dist/Common/App.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { type Container } from "@vercube/di";
|
|
2
|
-
import type { BasePlugin } from "../Services/Plugins/BasePlugin.js";
|
|
3
|
-
import { ConfigTypes } from "../Types/ConfigTypes.js";
|
|
4
|
-
/**
|
|
5
|
-
* Represents the main application class.
|
|
6
|
-
*/
|
|
7
|
-
export declare class App {
|
|
8
|
-
private gRouter;
|
|
9
|
-
private gPluginsRegistry;
|
|
10
|
-
private gHttpServer;
|
|
11
|
-
private gStaticRequestHandler;
|
|
12
|
-
private gLogger;
|
|
13
|
-
/** Holds the initialization status of the application */
|
|
14
|
-
private fIsInitialized;
|
|
15
|
-
/** Holds the dependency injection container */
|
|
16
|
-
private fInternalContainer;
|
|
17
|
-
/** Hold app config */
|
|
18
|
-
private fConfig;
|
|
19
|
-
/**
|
|
20
|
-
* Gets the dependency injection container.
|
|
21
|
-
*
|
|
22
|
-
* @returns {Container} The dependency injection container.
|
|
23
|
-
*/
|
|
24
|
-
get container(): Container;
|
|
25
|
-
/**
|
|
26
|
-
* Sets the dependency injection container.
|
|
27
|
-
*
|
|
28
|
-
* @param {Container} container - The dependency injection container.
|
|
29
|
-
*/
|
|
30
|
-
set container(container: Container);
|
|
31
|
-
/**
|
|
32
|
-
* Initializes the application.
|
|
33
|
-
*
|
|
34
|
-
* @returns {Promise<void>} A promise that resolves when the application is initialized.
|
|
35
|
-
*/
|
|
36
|
-
init(cfg: ConfigTypes.Config): Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* Registers a plugin.
|
|
39
|
-
*
|
|
40
|
-
* @param {typeof Plugin} plugin - The plugin to register.
|
|
41
|
-
* @param {unknown} options - The options to pass to the plugin.
|
|
42
|
-
*/
|
|
43
|
-
registerPlugin<T>(plugin: typeof BasePlugin<T>, options?: T): void;
|
|
44
|
-
/**
|
|
45
|
-
* Starts the application and begins listening for incoming requests.
|
|
46
|
-
*
|
|
47
|
-
* @returns {Promise<void>} A promise that resolves when the application starts listening.
|
|
48
|
-
* @throws {Error} If the application is already initialized.
|
|
49
|
-
*/
|
|
50
|
-
listen(): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Handles an incoming HTTP request.
|
|
53
|
-
* This method is an adapter for HttpServer.handleRequest method.
|
|
54
|
-
*
|
|
55
|
-
* @param {Request} request - The incoming HTTP request
|
|
56
|
-
* @returns {Promise<Response>} The HTTP response
|
|
57
|
-
*/
|
|
58
|
-
fetch(request: Request): Promise<Response>;
|
|
59
|
-
/**
|
|
60
|
-
* Resolves and initializes the plugins for the application.
|
|
61
|
-
*
|
|
62
|
-
* @private
|
|
63
|
-
*/
|
|
64
|
-
private resolvePlugins;
|
|
65
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Container } from "@vercube/di";
|
|
2
|
-
import { ConfigTypes } from "../Types/ConfigTypes.js";
|
|
3
|
-
/**
|
|
4
|
-
* Creates and configures a new dependency injection container for the application.
|
|
5
|
-
*
|
|
6
|
-
* @returns {Container} A configured dependency injection container.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createContainer(config: ConfigTypes.Config): Container;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { App } from "../Common/App.js";
|
|
2
|
-
import { ConfigTypes } from "../Types/ConfigTypes.js";
|
|
3
|
-
/**
|
|
4
|
-
* Creates and initializes an instance of the App.
|
|
5
|
-
*
|
|
6
|
-
* @returns {Promise<App>} A promise that resolves to an instance of the App.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createApp(cfg?: ConfigTypes.Config): Promise<App>;
|
package/dist/Config/Config.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ConfigTypes } from "../Types/ConfigTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* Defines a configuration object for the application
|
|
4
|
-
* @param {ConfigTypes.Config} config - The configuration object to validate
|
|
5
|
-
* @returns {ConfigTypes.Config} The validated configuration object
|
|
6
|
-
*/
|
|
7
|
-
export declare function defineConfig(config: ConfigTypes.Config): ConfigTypes.Config;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ConfigTypes } from "../Types/ConfigTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* Default configuration for the Vercube application.
|
|
4
|
-
* This configuration serves as the base settings and can be overridden by user configuration.
|
|
5
|
-
*/
|
|
6
|
-
export declare const defaultConfig: ConfigTypes.Config;
|
package/dist/Config/Loader.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ConfigTypes } from "../Types/ConfigTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* Loads the configuration object for the application
|
|
4
|
-
* @param {ConfigTypes.Config} overrides - The configuration object to load
|
|
5
|
-
* @returns {ConfigTypes.Config} The loaded configuration object
|
|
6
|
-
*/
|
|
7
|
-
export declare function loadVercubeConfig(overrides?: ConfigTypes.Config): Promise<ConfigTypes.Config>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { HooksTypes } from "../../Types/HooksTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* This decorator stores metadata about hook listeners. It can be later used along with function
|
|
4
|
-
* applyEventListeners() to automatically register all listeners.
|
|
5
|
-
*
|
|
6
|
-
* @param hookType hook to listen for
|
|
7
|
-
* @return decorator function
|
|
8
|
-
*/
|
|
9
|
-
export declare function Listen(hookType: HooksTypes.HookType<unknown>): Function;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ValidationTypes } from "../../Types/ValidationTypes.js";
|
|
2
|
-
interface BodyDecoratorOptions {
|
|
3
|
-
validationSchema?: ValidationTypes.Schema;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* @function Body
|
|
7
|
-
* @returns {Function} A decorator function that registers the BodyDecorator.
|
|
8
|
-
*
|
|
9
|
-
* This function creates and returns a decorator that can be used to annotate
|
|
10
|
-
* a parameter in a method to indicate that it should be populated with the
|
|
11
|
-
* body of an HTTP request. The decorator uses the BodyDecorator class to
|
|
12
|
-
* handle the metadata associated with the parameter.
|
|
13
|
-
*/
|
|
14
|
-
export declare function Body(options?: BodyDecoratorOptions): Function;
|
|
15
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a ConnectDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method with CONNECT route information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the CONNECT route.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Connect(path: string): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a Controller decorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a class with controller metadata, including the base path for the controller.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The base path for the controller.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Controller(path: string): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a DeleteDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method with DELETE route information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the DELETE route.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Delete(path: string): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A decorator function for handling HTTP GET requests.
|
|
3
|
-
*
|
|
4
|
-
* This function creates an instance of the GetDecorator class and registers
|
|
5
|
-
* the GET route with the specified path.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the GET route.
|
|
8
|
-
* @returns {Function} - The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Get(path: string): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a HeadDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method with HEAD route information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the HEAD route.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Head(path: string): Function;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A decorator function for handling HTTP header parameters.
|
|
3
|
-
*
|
|
4
|
-
* This function creates a HeaderDecorator with the specified name and registers it.
|
|
5
|
-
* It is used to annotate a parameter in a method to indicate that it should be
|
|
6
|
-
* populated with the value of a specific HTTP header.
|
|
7
|
-
*
|
|
8
|
-
* @param {string} name - The name of the HTTP header to bind to the parameter.
|
|
9
|
-
* @returns {Function} - A decorator function that registers the HeaderDecorator.
|
|
10
|
-
*/
|
|
11
|
-
export declare function Header(name: string): Function;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a HeadersDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method parameter with headers information.
|
|
6
|
-
*
|
|
7
|
-
* @return {Function} The decorator function.
|
|
8
|
-
*/
|
|
9
|
-
export declare function Headers(): Function;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { BaseMiddleware } from "../../Services/Middleware/BaseMiddleware.js";
|
|
2
|
-
import { MetadataTypes } from "../../Types/MetadataTypes.js";
|
|
3
|
-
interface MiddlewareDecoratorParams extends Omit<MetadataTypes.Middleware, "middleware"> {}
|
|
4
|
-
/**
|
|
5
|
-
* Decorator that applies middleware to a class or method
|
|
6
|
-
* @param middleware - The middleware class to apply
|
|
7
|
-
* @param opts - Optional configuration parameters
|
|
8
|
-
* @param opts.type - The type of middleware ('before' or 'after')
|
|
9
|
-
* @param opts.priority - Priority order for middleware execution (default: 999)
|
|
10
|
-
* @returns A decorator function that can be applied to classes or methods
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* @Middleware(AuthMiddleware)
|
|
15
|
-
* class UserController {
|
|
16
|
-
* // ...
|
|
17
|
-
* }
|
|
18
|
-
*
|
|
19
|
-
* // Or on a specific method:
|
|
20
|
-
* @Middleware(ValidationMiddleware, { type: 'before', priority: 1 })
|
|
21
|
-
* public async createUser() {
|
|
22
|
-
* // ...
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare function Middleware(middleware: typeof BaseMiddleware, opts?: MiddlewareDecoratorParams): Function;
|
|
27
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Decorator function that marks a parameter as multipart/form-data request body.
|
|
3
|
-
* This decorator will automatically parse incoming multipart form data
|
|
4
|
-
*
|
|
5
|
-
* @decorator
|
|
6
|
-
* @returns {Function} A decorator function that can be applied to method parameters
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* class UserController {
|
|
10
|
-
* uploadFile(@MultipartFormData() formData: MyData) {
|
|
11
|
-
* // Handle multipart form data
|
|
12
|
-
* }
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export declare function MultipartFormData(): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating an OptionsDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method with OPTIONS route information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the OPTIONS route.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Options(path: string): Function;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a ParamDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method parameter with parameter information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} name - The name of the parameter.
|
|
8
|
-
* @param {Object} [opts] - Optional settings for the parameter.
|
|
9
|
-
* @param {boolean} [opts.decode=false] - Whether to decode the parameter.
|
|
10
|
-
* @return {Function} The decorator function.
|
|
11
|
-
*/
|
|
12
|
-
export declare function Param(name: string): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a PatchDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method with PATCH route information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the PATCH route.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Patch(path: string): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a PostDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method with POST route information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the POST route.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Post(path: string): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a PutDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method with PUT route information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the PUT route.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Put(path: string): Function;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ValidationTypes } from "../../Types/ValidationTypes.js";
|
|
2
|
-
interface QueryParamDecoratorOptions {
|
|
3
|
-
name: string;
|
|
4
|
-
validationSchema?: ValidationTypes.Schema;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* A factory function for creating a QueryDecorator.
|
|
8
|
-
*
|
|
9
|
-
* This function returns a decorator function that can be used to annotate
|
|
10
|
-
* a method parameter with query parameter information.
|
|
11
|
-
*
|
|
12
|
-
* @param {QueryParamDecoratorOptions} options - The options for the decorator.
|
|
13
|
-
* @return {Function} The decorator function.
|
|
14
|
-
*/
|
|
15
|
-
export declare function QueryParam(options: QueryParamDecoratorOptions): Function;
|
|
16
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ValidationTypes } from "../../Types/ValidationTypes.js";
|
|
2
|
-
interface QueryParamsDecoratorOptions {
|
|
3
|
-
validationSchema?: ValidationTypes.Schema;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* A factory function for creating a QueryParamsDecorator.
|
|
7
|
-
*
|
|
8
|
-
* This function returns a decorator function that can be used to annotate
|
|
9
|
-
* a method parameter with query parameter information.
|
|
10
|
-
*
|
|
11
|
-
* @param {QueryParamsDecoratorOptions} options - The options for the decorator.
|
|
12
|
-
* @return {Function} The decorator function.
|
|
13
|
-
*/
|
|
14
|
-
export declare function QueryParams(options?: QueryParamsDecoratorOptions): Function;
|
|
15
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { HTTPStatus } from "../../Types/HttpTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
* Creates a Redirect decorator.
|
|
5
|
-
|
|
6
|
-
* @param {string} location - The location header value.
|
|
7
|
-
|
|
8
|
-
* @param {number} [code=301] - The status code.
|
|
9
|
-
|
|
10
|
-
* @returns {Function} The decorator function.
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
export declare function Redirect(location: string, code?: HTTPStatus): Function;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a RequestDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method parameter with request information.
|
|
6
|
-
*
|
|
7
|
-
* @return {Function} The decorator function.
|
|
8
|
-
*/
|
|
9
|
-
export declare function Request(): Function;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a ResponseDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method parameter with response information.
|
|
6
|
-
*
|
|
7
|
-
* @return {Function} The decorator function.
|
|
8
|
-
*/
|
|
9
|
-
export declare function Response(): Function;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a SessionDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method parameter with session information.
|
|
6
|
-
*
|
|
7
|
-
* @return {Function} The decorator function.
|
|
8
|
-
*/
|
|
9
|
-
export declare function Session(): Function;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HTTPStatus } from "../../Types/HttpTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
* Creates a Status decorator.
|
|
5
|
-
|
|
6
|
-
* @param {number} code - The status value.
|
|
7
|
-
|
|
8
|
-
* @returns {Function} The decorator function.
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export declare function Status(code: HTTPStatus): Function;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A factory function for creating a TraceDecorator.
|
|
3
|
-
*
|
|
4
|
-
* This function returns a decorator function that can be used to annotate
|
|
5
|
-
* a method with TRACE route information.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path - The path for the TRACE route.
|
|
8
|
-
* @return {Function} The decorator function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Trace(path: string): Function;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HttpError } from "../HttpError.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a Bad Request error (HTTP 400).
|
|
4
|
-
* @extends {HttpError}
|
|
5
|
-
*/
|
|
6
|
-
export declare class BadRequestError extends HttpError {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the error.
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of BadRequestError.
|
|
14
|
-
* @param {string} [message] - The error message.
|
|
15
|
-
*/
|
|
16
|
-
constructor(message?: string, errors?: any);
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HttpError } from "../HttpError.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a Forbidden error (HTTP 403).
|
|
4
|
-
* @extends {HttpError}
|
|
5
|
-
*/
|
|
6
|
-
export declare class ForbiddenError extends HttpError {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the error.
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of ForbiddenError.
|
|
14
|
-
* @param {string} [message] - The error message.
|
|
15
|
-
*/
|
|
16
|
-
constructor(message?: string);
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HttpError } from "../HttpError.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents an Internal Server error (HTTP 500).
|
|
4
|
-
* @extends {HttpError}
|
|
5
|
-
*/
|
|
6
|
-
export declare class InternalServerError extends HttpError {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the error.
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of InternalServerError.
|
|
14
|
-
* @param {string} [message] - The error message.
|
|
15
|
-
*/
|
|
16
|
-
constructor(message?: string);
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HttpError } from "../HttpError.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a Method Not Allowed error (HTTP 405).
|
|
4
|
-
* @extends {HttpError}
|
|
5
|
-
*/
|
|
6
|
-
export declare class MethodNotAllowedError extends HttpError {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the error.
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of MethodNotAllowedError.
|
|
14
|
-
* @param {string} [message] - The error message.
|
|
15
|
-
*/
|
|
16
|
-
constructor(message?: string);
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HttpError } from "../HttpError.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a Not Acceptable error (HTTP 406).
|
|
4
|
-
* @extends {HttpError}
|
|
5
|
-
*/
|
|
6
|
-
export declare class NotAcceptableError extends HttpError {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the error.
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of NotAcceptableError.
|
|
14
|
-
* @param {string} [message] - The error message.
|
|
15
|
-
*/
|
|
16
|
-
constructor(message?: string);
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HttpError } from "../HttpError.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a Not Found error (HTTP 404).
|
|
4
|
-
* @extends {HttpError}
|
|
5
|
-
*/
|
|
6
|
-
export declare class NotFoundError extends HttpError {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the error.
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of NotFoundError.
|
|
14
|
-
* @param {string} [message] - The error message.
|
|
15
|
-
*/
|
|
16
|
-
constructor(message?: string);
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HttpError } from "../HttpError.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents an Unauthorized error (HTTP 401).
|
|
4
|
-
* @extends {HttpError}
|
|
5
|
-
*/
|
|
6
|
-
export declare class UnauthorizedError extends HttpError {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the error.
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of UnauthorizedError.
|
|
14
|
-
* @param {string} [message] - The error message.
|
|
15
|
-
*/
|
|
16
|
-
constructor(message?: string);
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents an HTTP error.
|
|
3
|
-
* @extends {Error}
|
|
4
|
-
*/
|
|
5
|
-
export declare class HttpError extends Error {
|
|
6
|
-
/**
|
|
7
|
-
* The HTTP status code associated with the error.
|
|
8
|
-
* @type {number}
|
|
9
|
-
*/
|
|
10
|
-
status: number;
|
|
11
|
-
/**
|
|
12
|
-
* Creates an instance of HttpError.
|
|
13
|
-
* @param {number} status - The HTTP status code.
|
|
14
|
-
* @param {string} [message] - The error message.
|
|
15
|
-
*/
|
|
16
|
-
constructor(status: number, message?: string);
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare class RouterAfterInitHook {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare class RouterBeforeInitHook {}
|