Initial commit - Event Planner application

This commit is contained in:
mberlin
2026-03-18 14:55:56 -03:00
commit 86d779eb4d
7548 changed files with 1006324 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
export interface Abstract<T> extends Function {
prototype: T;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,3 @@
export interface ControllerMetadata {
path?: string;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1 @@
export type Controller = object;

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,2 @@
export * from './controller-metadata.interface';
export * from './controller.interface';

View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./controller-metadata.interface"), exports);
tslib_1.__exportStar(require("./controller.interface"), exports);

View File

@@ -0,0 +1,6 @@
import { ExceptionFilter } from './exception-filter.interface';
import { Type } from '../type.interface';
export interface ExceptionFilterMetadata {
func: ExceptionFilter['catch'];
exceptionMetatypes: Type<any>[];
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,18 @@
import { ArgumentsHost } from '../features/arguments-host.interface';
/**
* Interface describing implementation of an exception filter.
*
* @see [Exception Filters](https://docs.nestjs.com/exception-filters)
*
* @publicApi
*/
export interface ExceptionFilter<T = any> {
/**
* Method to implement a custom exception filter.
*
* @param exception the class of the exception being handled
* @param host used to access an array of arguments for
* the in-flight request
*/
catch(exception: T, host: ArgumentsHost): any;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,5 @@
export * from './exception-filter-metadata.interface';
export * from './exception-filter.interface';
export * from './rpc-exception-filter-metadata.interface';
export * from './rpc-exception-filter.interface';
export * from './ws-exception-filter.interface';

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./exception-filter-metadata.interface"), exports);
tslib_1.__exportStar(require("./exception-filter.interface"), exports);
tslib_1.__exportStar(require("./rpc-exception-filter-metadata.interface"), exports);
tslib_1.__exportStar(require("./rpc-exception-filter.interface"), exports);
tslib_1.__exportStar(require("./ws-exception-filter.interface"), exports);

View File

@@ -0,0 +1,6 @@
import { RpcExceptionFilter } from './rpc-exception-filter.interface';
import { Type } from '../type.interface';
export interface RpcExceptionFilterMetadata {
func: RpcExceptionFilter['catch'];
exceptionMetatypes: Type<any>[];
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,19 @@
import { Observable } from 'rxjs';
import { ArgumentsHost } from '../features/arguments-host.interface';
/**
* Interface describing implementation of an RPC exception filter.
*
* @see [Exception Filters](https://docs.nestjs.com/microservices/exception-filters)
*
* @publicApi
*/
export interface RpcExceptionFilter<T = any, R = any> {
/**
* Method to implement a custom (microservice) exception filter.
*
* @param exception the type (class) of the exception being handled
* @param host used to access an array of arguments for
* the in-flight message
*/
catch(exception: T, host: ArgumentsHost): Observable<R>;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,18 @@
import { ArgumentsHost } from '../features/arguments-host.interface';
/**
* Interface describing implementation of a Web Sockets exception filter.
*
* @see [Exception Filters](https://docs.nestjs.com/websockets/exception-filters)
*
* @publicApi
*/
export interface WsExceptionFilter<T = any> {
/**
* Method to implement a custom (web sockets) exception filter.
*
* @param exception the type (class) of the exception being handled
* @param host used to access an array of arguments for
* the in-flight message catch(exception: T, host: ArgumentsHost): any;
*/
catch(exception: T, host: ArgumentsHost): any;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,65 @@
/**
* Options to be passed during transformation.
*
* @see https://github.com/typestack/class-transformer
*
* @publicApi
*/
export interface ClassTransformOptions {
/**
* Exclusion strategy. By default exposeAll is used, which means that it will expose all properties that
* are transformed by default.
*/
strategy?: 'excludeAll' | 'exposeAll';
/**
* Only properties with given groups will be transformed.
*/
groups?: string[];
/**
* Only properties with "since" > version < "until" will be transformed.
*/
version?: number;
/**
* Excludes properties with the given prefixes. For example, if you mark your private properties with "_" and "__"
* you can set this option's value to ["_", "__"] and all private properties will be skipped.
* This works only for "exposeAll" strategy.
*/
excludePrefixes?: string[];
/**
* If set to true then class transformer will ignore all @Expose and @Exclude decorators and what's inside them.
* This option is useful if you want to "clone" your object but not apply decorators affects.
*/
ignoreDecorators?: boolean;
/**
* Target maps allows to set a Types of the transforming object without using @Type decorator.
* This is useful when you are transforming external classes, or if you already have type metadata for
* objects and you don't want to set it up again.
*/
targetMaps?: any[];
/**
* If set to true then class transformer will perform a circular check. (Circular check is turned off by default)
* This option is useful when you know for sure that your types might have a circular dependency.
*/
enableCircularCheck?: boolean;
/**
* If set to true class-transformer will attempt conversion based on TS reflected type
*/
enableImplicitConversion?: boolean;
/**
* If set to true class-transformer will exclude properties which are not part of the original class
* and exposing all class properties (with undefined, if nothing else is given)
*/
excludeExtraneousValues?: boolean;
/**
* If set to true then class transformer will take default values for unprovided fields.
* This is useful when you convert a plain object to a class and have an optional field with a default value.
*/
exposeDefaultValues?: boolean;
/**
* When set to true, fields with `undefined` as value will be included in class to plain transformation. Otherwise
* those fields will be omitted from the result.
*
* DEFAULT: `true`
*/
exposeUnsetFields?: boolean;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,58 @@
type StaticOrigin = boolean | string | RegExp | (string | RegExp)[];
/**
* Set origin to a function implementing some custom logic. The function takes the
* request origin as the first parameter and a callback (which expects the signature
* err [object], allow [bool]) as the second.
*
* @see https://github.com/expressjs/cors
*
* @publicApi
*/
export type CustomOrigin = (requestOrigin: string | undefined, callback: (err: Error | null, origin?: StaticOrigin) => void) => void;
/**
* Interface describing CORS options that can be set.
*
* @see https://github.com/expressjs/cors
* @publicApi
*/
export interface CorsOptions {
/**
* Configures the `Access-Control-Allow-Origins` CORS header. See [here for more detail.](https://github.com/expressjs/cors#configuration-options)
*/
origin?: StaticOrigin | CustomOrigin;
/**
* Configures the Access-Control-Allow-Methods CORS header.
*/
methods?: string | string[];
/**
* Configures the Access-Control-Allow-Headers CORS header.
*/
allowedHeaders?: string | string[];
/**
* Configures the Access-Control-Expose-Headers CORS header.
*/
exposedHeaders?: string | string[];
/**
* Configures the Access-Control-Allow-Credentials CORS header.
*/
credentials?: boolean;
/**
* Configures the Access-Control-Max-Age CORS header.
*/
maxAge?: number;
/**
* Whether to pass the CORS preflight response to the next handler.
*/
preflightContinue?: boolean;
/**
* Provides a status code to use for successful OPTIONS requests.
*/
optionsSuccessStatus?: number;
}
export interface CorsOptionsCallback {
(error: Error | null, options: CorsOptions): void;
}
export interface CorsOptionsDelegate<T> {
(req: T, cb: CorsOptionsCallback): void;
}
export {};

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,105 @@
/**
* Interface describing Https Options that can be set.
*
* @see https://nodejs.org/api/tls.html
*
* @publicApi
*/
export interface HttpsOptions {
/**
* PFX or PKCS12 encoded private key and certificate chain. pfx is an alternative
* to providing key and cert individually. PFX is usually encrypted, if it is,
* passphrase will be used to decrypt it. Multiple PFX can be provided either
* as an array of unencrypted PFX buffers, or an array of objects in the form
* {buf: <string|buffer>[, passphrase: <string>]}. The object form can only
* occur in an array. object.passphrase is optional. Encrypted PFX will be decrypted
* with object.passphrase if provided, or options.passphrase if it is not.
*/
pfx?: any;
/**
* Private keys in PEM format. PEM allows the option of private keys being encrypted.
* Encrypted keys will be decrypted with options.passphrase. Multiple keys using
* different algorithms can be provided either as an array of unencrypted key
* strings or buffers, or an array of objects in the form {pem: <string|buffer>[, passphrase: <string>]}.
* The object form can only occur in an array. object.passphrase is optional.
* Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase
* if it is not
*/
key?: any;
/**
* Shared passphrase used for a single private key and/or a PFX.
*/
passphrase?: string;
/**
* Cert chains in PEM format. One cert chain should be provided per private key.
* Each cert chain should consist of the PEM formatted certificate for a provided
* private key, followed by the PEM formatted intermediate certificates (if any),
* in order, and not including the root CA (the root CA must be pre-known to the
* peer, see ca). When providing multiple cert chains, they do not have to be
* in the same order as their private keys in key. If the intermediate certificates
* are not provided, the peer will not be able to validate the certificate, and
* the handshake will fail.
*/
cert?: any;
/**
* Optionally override the trusted CA certificates. Default is to trust the well-known
* CAs curated by Mozilla. Mozilla's CAs are completely replaced when CAs are
* explicitly specified using this option. The value can be a string or Buffer,
* or an Array of strings and/or Buffers. Any string or Buffer can contain multiple
* PEM CAs concatenated together. The peer's certificate must be chainable to
* a CA trusted by the server for the connection to be authenticated. When using
* certificates that are not chainable to a well-known CA, the certificate's CA
* must be explicitly specified as a trusted or the connection will fail to authenticate.
* If the peer uses a certificate that doesn't match or chain to one of the default
* CAs, use the ca option to provide a CA certificate that the peer's certificate
* can match or chain to. For self-signed certificates, the certificate is its
* own CA, and must be provided. For PEM encoded certificates, supported types
* are "TRUSTED CERTIFICATE", "X509 CERTIFICATE", and "CERTIFICATE". See also tls.rootCertificates.
*/
ca?: any;
/**
* PEM formatted CRLs (Certificate Revocation Lists).
*/
crl?: any;
/**
* Cipher suite specification, replacing the default. For more information, see
* modifying the default cipher suite. Permitted ciphers can be obtained via tls.getCiphers().
* Cipher names must be uppercased in order for OpenSSL to accept them.
*/
ciphers?: string;
/**
* Attempt to use the server's cipher suite preferences instead of the client's.
* When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be set in secureOptions,
* see OpenSSL Options for more information.
*/
honorCipherOrder?: boolean;
/**
* If true the server will request a certificate from clients that connect and
* attempt to verify that certificate. Default: false.
*/
requestCert?: boolean;
/**
* If not false the server will reject any connection which is not authorized
* with the list of supplied CAs. This option only has an effect if requestCert is true. Default: true
*/
rejectUnauthorized?: boolean;
/**
* An array or Buffer of possible NPN protocols. (Protocols should be ordered
* by their priority).
*/
NPNProtocols?: any;
/**
* A function that will be called if the client supports SNI TLS extension. Two
* arguments will be passed when called: servername and cb. SNICallback should
* invoke cb(null, ctx), where ctx is a SecureContext instance. (tls.createSecureContext(...)
* can be used to get a proper SecureContext.) If SNICallback wasn't provided
* the default callback with high-level API will be used.
*/
SNICallback?: (servername: string, cb: (err: Error, ctx: any) => any) => any;
/**
* Optionally affect the OpenSSL protocol behavior, which is not usually necessary.
* This should be used carefully if at all! Value is a numeric bitmask of the SSL_OP_* options
* from OpenSSL Options.
*/
secureOptions?: number;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,6 @@
import { Type } from '../type.interface';
import { ClassTransformOptions } from './class-transform-options.interface';
export interface TransformerPackage {
plainToInstance<T>(cls: Type<T>, plain: unknown, options?: ClassTransformOptions): T | T[];
classToPlain(object: unknown, options?: ClassTransformOptions): Record<string, any> | Record<string, any>[];
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,42 @@
/**
* Validation error description.
* @see https://github.com/typestack/class-validator
*
* class-validator@0.13.0
*
* @publicApi
*/
export interface ValidationError {
/**
* Object that was validated.
*
* OPTIONAL - configurable via the ValidatorOptions.validationError.target option
*/
target?: Record<string, any>;
/**
* Object's property that hasn't passed validation.
*/
property: string;
/**
* Value that haven't pass a validation.
*
* OPTIONAL - configurable via the ValidatorOptions.validationError.value option
*/
value?: any;
/**
* Constraints that failed validation with error messages.
*/
constraints?: {
[type: string]: string;
};
/**
* Contains all nested validation errors of the property.
*/
children?: ValidationError[];
/**
* A transient set of data passed through to the validation result for response mapping
*/
contexts?: {
[type: string]: any;
};
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,76 @@
/**
* Options passed to validator during validation.
* @see https://github.com/typestack/class-validator
*
* class-validator@0.13.0
*
* @publicApi
*/
export interface ValidatorOptions {
/**
* If set to true then class-validator will print extra warning messages to the console when something is not right.
*/
enableDebugMessages?: boolean;
/**
* If set to true then validator will skip validation of all properties that are undefined in the validating object.
*/
skipUndefinedProperties?: boolean;
/**
* If set to true then validator will skip validation of all properties that are null in the validating object.
*/
skipNullProperties?: boolean;
/**
* If set to true then validator will skip validation of all properties that are null or undefined in the validating object.
*/
skipMissingProperties?: boolean;
/**
* If set to true validator will strip validated object of any properties that do not have any decorators.
*
* Tip: if no other decorator is suitable for your property use @Allow decorator.
*/
whitelist?: boolean;
/**
* If set to true, instead of stripping non-whitelisted properties validator will throw an error
*/
forbidNonWhitelisted?: boolean;
/**
* Groups to be used during validation of the object.
*/
groups?: string[];
/**
* Set default for `always` option of decorators. Default can be overridden in decorator options.
*/
always?: boolean;
/**
* If [groups]{@link ValidatorOptions#groups} is not given or is empty,
* ignore decorators with at least one group.
*/
strictGroups?: boolean;
/**
* If set to true, the validation will not use default messages.
* Error message always will be undefined if its not explicitly set.
*/
dismissDefaultMessages?: boolean;
/**
* ValidationError special options.
*/
validationError?: {
/**
* Indicates if target should be exposed in ValidationError.
*/
target?: boolean;
/**
* Indicates if validated value should be exposed in ValidationError.
*/
value?: boolean;
};
/**
* Settings true will cause fail validation of unknown objects.
*/
forbidUnknownValues?: boolean;
/**
* When set to true, validation of the given property will stop after encountering the first error.
* This is enabled by default.
*/
stopAtFirstError?: boolean;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,5 @@
import { ValidationError } from './validation-error.interface';
import { ValidatorOptions } from './validator-options.interface';
export interface ValidatorPackage {
validate(object: unknown, validatorOptions?: ValidatorOptions): ValidationError[] | Promise<ValidationError[]>;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,88 @@
export type ContextType = 'http' | 'ws' | 'rpc';
/**
* Methods to obtain request and response objects.
*
* @publicApi
*/
export interface HttpArgumentsHost {
/**
* Returns the in-flight `request` object.
*/
getRequest<T = any>(): T;
/**
* Returns the in-flight `response` object.
*/
getResponse<T = any>(): T;
getNext<T = any>(): T;
}
/**
* Methods to obtain WebSocket data and client objects.
*
* @publicApi
*/
export interface WsArgumentsHost {
/**
* Returns the data object.
*/
getData<T = any>(): T;
/**
* Returns the client object.
*/
getClient<T = any>(): T;
/**
* Returns the pattern for the event
*/
getPattern(): string;
}
/**
* Methods to obtain RPC data object.
*
* @publicApi
*/
export interface RpcArgumentsHost {
/**
* Returns the data object.
*/
getData<T = any>(): T;
/**
* Returns the context object.
*/
getContext<T = any>(): T;
}
/**
* Provides methods for retrieving the arguments being passed to a handler.
* Allows choosing the appropriate execution context (e.g., Http, RPC, or
* WebSockets) to retrieve the arguments from.
*
* @publicApi
*/
export interface ArgumentsHost {
/**
* Returns the array of arguments being passed to the handler.
*/
getArgs<T extends Array<any> = any[]>(): T;
/**
* Returns a particular argument by index.
* @param index index of argument to retrieve
*/
getArgByIndex<T = any>(index: number): T;
/**
* Switch context to RPC.
* @returns interface with methods to retrieve RPC arguments
*/
switchToRpc(): RpcArgumentsHost;
/**
* Switch context to HTTP.
* @returns interface with methods to retrieve HTTP arguments
*/
switchToHttp(): HttpArgumentsHost;
/**
* Switch context to WebSockets.
* @returns interface with methods to retrieve WebSockets arguments
*/
switchToWs(): WsArgumentsHost;
/**
* Returns the current execution context type (string)
*/
getType<TContext extends string = ContextType>(): TContext;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,22 @@
import { Observable } from 'rxjs';
import { ExecutionContext } from './execution-context.interface';
/**
* Interface defining the `canActivate()` function that must be implemented
* by a guard. Return value indicates whether or not the current request is
* allowed to proceed. Return can be either synchronous (`boolean`)
* or asynchronous (`Promise` or `Observable`).
*
* @see [Guards](https://docs.nestjs.com/guards)
*
* @publicApi
*/
export interface CanActivate {
/**
* @param context Current execution context. Provides access to details about
* the current request pipeline.
*
* @returns Value indicating whether or not the current request is allowed to
* proceed.
*/
canActivate(context: ExecutionContext): boolean | Promise<boolean> | Observable<boolean>;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,5 @@
import { ExecutionContext } from './execution-context.interface';
/**
* @publicApi
*/
export type CustomParamFactory<TData = any, TOutput = any> = (data: TData, context: ExecutionContext) => TOutput;

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,20 @@
import { Type } from '../index';
import { ArgumentsHost } from './arguments-host.interface';
/**
* Interface describing details about the current request pipeline.
*
* @see [Execution Context](https://docs.nestjs.com/guards#execution-context)
*
* @publicApi
*/
export interface ExecutionContext extends ArgumentsHost {
/**
* Returns the *type* of the controller class which the current handler belongs to.
*/
getClass<T = any>(): Type<T>;
/**
* Returns a reference to the handler (method) that will be invoked next in the
* request pipeline.
*/
getHandler(): Function;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,34 @@
import { Observable } from 'rxjs';
import { ExecutionContext } from './execution-context.interface';
/**
* Interface providing access to the response stream.
*
* @see [Interceptors](https://docs.nestjs.com/interceptors)
*
* @publicApi
*/
export interface CallHandler<T = any> {
/**
* Returns an `Observable` representing the response stream from the route
* handler.
*/
handle(): Observable<T>;
}
/**
* Interface describing implementation of an interceptor.
*
* @see [Interceptors](https://docs.nestjs.com/interceptors)
*
* @publicApi
*/
export interface NestInterceptor<T = any, R = any> {
/**
* Method to implement a custom interceptor.
*
* @param context an `ExecutionContext` object providing methods to access the
* route handler and class about to be invoked.
* @param next a reference to the `CallHandler`, which provides access to an
* `Observable` representing the response stream from the route handler.
*/
intercept(context: ExecutionContext, next: CallHandler<T>): Observable<R> | Promise<Observable<R>>;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,4 @@
/**
* @publicApi
*/
export type Paramtype = 'body' | 'query' | 'param' | 'custom';

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,42 @@
import { Type } from '../type.interface';
import { Paramtype } from './paramtype.interface';
export type Transform<T = any> = (value: T, metadata: ArgumentMetadata) => any;
/**
* Interface describing a pipe implementation's `transform()` method metadata argument.
*
* @see [Pipes](https://docs.nestjs.com/pipes)
*
* @publicApi
*/
export interface ArgumentMetadata {
/**
* Indicates whether argument is a body, query, param, or custom parameter
*/
readonly type: Paramtype;
/**
* Underlying base type (e.g., `String`) of the parameter, based on the type
* definition in the route handler.
*/
readonly metatype?: Type<any> | undefined;
/**
* String passed as an argument to the decorator.
* Example: `@Body('userId')` would yield `userId`
*/
readonly data?: string | undefined;
}
/**
* Interface describing implementation of a pipe.
*
* @see [Pipes](https://docs.nestjs.com/pipes)
*
* @publicApi
*/
export interface PipeTransform<T = any, R = any> {
/**
* Method to implement a custom pipe. Called with two parameters
*
* @param value argument before it is received by route handler method
* @param metadata contains metadata about the value
*/
transform(value: T, metadata: ArgumentMetadata): R;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,7 @@
import { RouteInfo } from './middleware';
/**
* @publicApi
*/
export interface GlobalPrefixOptions<T = string | RouteInfo> {
exclude?: T[];
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,3 @@
export interface BeforeApplicationShutdown {
beforeApplicationShutdown(signal?: string): any;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,5 @@
export * from './before-application-shutdown.interface';
export * from './on-application-bootstrap.interface';
export * from './on-application-shutdown.interface';
export * from './on-destroy.interface';
export * from './on-init.interface';

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./before-application-shutdown.interface"), exports);
tslib_1.__exportStar(require("./on-application-bootstrap.interface"), exports);
tslib_1.__exportStar(require("./on-application-shutdown.interface"), exports);
tslib_1.__exportStar(require("./on-destroy.interface"), exports);
tslib_1.__exportStar(require("./on-init.interface"), exports);

View File

@@ -0,0 +1,11 @@
/**
* Interface defining method called once the application has fully started and
* is bootstrapped.
*
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
*
* @publicApi
*/
export interface OnApplicationBootstrap {
onApplicationBootstrap(): any;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,11 @@
/**
* Interface defining method to respond to system signals (when application gets
* shutdown by, e.g., SIGTERM)
*
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
*
* @publicApi
*/
export interface OnApplicationShutdown {
onApplicationShutdown(signal?: string): any;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,12 @@
/**
* Interface defining method called just before Nest destroys the host module
* (`app.close()` method has been evaluated). Use to perform cleanup on
* resources (e.g., Database connections).
*
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
*
* @publicApi
*/
export interface OnModuleDestroy {
onModuleDestroy(): any;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,10 @@
/**
* Interface defining method called once the host module has been initialized.
*
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
*
* @publicApi
*/
export interface OnModuleInit {
onModuleInit(): any;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,6 @@
export type HttpExceptionBodyMessage = string | string[] | number;
export interface HttpExceptionBody {
message: HttpExceptionBodyMessage;
error?: string;
statusCode: number;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,5 @@
import { HttpStatus } from '../../enums';
export interface HttpRedirectResponse {
url: string;
statusCode: HttpStatus;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,70 @@
import { RequestMethod } from '../../enums';
import { NestApplicationOptions } from '../../interfaces/nest-application-options.interface';
import { VersionValue, VersioningOptions } from '../version-options.interface';
export type ErrorHandler<TRequest = any, TResponse = any> = (error: any, req: TRequest, res: TResponse, next?: Function) => any;
export type RequestHandler<TRequest = any, TResponse = any> = (req: TRequest, res: TResponse, next?: Function) => any;
export interface HttpServer<TRequest = any, TResponse = any, ServerInstance = any> {
use(handler: RequestHandler<TRequest, TResponse> | ErrorHandler<TRequest, TResponse>): any;
use(path: string, handler: RequestHandler<TRequest, TResponse> | ErrorHandler<TRequest, TResponse>): any;
useBodyParser?(...args: any[]): any;
get(handler: RequestHandler<TRequest, TResponse>): any;
get(path: string, handler: RequestHandler<TRequest, TResponse>): any;
post(handler: RequestHandler<TRequest, TResponse>): any;
post(path: string, handler: RequestHandler<TRequest, TResponse>): any;
head(handler: RequestHandler<TRequest, TResponse>): any;
head(path: string, handler: RequestHandler<TRequest, TResponse>): any;
delete(handler: RequestHandler<TRequest, TResponse>): any;
delete(path: string, handler: RequestHandler<TRequest, TResponse>): any;
put(handler: RequestHandler<TRequest, TResponse>): any;
put(path: string, handler: RequestHandler<TRequest, TResponse>): any;
patch(handler: RequestHandler<TRequest, TResponse>): any;
patch(path: string, handler: RequestHandler<TRequest, TResponse>): any;
propfind?(handler: RequestHandler<TRequest, TResponse>): any;
propfind?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
proppatch?(handler: RequestHandler<TRequest, TResponse>): any;
proppatch?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
mkcol?(handler: RequestHandler<TRequest, TResponse>): any;
mkcol?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
copy?(handler: RequestHandler<TRequest, TResponse>): any;
copy?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
move?(handler: RequestHandler<TRequest, TResponse>): any;
move?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
lock?(handler: RequestHandler<TRequest, TResponse>): any;
lock?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
unlock?(handler: RequestHandler<TRequest, TResponse>): any;
unlock?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
all(path: string, handler: RequestHandler<TRequest, TResponse>): any;
all(handler: RequestHandler<TRequest, TResponse>): any;
options(handler: RequestHandler<TRequest, TResponse>): any;
options(path: string, handler: RequestHandler<TRequest, TResponse>): any;
search?(handler: RequestHandler<TRequest, TResponse>): any;
search?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
listen(port: number | string, callback?: () => void): any;
listen(port: number | string, hostname: string, callback?: () => void): any;
reply(response: any, body: any, statusCode?: number): any;
status(response: any, statusCode: number): any;
end(response: any, message?: string): any;
render(response: any, view: string, options: any): any;
redirect(response: any, statusCode: number, url: string): any;
isHeadersSent(response: any): boolean;
setHeader(response: any, name: string, value: string): any;
setErrorHandler?(handler: Function, prefix?: string): any;
setNotFoundHandler?(handler: Function, prefix?: string): any;
useStaticAssets?(...args: any[]): this;
setBaseViewsDir?(path: string | string[]): this;
setViewEngine?(engineOrOptions: any): this;
createMiddlewareFactory(method: RequestMethod): ((path: string, callback: Function) => any) | Promise<(path: string, callback: Function) => any>;
getRequestHostname?(request: TRequest): string;
getRequestMethod?(request: TRequest): string;
getRequestUrl?(request: TRequest): string;
getInstance(): ServerInstance;
registerParserMiddleware(...args: any[]): any;
enableCors(options: any): any;
getHttpServer(): any;
initHttpServer(options: NestApplicationOptions): void;
close(): any;
getType(): string;
init?(): Promise<void>;
applyVersionFilter(handler: Function, version: VersionValue, versioningOptions: VersioningOptions): (req: TRequest, res: TResponse, next: () => void) => Function;
normalizePath?(path: string): string;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,5 @@
export * from './http-exception-body.interface';
export * from './http-redirect-response.interface';
export * from './http-server.interface';
export * from './message-event.interface';
export * from './raw-body-request.interface';

8
node_modules/@nestjs/common/interfaces/http/index.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./http-exception-body.interface"), exports);
tslib_1.__exportStar(require("./http-redirect-response.interface"), exports);
tslib_1.__exportStar(require("./http-server.interface"), exports);
tslib_1.__exportStar(require("./message-event.interface"), exports);
tslib_1.__exportStar(require("./raw-body-request.interface"), exports);

View File

@@ -0,0 +1,6 @@
export interface MessageEvent {
data: string | object;
id?: string;
type?: string;
retry?: number;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,6 @@
/**
* @publicApi
*/
export type RawBodyRequest<T> = T & {
rawBody?: Buffer;
};

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

30
node_modules/@nestjs/common/interfaces/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,30 @@
export * from './abstract.interface';
export * from './controllers/controller-metadata.interface';
export * from './controllers/controller.interface';
export * from './exceptions/exception-filter.interface';
export * from './exceptions/rpc-exception-filter.interface';
export * from './exceptions/ws-exception-filter.interface';
export * from './external/validation-error.interface';
export * from './features/arguments-host.interface';
export * from './features/can-activate.interface';
export * from './features/custom-route-param-factory.interface';
export * from './features/execution-context.interface';
export * from './features/nest-interceptor.interface';
export * from './features/paramtype.interface';
export * from './features/pipe-transform.interface';
export * from './global-prefix-options.interface';
export * from './hooks';
export * from './http';
export * from './injectable.interface';
export * from './microservices/nest-hybrid-application-options.interface';
export * from './middleware';
export * from './modules';
export * from './nest-application-context.interface';
export * from './nest-application-options.interface';
export * from './nest-application.interface';
export * from './nest-microservice.interface';
export * from './scope-options.interface';
export * from './shutdown-hooks-options.interface';
export * from './type.interface';
export * from './version-options.interface';
export * from './websockets/web-socket-adapter.interface';

33
node_modules/@nestjs/common/interfaces/index.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./abstract.interface"), exports);
tslib_1.__exportStar(require("./controllers/controller-metadata.interface"), exports);
tslib_1.__exportStar(require("./controllers/controller.interface"), exports);
tslib_1.__exportStar(require("./exceptions/exception-filter.interface"), exports);
tslib_1.__exportStar(require("./exceptions/rpc-exception-filter.interface"), exports);
tslib_1.__exportStar(require("./exceptions/ws-exception-filter.interface"), exports);
tslib_1.__exportStar(require("./external/validation-error.interface"), exports);
tslib_1.__exportStar(require("./features/arguments-host.interface"), exports);
tslib_1.__exportStar(require("./features/can-activate.interface"), exports);
tslib_1.__exportStar(require("./features/custom-route-param-factory.interface"), exports);
tslib_1.__exportStar(require("./features/execution-context.interface"), exports);
tslib_1.__exportStar(require("./features/nest-interceptor.interface"), exports);
tslib_1.__exportStar(require("./features/paramtype.interface"), exports);
tslib_1.__exportStar(require("./features/pipe-transform.interface"), exports);
tslib_1.__exportStar(require("./global-prefix-options.interface"), exports);
tslib_1.__exportStar(require("./hooks"), exports);
tslib_1.__exportStar(require("./http"), exports);
tslib_1.__exportStar(require("./injectable.interface"), exports);
tslib_1.__exportStar(require("./microservices/nest-hybrid-application-options.interface"), exports);
tslib_1.__exportStar(require("./middleware"), exports);
tslib_1.__exportStar(require("./modules"), exports);
tslib_1.__exportStar(require("./nest-application-context.interface"), exports);
tslib_1.__exportStar(require("./nest-application-options.interface"), exports);
tslib_1.__exportStar(require("./nest-application.interface"), exports);
tslib_1.__exportStar(require("./nest-microservice.interface"), exports);
tslib_1.__exportStar(require("./scope-options.interface"), exports);
tslib_1.__exportStar(require("./shutdown-hooks-options.interface"), exports);
tslib_1.__exportStar(require("./type.interface"), exports);
tslib_1.__exportStar(require("./version-options.interface"), exports);
tslib_1.__exportStar(require("./websockets/web-socket-adapter.interface"), exports);

View File

@@ -0,0 +1 @@
export type Injectable = unknown;

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,7 @@
/**
* @publicApi
*/
export interface NestHybridApplicationOptions {
inheritAppConfig?: boolean;
deferInitialization?: boolean;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,5 @@
import { NestApplicationContextOptions } from '../nest-application-context-options.interface';
/**
* @publicApi
*/
export type NestMicroserviceOptions = NestApplicationContextOptions;

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,22 @@
import { Observable } from 'rxjs';
import { ExecutionContext } from '../features/execution-context.interface.js';
/**
* Interface describing a global preRequest hook for microservices.
*
* Hooks are executed before guards, allowing setup of context (e.g. AsyncLocalStorage)
* that is available to all downstream enhancers.
*
* @example
* ```typescript
* const als = new AsyncLocalStorage();
* app.registerPreRequestHook((context, next) => {
* als.enterWith({ correlationId: uuid() });
* return next();
* });
* ```
*
* @publicApi
*/
export interface PreRequestHook {
(context: ExecutionContext, next: () => Observable<unknown>): Observable<unknown>;
}

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,4 @@
export * from './middleware-config-proxy.interface';
export * from './middleware-configuration.interface';
export * from './middleware-consumer.interface';
export * from './nest-middleware.interface';

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./middleware-config-proxy.interface"), exports);
tslib_1.__exportStar(require("./middleware-configuration.interface"), exports);
tslib_1.__exportStar(require("./middleware-consumer.interface"), exports);
tslib_1.__exportStar(require("./nest-middleware.interface"), exports);

View File

@@ -0,0 +1,24 @@
import { Type } from '../type.interface';
import { RouteInfo } from './middleware-configuration.interface';
import { MiddlewareConsumer } from './middleware-consumer.interface';
/**
* @publicApi
*/
export interface MiddlewareConfigProxy {
/**
* Routes to exclude from the current middleware.
*
* @param {(string | RouteInfo)[]} routes
* @returns {MiddlewareConfigProxy}
*/
exclude(...routes: (string | RouteInfo)[]): MiddlewareConfigProxy;
/**
* Attaches either routes or controllers to the current middleware.
* If you pass a controller class, Nest will attach the current middleware to every path
* defined within it.
*
* @param {(string | Type | RouteInfo)[]} routes
* @returns {MiddlewareConsumer}
*/
forRoutes(...routes: (string | Type<any> | RouteInfo)[]): MiddlewareConsumer;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,12 @@
import { RequestMethod } from '../../enums';
import { Type } from '../type.interface';
import { VersionValue } from '../version-options.interface';
export interface RouteInfo {
path: string;
method: RequestMethod;
version?: VersionValue;
}
export interface MiddlewareConfiguration<T = any> {
middleware: T;
forRoutes: (Type<any> | string | RouteInfo)[];
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,18 @@
import { Type } from '../type.interface';
import { MiddlewareConfigProxy } from './middleware-config-proxy.interface';
/**
* Interface defining method for applying user defined middleware to routes.
*
* @see [MiddlewareConsumer](https://docs.nestjs.com/middleware#middleware-consumer)
*
* @publicApi
*/
export interface MiddlewareConsumer {
/**
* @param {...(Type | Function)} middleware middleware class/function or array of classes/functions
* to be attached to the passed routes.
*
* @returns {MiddlewareConfigProxy}
*/
apply(...middleware: (Type<any> | Function)[]): MiddlewareConfigProxy;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,8 @@
/**
* @see [Middleware](https://docs.nestjs.com/middleware)
*
* @publicApi
*/
export interface NestMiddleware<TRequest = any, TResponse = any> {
use(req: TRequest, res: TResponse, next: (error?: any) => void): any;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,25 @@
import { Type } from '../type.interface';
import { ModuleMetadata } from './module-metadata.interface';
/**
* Interface defining a Dynamic Module.
*
* @see [Dynamic Modules](https://docs.nestjs.com/modules#dynamic-modules)
*
* @publicApi
*/
export interface DynamicModule extends ModuleMetadata {
/**
* A module reference
*/
module: Type<any>;
/**
* When "true", makes a module global-scoped.
*
* Once imported into any module, a global-scoped module will be visible
* in all modules. Thereafter, modules that wish to inject a service exported
* from a global module do not need to import the provider module.
*
* @default false
*/
global?: boolean;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,3 @@
export interface ForwardReference<T = any> {
forwardRef: T;
}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,8 @@
export * from './dynamic-module.interface';
export * from './forward-reference.interface';
export * from './injection-token.interface';
export * from './introspection-result.interface';
export * from './module-metadata.interface';
export * from './nest-module.interface';
export * from './optional-factory-dependency.interface';
export * from './provider.interface';

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./dynamic-module.interface"), exports);
tslib_1.__exportStar(require("./forward-reference.interface"), exports);
tslib_1.__exportStar(require("./injection-token.interface"), exports);
tslib_1.__exportStar(require("./introspection-result.interface"), exports);
tslib_1.__exportStar(require("./module-metadata.interface"), exports);
tslib_1.__exportStar(require("./nest-module.interface"), exports);
tslib_1.__exportStar(require("./optional-factory-dependency.interface"), exports);
tslib_1.__exportStar(require("./provider.interface"), exports);

Some files were not shown because too many files have changed in this diff Show More