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,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 });