From c7997ed8aa11b709f5e90ce703563ed208f8d6d1 Mon Sep 17 00:00:00 2001 From: Arthur Simas Date: Wed, 22 Jun 2022 19:13:24 -0300 Subject: [PATCH 1/4] FEAT: squash - auth guard nestjs access controll mock swagger implementation middleware changes and lib permissions file back to maestro FEAT: sending permissions to duc on startup FEAT: new permissions.enum format FEAT: permissions injection (maestro -> duc) FIX: changing method invocation order FEAT: refactored permission enum + duc permission injector + grpcHandler FEAT: auth guards FEAT: seq ids updated --- nest-cli.json | 9 +- package-lock.json | 27 ++ package.json | 1 + src/app.module.ts | 39 +-- .../authentication.decorator.ts | 28 ++ src/authentication/authentication.guard.ts | 158 +++++++++ src/authentication/permissions.enum.ts | 216 +++++++++++++ src/authentication/user.decorator.ts | 23 ++ src/clients/auth/client.service.ts | 301 ++++++------------ src/clients/{auth => duc}/client.config.ts | 13 +- src/clients/permissions/client.service.ts | 33 ++ src/middlewares/authentication.ts | 135 -------- src/modules/auth/auth.controller.ts | 249 ++++++--------- src/modules/auth/auth.service.spec.ts | 152 --------- src/modules/catalog/catalog.controller.ts | 22 ++ src/modules/health/health.controller.ts | 2 + src/modules/inputs/inputs.controller.ts | 32 ++ src/modules/outputs/outputs.controllers.ts | 24 +- src/modules/pipelines/pipelines.controller.ts | 22 ++ .../transformations.controller.ts | 22 ++ src/utils/ErrorBuilder.ts | 86 ++--- src/utils/grpcHandler.ts | 19 ++ swagger.json | 2 +- 23 files changed, 908 insertions(+), 707 deletions(-) create mode 100644 src/authentication/authentication.decorator.ts create mode 100644 src/authentication/authentication.guard.ts create mode 100644 src/authentication/permissions.enum.ts create mode 100644 src/authentication/user.decorator.ts rename src/clients/{auth => duc}/client.config.ts (66%) create mode 100644 src/clients/permissions/client.service.ts delete mode 100644 src/middlewares/authentication.ts delete mode 100644 src/modules/auth/auth.service.spec.ts create mode 100644 src/utils/grpcHandler.ts diff --git a/nest-cli.json b/nest-cli.json index 066d065..2edc9db 100644 --- a/nest-cli.json +++ b/nest-cli.json @@ -2,7 +2,12 @@ "collection": "@nestjs/schematics", "sourceRoot": "src", "compilerOptions": { - "assets": ["**/*.proto"], + "assets": [ + "**/*.proto" + ], + "plugins": [ + "@nestjs/swagger" + ], "watchAssets": true } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index cb12ea7..cce02db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "@nestjs/schedule": "^1.1.0", "@nestjs/swagger": "^5.2.1", "@victorradael/protospack": "2.5.0", + "@victorradael/protospack-v2": "../protospack", "axios": "^0.25.0", "cron-parser": "^4.4.0", "dotenv": "^14.2.0", @@ -66,6 +67,19 @@ "node": "18.3.0" } }, + "../protospack": { + "name": "@victorradael/protospack-v2", + "version": "1.1.0", + "license": "ISC", + "dependencies": { + "rxjs": "^7.5.5", + "ts-proto": "^1.112.2" + }, + "devDependencies": { + "@types/node": "^17.0.21", + "typescript": "^4.6.2" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -3226,6 +3240,10 @@ "rxjs": "^7.5.5" } }, + "node_modules/@victorradael/protospack-v2": { + "resolved": "../protospack", + "link": true + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -12670,6 +12688,15 @@ "rxjs": "^7.5.5" } }, + "@victorradael/protospack-v2": { + "version": "file:../protospack", + "requires": { + "@types/node": "^17.0.21", + "rxjs": "^7.5.5", + "ts-proto": "^1.112.2", + "typescript": "^4.6.2" + } + }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", diff --git a/package.json b/package.json index 295fae1..34a2ed5 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@nestjs/schedule": "^1.1.0", "@nestjs/swagger": "^5.2.1", "@victorradael/protospack": "2.5.0", + "@victorradael/protospack-v2": "../protospack", "axios": "^0.25.0", "cron-parser": "^4.4.0", "dotenv": "^14.2.0", diff --git a/src/app.module.ts b/src/app.module.ts index 361f1be..f511377 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -1,9 +1,7 @@ -import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; +import { Module } from '@nestjs/common'; import { ClientsModule } from '@nestjs/microservices'; import { ConfigModule } from '@nestjs/config'; -import { LoggerMiddleware } from './middlewares/authentication'; - import { InputsController } from './modules/inputs/inputs.controller'; import { TransformationsController } from './modules/transformations/transformations.controller'; import { OutputsController } from './modules/outputs/outputs.controllers'; @@ -15,18 +13,18 @@ import { InputsService } from './modules/inputs/inputs.service'; import { TransformationsService } from './modules/transformations/transformations.service'; import { OutputsService } from './modules/outputs/outputs.service'; import { PipelinesService } from './modules/pipelines/pipelines.service'; -// import { AuthService } from './modules/auth/auth.service'; import { HealthService } from './modules/health/health.service'; +import { AuthClientService } from './clients/auth/client.service'; import { InputsClientService } from './clients/inputs/client.service'; import { TransformationsClientService } from './clients/transformations/client.service'; import { OutputsClientService } from './clients/outputs/client.service'; import { PipelinesClientService } from './clients/pipelines/client.service'; -import { AuthClientService } from './clients/auth/client.service'; +import { PermissionsClientService } from './clients/permissions/client.service'; import { OutputsClientConfiguration } from './clients/outputs/client.config'; import { TransformationsClientConfiguration } from './clients/transformations/client.config'; -import { AuthClient } from './clients/auth/client.config'; +import { DucClient } from './clients/duc/client.config'; import { InputsClientConfiguration } from './clients/inputs/client.config'; import { PipelinesClientConfiguration } from './clients/pipelines/client.config'; import { CatalogController } from './modules/catalog/catalog.controller'; @@ -34,8 +32,10 @@ import { CatalogService } from './modules/catalog/catalog.service'; import { HubspotStrategy } from './modules/oauth/passport-strategies/hubspot'; import { OauthController } from './modules/oauth/oauth.controller'; import { getOauthSecrets } from './utils/OauthSecrets'; +import { AuthenticationGuard } from './authentication/authentication.guard'; +import { APP_GUARD } from '@nestjs/core'; -const authClient = new AuthClient(); +const ducClient = new DucClient(); const inputClient = new InputsClientConfiguration(); const outputClient = new OutputsClientConfiguration(); const pipelineClient = new PipelinesClientConfiguration(); @@ -58,15 +58,19 @@ const transformationClient = new TransformationsClientConfiguration(); TransformationsService, OutputsService, PipelinesService, - // AuthService, HealthService, InputsClientService, TransformationsClientService, OutputsClientService, PipelinesClientService, AuthClientService, + PermissionsClientService, CatalogService, HubspotStrategy, + { + provide: APP_GUARD, + useClass: AuthenticationGuard, + }, ], imports: [ ConfigModule.forRoot({ @@ -78,7 +82,6 @@ const transformationClient = new TransformationsClientConfiguration(); name: 'INPUTS_PACKAGE', ...inputClient.config(), }, - { name: 'TRANSFORMATIONS_PACKAGE', ...transformationClient.config(), @@ -88,8 +91,8 @@ const transformationClient = new TransformationsClientConfiguration(); ...outputClient.config(), }, { - name: 'AUTH_PACKAGE', - ...authClient.config(), + name: 'DUC_PACKAGE', + ...ducClient.config(), }, { name: 'PIPELINES_PACKAGE', @@ -98,16 +101,4 @@ const transformationClient = new TransformationsClientConfiguration(); ]), ], }) -export class AppModule implements NestModule { - configure(consumer: MiddlewareConsumer) { - consumer - .apply(LoggerMiddleware) - .forRoutes( - InputsController, - TransformationsController, - OutputsController, - PipelinesController, - CatalogController, - ); - } -} +export class AppModule {} diff --git a/src/authentication/authentication.decorator.ts b/src/authentication/authentication.decorator.ts new file mode 100644 index 0000000..e840f54 --- /dev/null +++ b/src/authentication/authentication.decorator.ts @@ -0,0 +1,28 @@ +import { SetMetadata, applyDecorators } from '@nestjs/common'; +import { Request } from 'express'; +import { Permission } from './permissions.enum'; + +export const PERMISSIONS_KEY = '__PERMISSIONS__'; +export const MUST_BE_AUTHENTICATED_KEY = '__MUST_BE_AUTHENTICATED__'; +export const CUSTOM_AUTHENTICATION_FUNCTION_KEY = + '__CUSTOM_AUTHENTICATION_FUNCTION__'; + +export type AuthenticationFunction = (req: Request, user: any) => boolean; + +export function RequirePermissions(...permissions: Permission[]) { + return applyDecorators( + SetMetadata(PERMISSIONS_KEY, permissions), + SetMetadata(MUST_BE_AUTHENTICATED_KEY, true), + ); +} + +export function AuthenticateCondition(func: AuthenticationFunction) { + return applyDecorators( + SetMetadata(CUSTOM_AUTHENTICATION_FUNCTION_KEY, func), + SetMetadata(MUST_BE_AUTHENTICATED_KEY, true), + ); +} + +export function Authenticated() { + return SetMetadata(MUST_BE_AUTHENTICATED_KEY, true); +} diff --git a/src/authentication/authentication.guard.ts b/src/authentication/authentication.guard.ts new file mode 100644 index 0000000..bf4fbf2 --- /dev/null +++ b/src/authentication/authentication.guard.ts @@ -0,0 +1,158 @@ +import { + Injectable, + CanActivate, + OnApplicationBootstrap, + ExecutionContext, + Logger, +} from '@nestjs/common'; +import { Reflector } from '@nestjs/core'; +import assert from 'assert'; +import jwt from 'jsonwebtoken'; + +import { AuthClientService } from '../clients/auth/client.service'; +import { Permission } from './permissions.enum'; +import { + AuthenticationFunction, + PERMISSIONS_KEY, + CUSTOM_AUTHENTICATION_FUNCTION_KEY, + MUST_BE_AUTHENTICATED_KEY, +} from './authentication.decorator'; +import ErrorBuilder from '../utils/ErrorBuilder'; +import ErrorCodes from '../utils/errorCodes'; + +@Injectable() +export class AuthenticationGuard + implements CanActivate, OnApplicationBootstrap +{ + private readonly logger = new Logger(AuthenticationGuard.name); + + pems: Map; + + constructor( + private reflector: Reflector, + private authClient: AuthClientService, + ) { + this.pems = new Map(); + } + + async onApplicationBootstrap() { + return this.loadDucJWKS(); + } + + async loadDucJWKS() { + const { keys } = await this.authClient.getPublicKeys(); + + keys.forEach((key) => { + this.pems.set(key.kid, key.pem); + }); + } + + canActivate(ctx: ExecutionContext): boolean { + const requiredPermissions = this.reflector.getAllAndOverride( + PERMISSIONS_KEY, + [ctx.getHandler(), ctx.getClass()], + ); + const customAuthenticationFunction = + this.reflector.getAllAndOverride( + CUSTOM_AUTHENTICATION_FUNCTION_KEY, + [ctx.getHandler(), ctx.getClass()], + ); + const mustBeAuthenticated = this.reflector.getAllAndOverride( + MUST_BE_AUTHENTICATED_KEY, + [ctx.getHandler(), ctx.getClass()], + ); + + const request = ctx.switchToHttp().getRequest(); + const accessToken = this.verifyToken(request); + + if (!accessToken) { + // couldn't load valid token + + if (!mustBeAuthenticated) { + // no need to be authenticated + return true; + } + + throw new ErrorBuilder(ErrorCodes.AUTH.UNAUTHORIZED); + } + + if ( + typeof customAuthenticationFunction === 'function' && + !customAuthenticationFunction(request, request.user) + ) { + // custom authentication function forbidden this request + throw new ErrorBuilder(ErrorCodes.AUTH.FORBIDDEN); + } + + if ( + Array.isArray(requiredPermissions) && + requiredPermissions.length > 0 && + !this.matchPermissions(requiredPermissions, accessToken.permissions) + ) { + // couldn't match permissions + throw new ErrorBuilder(ErrorCodes.AUTH.FORBIDDEN); + } + + return true; + } + + private verifyToken(request) { + const accessToken = request.get('Authorization'); + let accessTokenPayload; + + // If the user isn't authenticated, an error will occurr anywhere here. + // Fancy error avoidance isn't performed by purpose, such as avoiding to access null values. + try { + const accessTokenDecoded: any = jwt.decode(accessToken, { + complete: true, + }); + + /*assert( + accessTokenDecoded.payload.iss === 'duc', + 'token should be issued by DUC', + );*/ + + assert( + accessTokenDecoded.payload.token_use === 'access', + 'should be an access token', + ); + + const { kid } = accessTokenDecoded.header; + const pemValue: string = this.pems.get(kid); + + jwt.verify(accessToken, pemValue); + accessTokenPayload = accessTokenDecoded.payload; + } catch (err) { + this.logger.log('Unable to verify duc access token\n' + err.stack); + return false; + } + + request.accessTokenPayload = accessTokenPayload; + request.user = { + user_id: accessTokenPayload.user_id, + username: accessTokenPayload.username, + permissions: accessTokenPayload.permissions, + customer_id: accessTokenPayload.customer_id, + customer_name: accessTokenPayload.customer_name, + customer_tier: accessTokenPayload.customer_tier, + }; + // TODO: for backwards compatibility. remove in the future + request.body.info = { + user_id: accessTokenPayload.user_id, + customer_id: accessTokenPayload.customer_id, + customer: accessTokenPayload.customer_name, + customer_tier: accessTokenPayload.customer_tier, + }; + + return accessTokenPayload; + } + + private matchPermissions( + requiredPermissions: Permission[], + userPermissions: number[], + ) { + return requiredPermissions.some((permission) => + userPermissions.includes(permission.seqid), + ); + } +} diff --git a/src/authentication/permissions.enum.ts b/src/authentication/permissions.enum.ts new file mode 100644 index 0000000..0e863cf --- /dev/null +++ b/src/authentication/permissions.enum.ts @@ -0,0 +1,216 @@ +import assert from 'assert'; + +export enum PermissionUsages { + PUBLIC = 'public', + INTERNAL = 'internal', +} + +export interface Permission { + seqid: number; + claim: string; + usage: PermissionUsages; +} + +// like field numbers in gRPC, avoid to change (or reuse previously used) seqids once its +// deployed to DUC +/*export const Permissions: { + [P in keyof any]: { [Q in keyof any]: Permission }; +} = {*/ +export const Permissions = { + AUTH: { + CREATE: { + seqid: 18, + claim: 'POST /auth', + usage: PermissionUsages.PUBLIC, + }, + }, + + PIPELINE: { + CREATE: { + seqid: 23, + claim: 'POST /pipelines', + usage: PermissionUsages.PUBLIC, + }, + GET: { + seqid: 13, + claim: 'GET /pipelines', + usage: PermissionUsages.PUBLIC, + }, + UPDATE: { + seqid: 29, + claim: 'PUT /pipelines', + usage: PermissionUsages.PUBLIC, + }, + DELETE: { + seqid: 5, + claim: 'DELETE /pipelines', + usage: PermissionUsages.PUBLIC, + }, + }, + + INPUT: { + CREATE: { + seqid: 21, + claim: 'POST /inputs', + usage: PermissionUsages.PUBLIC, + }, + GET: { + seqid: 9, + claim: 'GET /inputs', + usage: PermissionUsages.PUBLIC, + }, + UPDATE: { + seqid: 27, + claim: 'PUT /inputs', + usage: PermissionUsages.PUBLIC, + }, + UPDATE_PARTIAL: { + seqid: 17, + claim: 'PATCH /inputs', + usage: PermissionUsages.PUBLIC, + }, + DELETE: { + seqid: 3, + claim: 'DELETE /inputs', + usage: PermissionUsages.PUBLIC, + }, + GET_ENTITIES: { + seqid: 10, + claim: 'GET /inputs/available-entities', + usage: PermissionUsages.PUBLIC, + }, + }, + + OUTPUT: { + CREATE: { + seqid: 22, + claim: 'POST /outputs', + usage: PermissionUsages.PUBLIC, + }, + GET: { + seqid: 12, + claim: 'GET /outputs', + usage: PermissionUsages.PUBLIC, + }, + UPDATE: { + seqid: 28, + claim: 'PUT /outputs', + usage: PermissionUsages.PUBLIC, + }, + DELETE: { + seqid: 4, + claim: 'DELETE /outputs', + usage: PermissionUsages.PUBLIC, + }, + }, + + TRANSFORMATIONS: { + CREATE: { + seqid: 24, + claim: 'POST /transformations', + usage: PermissionUsages.PUBLIC, + }, + GET: { + seqid: 15, + claim: 'GET /transformations', + usage: PermissionUsages.PUBLIC, + }, + UPDATE: { + seqid: 30, + claim: 'PUT /transformations', + usage: PermissionUsages.PUBLIC, + }, + DELETE: { + seqid: 6, + claim: 'DELETE /transformations', + usage: PermissionUsages.PUBLIC, + }, + }, + + CATALOG: { + CREATE: { + seqid: 19, + claim: 'POST /catalog', + usage: PermissionUsages.PUBLIC, + }, + GET: { + seqid: 7, + claim: 'GET /catalog', + usage: PermissionUsages.PUBLIC, + }, + UPDATE: { + seqid: 25, + claim: 'PUT /catalog', + usage: PermissionUsages.PUBLIC, + }, + DELETE: { + seqid: 1, + claim: 'DELETE /catalog', + usage: PermissionUsages.PUBLIC, + }, + }, + + CONNECTORS: { + CREATE: { + seqid: 20, + claim: 'POST /connectors', + usage: PermissionUsages.PUBLIC, + }, + GET: { + seqid: 8, + claim: 'GET /connectors', + usage: PermissionUsages.PUBLIC, + }, + UPDATE: { + seqid: 26, + claim: 'PUT /connectors', + usage: PermissionUsages.PUBLIC, + }, + DELETE: { + seqid: 2, + claim: 'DELETE /connectors', + usage: PermissionUsages.PUBLIC, + }, + }, + + SNOWFLAKE: { + OPEN: { + seqid: 14, + claim: 'GET /snowflake', + usage: PermissionUsages.PUBLIC, + }, + }, + + ZENDESK: { + OPEN: { + seqid: 16, + claim: 'GET /zendesk', + usage: PermissionUsages.PUBLIC, + }, + }, + + METABASE: { + OPEN: { + seqid: 11, + claim: 'GET /metabase', + usage: PermissionUsages.PUBLIC, + }, + }, +}; + +// traverses the object searching for duplicate seqids or claims (executes at runtime) +const seqids = Object.values(Permissions).flatMap((namespace) => + Object.values(namespace).map(({ seqid }) => seqid), +); +const claims = Object.values(Permissions).flatMap((namespace) => + Object.values(namespace).map(({ claim }) => claim), +); +Object.values(Permissions).map((namespace) => + Object.values(namespace).map(({ seqid, claim }) => { + const seqidsCount = seqids.filter((x) => x === seqid).length; + assert(seqidsCount === 1, `seqid ${seqid} count is not 1`); + + const claimsCount = claims.filter((x) => x === claim).length; + assert(claimsCount === 1, `claim '${claim}' count is not 1`); + }), +); diff --git a/src/authentication/user.decorator.ts b/src/authentication/user.decorator.ts new file mode 100644 index 0000000..d5fe984 --- /dev/null +++ b/src/authentication/user.decorator.ts @@ -0,0 +1,23 @@ +import { createParamDecorator, ExecutionContext } from '@nestjs/common'; + +import ErrorBuilder from '../utils/ErrorBuilder'; +import ErrorCodes from '../utils/errorCodes'; + +export interface RequestUser { + user_id: string; + username: string; + permissions: string; + customer_id: string; + customer_name: string; + customer_tier: string; +} + +export const User = createParamDecorator((data: any, ctx: ExecutionContext) => { + const request = ctx.switchToHttp().getRequest(); + + if (!request.user && data?.required) { + throw new ErrorBuilder(ErrorCodes.AUTH.UNAUTHORIZED); + } + + return request.user; +}); diff --git a/src/clients/auth/client.service.ts b/src/clients/auth/client.service.ts index 840851a..15a1faa 100644 --- a/src/clients/auth/client.service.ts +++ b/src/clients/auth/client.service.ts @@ -1,259 +1,150 @@ -import { OnModuleInit, Inject } from '@nestjs/common'; +import { Logger, OnModuleInit, Inject } from '@nestjs/common'; import { ClientGrpc } from '@nestjs/microservices'; +import { ProtoServices } from '@victorradael/protospack-v2/dist/lib/Duc'; +import { AuthProtoService as AuthServiceInterface } from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/write-service'; import { - DucServicesNames, - AuthServiceInterface, + AuthGetPublicKeysResponse, AuthSignInRequest, + AuthSignInResponse, AuthRefreshAccessTokenRequest, - AuthConfirmationRequest, - AuthResendConfirmationCodeRequest, + AuthRefreshAccessTokenResponse, AuthEnableTotpMfaRequest, + AuthEnableTotpMfaResponse, AuthDisableTotpMfaRequest, + AuthDisableTotpMfaResponse, AuthDismissTotpMfaRequest, + AuthDismissTotpMfaResponse, AuthVerifyTotpMfaRequest, + AuthVerifyTotpMfaResponse, AuthChangePasswordRequest, + AuthChangePasswordResponse, AuthResetPasswordRequest, + AuthResetPasswordResponse, AuthVerifyResetPasswordCodeRequest, + AuthVerifyResetPasswordCodeResponse, AuthConfirmResetPasswordRequest, -} from '@victorradael/protospack'; + AuthConfirmResetPasswordResponse, +} from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/messages'; + +import grpcHandler from '../../utils/grpcHandler'; export class AuthClientService implements OnModuleInit { + private readonly logger = new Logger(AuthClientService.name); + private authService: AuthServiceInterface; - constructor( - @Inject('AUTH_PACKAGE') private readonly grpcClient: ClientGrpc, - ) {} + constructor(@Inject('DUC_PACKAGE') private readonly grpcClient: ClientGrpc) {} onModuleInit() { this.authService = this.grpcClient.getService( - DucServicesNames.AuthProtoService, + ProtoServices.AuthProtoService, ); } - async signIn({ username, password, totp }: AuthSignInRequest): Promise { - console.log('AuthClientService', 'SignIn'); + async getPublicKeys() { + this.logger.log('GetPublicKeys'); - return new Promise((resolve, reject) => { - this.authService.signIn({ username, password, totp }).subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); + return grpcHandler( + this.authService.AuthGetPublicKeys({}), + ); } - async enableTotpMFA({ - accessToken, - password, - }: AuthEnableTotpMfaRequest): Promise { - console.log('AuthClientService', 'enableTotpMFA'); + async signIn({ username, password, totp }: AuthSignInRequest) { + this.logger.log('SignIn'); - return new Promise((resolve, reject) => { - this.authService.enableTotpMfa({ accessToken, password }).subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); + return grpcHandler( + this.authService.AuthSignIn({ username, password, totp }), + ); } - async disableTotpMFA({ - accessToken, - password, - }: AuthDisableTotpMfaRequest): Promise { - console.log('AuthClientService', 'disableTotpMFA'); + async refreshAccessToken({ refreshToken }: AuthRefreshAccessTokenRequest) { + this.logger.log('RefreshAccessToken'); - return new Promise((resolve, reject) => { - this.authService.disableTotpMfa({ accessToken, password }).subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); - } - - async dismissTotpMFA({ - accessToken, - }: AuthDismissTotpMfaRequest): Promise { - console.log('AuthClientService', 'dismissTotpMFA'); - - return new Promise((resolve, reject) => { - this.authService.dismissTotpMfa({ accessToken }).subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); - } - - async verifyTotp({ - accessToken, - totp, - }: AuthVerifyTotpMfaRequest): Promise { - console.log('AuthClientService', 'disableTotpMFA'); - - return new Promise((resolve, reject) => { - this.authService.verifyTotp({ accessToken, totp }).subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); - } - - async confirmRegister({ - username, - code, - }: AuthConfirmationRequest): Promise { - console.log('AuthClientService', 'confirmRegister'); - - const tokens = await new Promise((resolve, reject) => { - this.authService.confirmRegister({ username, code }).subscribe({ - next(x) { - resolve(x); - }, - error(err) { - console.log('Observable Error'); - reject(err); - }, - complete() { - console.log('done'); - }, - }); - }) - .then((res) => res) - .catch((err) => { - throw new Error(err); - }); - return tokens; - } - - async resendeConfirmationCode({ - username, - }: AuthResendConfirmationCodeRequest): Promise { - console.log('AuthClientService', 'resendConfirmationCode'); - - const authResendConfirmationCodeRequestReturn = await new Promise( - (resolve, reject) => { - this.authService.resendConfirmationCode({ username }).subscribe({ - next(x) { - resolve(x); - }, - error(err) { - console.log('Observable Error'); - reject(err); - }, - complete() { - console.log('done'); - }, - }); - }, - ) - .then((res) => res) - .catch((err) => { - throw new Error(err); - }); - return authResendConfirmationCodeRequestReturn; - } - - async refreshAccessToken({ - refreshToken, - }: AuthRefreshAccessTokenRequest): Promise { - console.log('AuthClientService', 'RefreshAccessToken'); - - return new Promise((resolve, reject) => { - this.authService.refreshAccessToken({ refreshToken }).subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); + return grpcHandler( + this.authService.AuthRefreshAccessToken({ refreshToken }), + ); } async changePassword({ accessToken, oldPassword, newPassword, - }: AuthChangePasswordRequest): Promise { - console.log('AuthClientService', 'ChangePassword'); + }: AuthChangePasswordRequest) { + this.logger.log('ChangePassword'); - return new Promise((resolve, reject) => { - this.authService - .changePassword({ - accessToken, - oldPassword, - newPassword, - }) - .subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); + return grpcHandler( + this.authService.AuthChangePassword({ + accessToken, + oldPassword, + newPassword, + }), + ); } - async resetPassword({ username }: AuthResetPasswordRequest): Promise { - console.log('AuthClientService', 'resetPassword'); + async resetPassword({ username }: AuthResetPasswordRequest) { + this.logger.log('resetPassword'); - return new Promise((resolve, reject) => { - this.authService.resetPassword({ username }).subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); + return grpcHandler( + this.authService.AuthResetPassword({ username }), + ); } async verifyResetPasswordCode({ username, code, - }: AuthVerifyResetPasswordCodeRequest): Promise { - console.log('AuthClientService', 'verifyResetPasswordCode'); + }: AuthVerifyResetPasswordCodeRequest) { + this.logger.log('verifyResetPasswordCode'); - return new Promise((resolve, reject) => { - this.authService.verifyResetPasswordCode({ username, code }).subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); + return grpcHandler( + this.authService.AuthVerifyResetPasswordCode({ username, code }), + ); } async confirmResetPassword({ username, code, newPassword, - }: AuthConfirmResetPasswordRequest): Promise { - console.log('AuthClientService', 'confirmResetPassword'); + }: AuthConfirmResetPasswordRequest) { + this.logger.log('confirmResetPassword'); - return new Promise((resolve, reject) => { - this.authService - .confirmResetPassword({ username, code, newPassword }) - .subscribe({ - next: resolve, - error: (err) => reject(err.details), - complete() { - console.log('done'); - }, - }); - }); + return grpcHandler( + this.authService.AuthConfirmResetPassword({ + username, + code, + newPassword, + }), + ); + } + + async enableTotpMFA({ accessToken, password }: AuthEnableTotpMfaRequest) { + this.logger.log('enableTotpMFA'); + + return grpcHandler( + this.authService.AuthEnableTotpMfa({ accessToken, password }), + ); + } + + async disableTotpMFA({ accessToken, password }: AuthDisableTotpMfaRequest) { + this.logger.log('disableTotpMFA'); + + return grpcHandler( + this.authService.AuthDisableTotpMfa({ accessToken, password }), + ); + } + + async dismissTotpMFA({ accessToken }: AuthDismissTotpMfaRequest) { + this.logger.log('dismissTotpMFA'); + + return grpcHandler( + this.authService.AuthDismissTotpMfa({ accessToken }), + ); + } + + async verifyTotp({ accessToken, totp }: AuthVerifyTotpMfaRequest) { + this.logger.log('disableTotpMFA'); + + return grpcHandler( + this.authService.AuthVerifyTotpMfa({ accessToken, totp }), + ); } } diff --git a/src/clients/auth/client.config.ts b/src/clients/duc/client.config.ts similarity index 66% rename from src/clients/auth/client.config.ts rename to src/clients/duc/client.config.ts index 82cce15..e1f5de6 100644 --- a/src/clients/auth/client.config.ts +++ b/src/clients/duc/client.config.ts @@ -1,20 +1,23 @@ import { credentials } from '@grpc/grpc-js'; import { ClientOptions, Transport } from '@nestjs/microservices'; +import { + ProtoPackages, + ProtoPaths, +} from '@victorradael/protospack-v2/dist/lib/Duc'; -import { DucProtoFilePath, DucPackages } from '@victorradael/protospack'; - -export class AuthClient { +export class DucClient { config(): ClientOptions { return { transport: Transport.GRPC, options: { url: process.env.DUC_URL, - package: DucPackages, + package: ProtoPackages.WritePackage, credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(), - protoPath: DucProtoFilePath, + protoPath: ProtoPaths.WriteFilePath, loader: { + keepCase: true, enums: String, objects: true, arrays: true, diff --git a/src/clients/permissions/client.service.ts b/src/clients/permissions/client.service.ts new file mode 100644 index 0000000..7e9236b --- /dev/null +++ b/src/clients/permissions/client.service.ts @@ -0,0 +1,33 @@ +import { Logger, OnModuleInit, Inject } from '@nestjs/common'; +import { ClientGrpc } from '@nestjs/microservices'; + +import { ProtoServices } from '@victorradael/protospack-v2/dist/lib/Duc'; +import { PermissionsProtoService as PermissionsServiceInterface } from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/write-service'; +import { + Empty, + InjectPermissionsRequest, +} from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/messages'; + +import grpcHandler from '../../utils/grpcHandler'; + +export class PermissionsClientService implements OnModuleInit { + private readonly logger = new Logger(PermissionsClientService.name); + + private permissionsService: PermissionsServiceInterface; + constructor(@Inject('DUC_PACKAGE') private readonly grpcClient: ClientGrpc) {} + + onModuleInit() { + this.permissionsService = + this.grpcClient.getService( + ProtoServices.PermissionsProtoService, + ); + } + + async injectPermissions({ permissions }: InjectPermissionsRequest) { + this.logger.log('InjectPermissions'); + + return grpcHandler( + this.permissionsService.InjectPermissions({ permissions }), + ); + } +} diff --git a/src/middlewares/authentication.ts b/src/middlewares/authentication.ts deleted file mode 100644 index 8cab798..0000000 --- a/src/middlewares/authentication.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { Request, Response, NextFunction } from 'express'; -import axios from 'axios'; -import { - ForbiddenException, - InternalServerErrorException, - NestMiddleware, - UnauthorizedException, - UseFilters, -} from '@nestjs/common'; -import jwkToPem from 'jwk-to-pem'; -import { decode, verify } from 'jsonwebtoken'; -import { HttpExceptionFilter } from '../error/http-exception.filter'; - -@UseFilters(new HttpExceptionFilter()) -export class LoggerMiddleware implements NestMiddleware { - use = async (request: Request, response: Response, next: NextFunction) => { - const idToken = request.get('Dadosfera-User'); - const accessToken = request.get('Authorization'); - const privateKey = process.env.JWT_PRIVATE_KEY; - let requiredRoute = ''; - const requiredMethod = request.method.trim(); - if (request.route.path.split('/').length >= 2) { - requiredRoute = request.route.path.split('/')[1].trim(); - } - - verify(idToken, privateKey, (err) => { - if (err) { - throw new UnauthorizedException(); - } - }); - const jwtDecoded: any = decode(idToken); - - const permissions = jwtDecoded.user.permissions; - - const clientId = jwtDecoded.user.customerId; - const customer = jwtDecoded.user.customer; - const userId = jwtDecoded.user.id; - const customer_tier = jwtDecoded.user.customer_tier; - - await verifyToken(accessToken); - - let havePermission = false; - const permission = permissions.find((permission) => { - permission = permission.split('/'); - const method = permission[0].trim(); - const route = permission[1].trim(); - - if (method === requiredMethod && route === requiredRoute) { - return permission; - } - }); - - if (permission) { - havePermission = true; - } - - if (havePermission) { - request.body.info = { - customer_id: clientId, - user_id: userId, - customer, - customer_tier, - }; - next(); - } else { - throw new ForbiddenException(); - } - }; -} - -let pems: { [key: string]: Record }[]; - -const setUp = async (region: string, id: string) => { - const URL = `https://cognito-idp.${region}.amazonaws.com/${id}/.well-known/jwks.json`; - - try { - const response = await axios.get(URL); - - if (response.status !== 200) { - throw new InternalServerErrorException(); - } - const data = await response.data; - const { keys } = data; - - pems = keys.map((key: any) => { - const modulus = key.n; - const exponent = key.e; - const keyType = key.kty; - const jwk = { kty: keyType, n: modulus, e: exponent }; - const pem = jwkToPem(jwk); - const keyId = key.kid; - - return { [keyId]: pem }; - }); - } catch (error) { - // console.log(error); - // console.log('Error! Unable to download JWKs'); - } -}; - -const verifyToken = async (accessToken: string) => { - const awsRegion = process.env.AWS_REGION; - const awsPoolId = process.env.AWS_IDENTITY_POOL_ID; - - try { - await setUp(awsRegion, awsPoolId); - if (!accessToken) { - throw new UnauthorizedException(); - } - - const user: any = decode(accessToken, { complete: true }); - - if (user === null) { - throw new UnauthorizedException(); - } - - const { kid } = user.header; - const pem = pems.filter((item: any) => item[kid]); - const pemValue: any = pem[0][kid]; - - if (!pem) { - throw new UnauthorizedException(); - } - - verify(accessToken, pemValue, (err: any) => { - if (err) { - throw new UnauthorizedException(); - } - - return; - }); - } catch (error) { - throw new UnauthorizedException(); - } -}; diff --git a/src/modules/auth/auth.controller.ts b/src/modules/auth/auth.controller.ts index acaab27..62709eb 100644 --- a/src/modules/auth/auth.controller.ts +++ b/src/modules/auth/auth.controller.ts @@ -1,60 +1,72 @@ import { + Logger, Body, Controller, Headers, Post, HttpCode, HttpStatus, + OnApplicationBootstrap, } from '@nestjs/common'; +import { ApiTags } from '@nestjs/swagger'; import { AuthSignInRequest, AuthRefreshAccessTokenRequest, - AuthEnableTotpMfaRequest, - AuthDisableTotpMfaRequest, - AuthVerifyTotpMfaRequest, AuthChangePasswordRequest, AuthResetPasswordRequest, AuthVerifyResetPasswordCodeRequest, AuthConfirmResetPasswordRequest, -} from '@victorradael/protospack'; + AuthEnableTotpMfaRequest, + AuthDisableTotpMfaRequest, + AuthVerifyTotpMfaRequest, +} from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/messages'; -import { AuthClientService } from 'src/clients/auth/client.service'; +import { AuthClientService } from '../../clients/auth/client.service'; +import { PermissionsClientService } from '../../clients/permissions/client.service'; +import { Permissions } from '../../authentication/permissions.enum'; import ErrorBuilder from '../../utils/ErrorBuilder'; +@ApiTags('Auth') @Controller('auth') -export class AuthController { - constructor(private authClient: AuthClientService) {} +export class AuthController implements OnApplicationBootstrap { + private readonly logger = new Logger(AuthController.name); - // DEPRECADO! - @Post() - @HttpCode(HttpStatus.OK) - async signIn_old(@Body() body: AuthSignInRequest) { - console.log(`/auth`, 'SignIn_old'); + constructor( + private authClient: AuthClientService, + private permissionsClient: PermissionsClientService, + ) {} - return this.signIn(body); - } + // internally used to send permissions to duc on microservice startup + async onApplicationBootstrap() { + this.logger.log('sending permissions to DUC...'); - @Post('login') - @HttpCode(HttpStatus.OK) - async signIn_login(@Body() body: AuthSignInRequest) { - console.log(`/auth`, 'SignIn_login'); + const permissions = Object.values(Permissions).flatMap((namespace) => + Object.values(namespace), + ); - return this.signIn(body); + return this.permissionsClient + .injectPermissions({ permissions }) + .catch((err: ErrorBuilder) => { + if ( + err.code === 'No connection established' && + process.env.LOCAL_ENV === 'true' + ) { + return this.logger.log( + "couldn't connect to DUC. suppresing in local env", + ); + } + + throw err; + }); } @Post('sign-in') @HttpCode(HttpStatus.OK) async signIn(@Body() { username, password, totp }: AuthSignInRequest) { - console.log(`/auth`, 'SignIn'); + this.logger.log(`/auth`, 'SignIn'); - const tokens = await this.authClient - .signIn({ username, password, totp }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return tokens; + return this.authClient.signIn({ username, password, totp }); } @Post('refresh-access-token') @@ -62,15 +74,63 @@ export class AuthController { async refreshAccessToken( @Body() { refreshToken }: AuthRefreshAccessTokenRequest, ) { - console.log(`/auth`, 'RefreshAccessToken'); + this.logger.log(`/auth`, 'RefreshAccessToken'); - const accessToken = await this.authClient - .refreshAccessToken({ refreshToken }) - .catch((err) => { - throw ErrorBuilder(err); - }); + return this.authClient.refreshAccessToken({ refreshToken }); + } - return accessToken; + @Post('change-password') + @HttpCode(HttpStatus.OK) + async changePassword( + @Body() body: AuthChangePasswordRequest, + @Headers() headers, + ) { + this.logger.log(`/auth`, 'change-password'); + + const { oldPassword, newPassword } = body; + const { authorization: accessToken } = headers; + + return this.authClient.changePassword({ + accessToken, + oldPassword, + newPassword, + }); + } + + @Post('reset-password') + @HttpCode(HttpStatus.OK) + async resetPassword(@Body() body: AuthResetPasswordRequest) { + this.logger.log(`/auth`, 'reset-password'); + + const { username } = body; + + return this.authClient.resetPassword({ username }); + } + + @Post('verify-reset-password-code') + @HttpCode(HttpStatus.OK) + async verifyResetPasswordCode( + @Body() body: AuthVerifyResetPasswordCodeRequest, + ) { + this.logger.log(`/auth`, 'verify-reset-password-code'); + + const { username, code } = body; + + return this.authClient.verifyResetPasswordCode({ username, code }); + } + + @Post('confirm-reset-password') + @HttpCode(HttpStatus.OK) + async confirmResetPassword(@Body() body: AuthConfirmResetPasswordRequest) { + this.logger.log(`/auth`, 'confirm-reset-password'); + + const { username, code, newPassword } = body; + + return this.authClient.confirmResetPassword({ + username, + code, + newPassword, + }); } @Post('enable-totp') @@ -79,18 +139,12 @@ export class AuthController { @Body() body: AuthEnableTotpMfaRequest, @Headers() headers, ) { - console.log(`/auth`, 'enable-totp'); + this.logger.log(`/auth`, 'enable-totp'); const { password } = body; const { authorization: accessToken } = headers; - const response = await this.authClient - .enableTotpMFA({ accessToken, password }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return response; + return this.authClient.enableTotpMFA({ accessToken, password }); } @Post('disable-totp') @@ -99,129 +153,32 @@ export class AuthController { @Body() body: AuthDisableTotpMfaRequest, @Headers() headers, ) { - console.log(`/auth`, 'disable-totp'); + this.logger.log(`/auth`, 'disable-totp'); const { password } = body; const { authorization: accessToken } = headers; - const response = await this.authClient - .disableTotpMFA({ accessToken, password }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return response; + return this.authClient.disableTotpMFA({ accessToken, password }); } @Post('dismiss-totp') @HttpCode(HttpStatus.OK) async dismissTotpMFA(@Headers() headers) { - console.log(`/auth`, 'disable-totp'); + this.logger.log(`/auth`, 'disable-totp'); const { authorization: accessToken } = headers; - const response = await this.authClient - .dismissTotpMFA({ accessToken }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return response; + return this.authClient.dismissTotpMFA({ accessToken }); } @Post('verify-totp') @HttpCode(HttpStatus.OK) - async verifyTotp( - @Body() body: AuthVerifyTotpMfaRequest, - @Headers() headers, - ): Promise { - console.log(`/auth`, 'enable-totp'); + async verifyTotp(@Body() body: AuthVerifyTotpMfaRequest, @Headers() headers) { + this.logger.log(`/auth`, 'enable-totp'); const { totp } = body; const { authorization: accessToken } = headers; - const response = await this.authClient - .verifyTotp({ accessToken, totp }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return response; - } - - @Post('change-password') - @HttpCode(HttpStatus.OK) - async changePassword( - @Body() body: AuthChangePasswordRequest, - @Headers() headers, - ): Promise { - console.log(`/auth`, 'change-password'); - - const { oldPassword, newPassword } = body; - const { authorization: accessToken } = headers; - - const response = await this.authClient - .changePassword({ - accessToken, - oldPassword, - newPassword, - }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return response; - } - - @Post('reset-password') - @HttpCode(HttpStatus.OK) - async resetPassword(@Body() body: AuthResetPasswordRequest): Promise { - console.log(`/auth`, 'reset-password'); - - const { username } = body; - - const response = await this.authClient - .resetPassword({ username }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return response; - } - - @Post('verify-reset-password-code') - @HttpCode(HttpStatus.OK) - async verifyResetPasswordCode( - @Body() body: AuthVerifyResetPasswordCodeRequest, - ): Promise { - console.log(`/auth`, 'verify-reset-password-code'); - - const { username, code } = body; - - const response = await this.authClient - .verifyResetPasswordCode({ username, code }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return response; - } - - @Post('confirm-reset-password') - @HttpCode(HttpStatus.OK) - async confirmResetPassword( - @Body() body: AuthConfirmResetPasswordRequest, - ): Promise { - console.log(`/auth`, 'confirm-reset-password'); - - const { username, code, newPassword } = body; - - const response = await this.authClient - .confirmResetPassword({ username, code, newPassword }) - .catch((err) => { - throw ErrorBuilder(err); - }); - - return response; + return this.authClient.verifyTotp({ accessToken, totp }); } } diff --git a/src/modules/auth/auth.service.spec.ts b/src/modules/auth/auth.service.spec.ts deleted file mode 100644 index bc390a2..0000000 --- a/src/modules/auth/auth.service.spec.ts +++ /dev/null @@ -1,152 +0,0 @@ -import nock from 'nock'; -import { LoggerMiddleware } from '../../middlewares/authentication'; -import { NextFunction, Request, Response } from 'express'; -import { ConsoleLogger, UnauthorizedException } from '@nestjs/common'; - -describe('PipelinesGrpcServerService', () => { - // let mockRequest: Partial; - // let mockResponse: Partial; - // const nextFunction: NextFunction = jest.fn(); - - // beforeEach(() => { - // mockRequest = { - // headers: {}, - // body: { - // info: {}, - // }, - // }; - // mockResponse = { - // json: jest.fn(), - // }; - // }); - - it('should be defined', () => { - expect(2 + 2).toBe(4); - }); - - // it('Should be able to pass auth', async () => { - // const awsRegion = process.env.AWS_REGION; - // const awsPoolId = process.env.AWS_IDENTITY_POOL_ID; - // const cognitoRes = { - // keys: [ - // { - // alg: 'RS256', - // e: 'AQAB', - // kid: 'z3VA3+i9JZY3JFDJTNWOap8RY+B7C6mFedaqCuvLvqA=', - // kty: 'RSA', - // n: 'vIGCQDkPA_eQUoaGDUsCyK_Whr76mNW0kZ1uac6ZnyY6hsjUIjvwehqv-ux3cQo4rQZQVFcoh8n9cK5jguz4GVdD972vIxoEdyv32nBFVr5e1PBunKJ2Y32GTR_Hl0XiE0hRe1v6cWuTqiC4qm1NY7tXYL3mI9L6s9ztNbhmG_V44y26PdhL4vRVrJaHOAmCs-77U-QYAC7Llkpmjh-8tG1zt9_FJ237cpBUVOuhD-7Nm32_eB9wddBGfBw0F10ko_KJoU-7683_Kv8k9coJzFUSONId-bfnLOzs8j1L6ZAHipXCR7rpmuRYzXztjp4Wmm2zPUToWLdMEy0Hq1OWmw', - // use: 'sig', - // }, - // { - // alg: 'RS256', - // e: 'AQAB', - // kid: 'u+1W9pi+clp8LaPhZVrv4dXMqRkTRD02YWhbm0NvsUw=', - // kty: 'RSA', - // n: 'noGq1cRMAKJPWahqfC_zWasYovSUycaS1basMfEoh3ePLc9zRgmyfiVKYzLRosHMe1uk0Y5ekCBKnWA8Yl7I84Yt7IIIaE44oJjSEGBKT3m8i8YaXzawaNs63KPkRh8553o3KzL75bQWcI_ABKqkf-uAKSCl_XotBGkzLUl4hIOYtAtRGEfKaNMPqyTCT5Zn71pMd0isppaUiTW2T5QLsZV1IBp46aSrl_D5Q_FTsJT7feobQVoHp2zfIorCpkfTXBTBMQTEBFSDyPbc6cULl48VKxp0B0GEwR_kYCEHEVzf41LQcUWZUE0OdBychijkSc9MZJnBWUYQZyedJILWnQ', - // use: 'sig', - // }, - // ], - // }; - - // nock( - // `https://cognito-idp.${awsRegion}.amazonaws.com/${awsPoolId}/.well-known/jwks.json`, - // ) - // .persist() - // .get('') - // .reply(200, cognitoRes); - - // mockRequest.headers['Dadosfera-User'] = - // 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiZTljYjI1ZGEtMTQyOC00NDJjLTg5NjItYTdkNmQxNjhkODUyIiwibmFtZSI6InJvZHJpZ28uemFtYm9uaSIsInVzZXJuYW1lIjoicm9kcmlnby56YW1ib25pQGRhZG9zZmVyYS5haSIsInJ1bGVJZCI6IjIxNzdmZjg4LThmY2ItNDRlNS1hYzYxLWNjYmU2Y2M3MGU4ZCIsImN1c3RvbWVySWQiOiIxMTI5ODBhMy0wYTEyLTQxYzktYmZmZC03OTFjZjdjYTg3YTIiLCJtZmFTdGF0dXMiOiJwZW5kaW5nIiwiY3JlYXRlZEF0IjoiMjAyMi0wNS0xM1QxNTowOTowOS4xMzhaIiwidXBkYXRlZEF0IjoiMjAyMi0wNS0xM1QxNTowOTowOS4xMzhaIiwicGVybWlzc2lvbnMiOlsiUE9TVCAvcGlwZWxpbmVzIiwiR0VUIC9waXBlbGluZXMiLCJQVVQgL3BpcGVsaW5lcyIsIkRFTEVURSAvcGlwZWxpbmVzIiwiUE9TVCAvaW5wdXRzIiwiR0VUIC9pbnB1dHMiLCJQVVQgL2lucHV0cyIsIkRFTEVURSAvaW5wdXRzIiwiUE9TVCAvb3V0cHV0cyIsIkdFVCAvb3V0cHV0cyIsIlBVVCAvb3V0cHV0cyIsIkRFTEVURSAvb3V0cHV0cyIsIlBPU1QgL3RyYW5zZm9ybWF0aW9ucyIsIkdFVCAvdHJhbnNmb3JtYXRpb25zIiwiUFVUIC90cmFuc2Zvcm1hdGlvbnMiLCJERUxFVEUgL3RyYW5zZm9ybWF0aW9ucyIsIlBPU1QgL2NhdGFsb2ciLCJHRVQgL2NhdGFsb2ciLCJQVVQgL2NhdGFsb2ciLCJERUxFVEUgL2NhdGFsb2ciLCJQT1NUIC9hdXRoIiwiR0VUIC9tZXRhYmFzZSIsIkdFVCAvc25vd2ZsYWtlIl0sImN1c3RvbWVyIjoiZGFkb3NmZXJhIn0sImlhdCI6MTY1MzY1NjE2NywiZXhwIjoxNjUzNzQyNTY3fQ.eeNEEUk_95KOxM-objS7gXz-SCVkNFYpEP688MfLkdI'; - // mockRequest.headers['Authorization'] = - // 'eyJraWQiOiJ1KzFXOXBpK2NscDhMYVBoWlZydjRkWE1xUmtUUkQwMllXaGJtME52c1V3PSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiIxYjkyZmFkMC1iNWVlLTQwMzAtOGRmYy1hZWM0MGQzYzdkYmUiLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0xLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMV9OVXY3WTJTeGoiLCJjbGllbnRfaWQiOiI0N3RrY3Jxc2NuajY3bWhnYmg3dXQ1YnJzNCIsIm9yaWdpbl9qdGkiOiJhZWJjNjA5NC1hYTJmLTRiZmUtOWExZi01ZWVhYTVmYzAwNDAiLCJldmVudF9pZCI6IjBhY2NjMzJiLTllNzktNGY2NS1iMDFiLWZhZGJlYzFhZWFiNiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2NTM2NTYxNjcsImV4cCI6MTY1MzY1Nzk2NywiaWF0IjoxNjUzNjU2MTY3LCJqdGkiOiIyYTgzNDhmOC0xNDhlLTQ3NjctODcxYi00M2UyOGRjNjc2NTkiLCJ1c2VybmFtZSI6InJvZHJpZ28uemFtYm9uaUBkYWRvc2ZlcmEuYWkifQ.UgIgeGEH2olNgqPly8cymNgWIZJz5n9N4yeKgTusfGsu5h-TWP_jVhPoCvFoixO2XKzFjSCvKwlKQYZyB74jLQLs-j5C5KGBdOea1HX7pUnEfEVtBINd1kcHib5YpGYq3MHG1uVx8vNJS3XviwgYg4rgNWA4du-QbhMicdRyHolYM-dWxuxtkwTRWMe1Vw6KlTctFsvUWx1GMgjp37tsLONcp3B8OsYXfiR764K_pBNs5gMhJ39gJ7NHHLWkJrtrUTpIoHWaZS_HEgvVyQiJENQvK_bPDMPm_lyF1dW-JBgot4TpAxMmvV1XGabkzycIcAOwUaPsKBlMphgunz1Ffw'; - // mockRequest.method = 'GET'; - // mockRequest.route = { - // path: '/inputs/', - // stack: [ - // { - // method: 'get', - // }, - // ], - // methods: { - // get: true, - // }, - // }; - // const authMiddleware = new LoggerMiddleware(); - - // await authMiddleware.useTest( - // mockRequest as Request, - // mockResponse as Response, - // nextFunction, - // ); - // expect(nextFunction).toHaveBeenCalled(); - // }); - - // it('Should not be able to pass auth', async () => { - // const awsRegion = process.env.AWS_REGION; - // const awsPoolId = process.env.AWS_IDENTITY_POOL_ID; - // const cognitoRes = { - // keys: [ - // { - // alg: 'RS256', - // e: 'AQAB', - // kid: 'z3VA3+i9JZY3JFDJTNWOap8RY+B7C6mFedaqCuvLvqA=', - // kty: 'RSA', - // n: 'vIGCQDkPA_eQUoaGDUsCyK_Whr76mNW0kZ1uac6ZnyY6hsjUIjvwehqv-ux3cQo4rQZQVFcoh8n9cK5jguz4GVdD972vIxoEdyv32nBFVr5e1PBunKJ2Y32GTR_Hl0XiE0hRe1v6cWuTqiC4qm1NY7tXYL3mI9L6s9ztNbhmG_V44y26PdhL4vRVrJaHOAmCs-77U-QYAC7Llkpmjh-8tG1zt9_FJ237cpBUVOuhD-7Nm32_eB9wddBGfBw0F10ko_KJoU-7683_Kv8k9coJzFUSONId-bfnLOzs8j1L6ZAHipXCR7rpmuRYzXztjp4Wmm2zPUToWLdMEy0Hq1OWmw', - // use: 'sig', - // }, - // { - // alg: 'RS256', - // e: 'AQAB', - // kid: 'u+1W9pi+clp8LaPhZVrv4dXMqRkTRD02YWhbm0NvsUw=', - // kty: 'RSA', - // n: 'noGq1cRMAKJPWahqfC_zWasYovSUycaS1basMfEoh3ePLc9zRgmyfiVKYzLRosHMe1uk0Y5ekCBKnWA8Yl7I84Yt7IIIaE44oJjSEGBKT3m8i8YaXzawaNs63KPkRh8553o3KzL75bQWcI_ABKqkf-uAKSCl_XotBGkzLUl4hIOYtAtRGEfKaNMPqyTCT5Zn71pMd0isppaUiTW2T5QLsZV1IBp46aSrl_D5Q_FTsJT7feobQVoHp2zfIorCpkfTXBTBMQTEBFSDyPbc6cULl48VKxp0B0GEwR_kYCEHEVzf41LQcUWZUE0OdBychijkSc9MZJnBWUYQZyedJILWnQ', - // use: 'sig', - // }, - // ], - // }; - - // nock( - // `https://cognito-idp.${awsRegion}.amazonaws.com/${awsPoolId}/.well-known/jwks.json`, - // ) - // .persist() - // .get('') - // .reply(200, cognitoRes); - - // mockRequest.headers['Dadosfera-User'] = - // 'asdeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiZTljYjI1ZGEtMTQyOC00NDJjLTg5NjItYTdkNmQxNjhkODUyIiwibmFtZSI6InJvZHJpZ28uemFtYm9uaSIsInVzZXJuYW1lIjoicm9kcmlnby56YW1ib25pQGRhZG9zZmVyYS5haSIsInJ1bGVJZCI6IjIxNzdmZjg4LThmY2ItNDRlNS1hYzYxLWNjYmU2Y2M3MGU4ZCIsImN1c3RvbWVySWQiOiIxMTI5ODBhMy0wYTEyLTQxYzktYmZmZC03OTFjZjdjYTg3YTIiLCJtZmFTdGF0dXMiOiJwZW5kaW5nIiwiY3JlYXRlZEF0IjoiMjAyMi0wNS0xM1QxNTowOTowOS4xMzhaIiwidXBkYXRlZEF0IjoiMjAyMi0wNS0xM1QxNTowOTowOS4xMzhaIiwicGVybWlzc2lvbnMiOlsiUE9TVCAvcGlwZWxpbmVzIiwiR0VUIC9waXBlbGluZXMiLCJQVVQgL3BpcGVsaW5lcyIsIkRFTEVURSAvcGlwZWxpbmVzIiwiUE9TVCAvaW5wdXRzIiwiR0VUIC9pbnB1dHMiLCJQVVQgL2lucHV0cyIsIkRFTEVURSAvaW5wdXRzIiwiUE9TVCAvb3V0cHV0cyIsIkdFVCAvb3V0cHV0cyIsIlBVVCAvb3V0cHV0cyIsIkRFTEVURSAvb3V0cHV0cyIsIlBPU1QgL3RyYW5zZm9ybWF0aW9ucyIsIkdFVCAvdHJhbnNmb3JtYXRpb25zIiwiUFVUIC90cmFuc2Zvcm1hdGlvbnMiLCJERUxFVEUgL3RyYW5zZm9ybWF0aW9ucyIsIlBPU1QgL2NhdGFsb2ciLCJHRVQgL2NhdGFsb2ciLCJQVVQgL2NhdGFsb2ciLCJERUxFVEUgL2NhdGFsb2ciLCJQT1NUIC9hdXRoIiwiR0VUIC9tZXRhYmFzZSIsIkdFVCAvc25vd2ZsYWtlIl0sImN1c3RvbWVyIjoiZGFkb3NmZXJhIn0sImlhdCI6MTY1MzY1NjE2NywiZXhwIjoxNjUzNzQyNTY3fQ.eeNEEUk_95KOxM-objS7gXz-SCVkNFYpEP688MfLkdI'; - // mockRequest.headers['Authorization'] = - // 'asdeyJraWQiOiJ1KzFXOXBpK2NscDhMYVBoWlZydjRkWE1xUmtUUkQwMllXaGJtME52c1V3PSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiIxYjkyZmFkMC1iNWVlLTQwMzAtOGRmYy1hZWM0MGQzYzdkYmUiLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0xLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMV9OVXY3WTJTeGoiLCJjbGllbnRfaWQiOiI0N3RrY3Jxc2NuajY3bWhnYmg3dXQ1YnJzNCIsIm9yaWdpbl9qdGkiOiJhZWJjNjA5NC1hYTJmLTRiZmUtOWExZi01ZWVhYTVmYzAwNDAiLCJldmVudF9pZCI6IjBhY2NjMzJiLTllNzktNGY2NS1iMDFiLWZhZGJlYzFhZWFiNiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2NTM2NTYxNjcsImV4cCI6MTY1MzY1Nzk2NywiaWF0IjoxNjUzNjU2MTY3LCJqdGkiOiIyYTgzNDhmOC0xNDhlLTQ3NjctODcxYi00M2UyOGRjNjc2NTkiLCJ1c2VybmFtZSI6InJvZHJpZ28uemFtYm9uaUBkYWRvc2ZlcmEuYWkifQ.UgIgeGEH2olNgqPly8cymNgWIZJz5n9N4yeKgTusfGsu5h-TWP_jVhPoCvFoixO2XKzFjSCvKwlKQYZyB74jLQLs-j5C5KGBdOea1HX7pUnEfEVtBINd1kcHib5YpGYq3MHG1uVx8vNJS3XviwgYg4rgNWA4du-QbhMicdRyHolYM-dWxuxtkwTRWMe1Vw6KlTctFsvUWx1GMgjp37tsLONcp3B8OsYXfiR764K_pBNs5gMhJ39gJ7NHHLWkJrtrUTpIoHWaZS_HEgvVyQiJENQvK_bPDMPm_lyF1dW-JBgot4TpAxMmvV1XGabkzycIcAOwUaPsKBlMphgunz1Ffw'; - // mockRequest.method = 'GET'; - // mockRequest.route = { - // path: '/inputs/', - // stack: [ - // { - // method: 'get', - // }, - // ], - // methods: { - // get: true, - // }, - // }; - // const authMiddleware = new LoggerMiddleware(); - - // // const t = await authMiddleware.useTest( - // // mockRequest as Request, - // // mockResponse as Response, - // // nextFunction, - // // ); - // // expect(nextFunction).toHaveBeenCalled(); - - // expect(async () => { - // const t = await authMiddleware.useTest( - // mockRequest as Request, - // mockResponse as Response, - // nextFunction, - // ); - // console.log(t); - // }).toThrow('Unauthorized'); - - // expect(1).toBe(2); - // // expect(t).toThrow(UnauthorizedException); - // }); -}); diff --git a/src/modules/catalog/catalog.controller.ts b/src/modules/catalog/catalog.controller.ts index d0c572a..3d94b56 100644 --- a/src/modules/catalog/catalog.controller.ts +++ b/src/modules/catalog/catalog.controller.ts @@ -7,9 +7,31 @@ import { Post, Query, } from '@nestjs/common'; +import { ApiTags } from '@nestjs/swagger'; +import { AuthenticateCondition } from '../../authentication/authentication.decorator'; +import { Permissions } from '../../authentication/permissions.enum'; import { CatalogService } from './catalog.service'; +@ApiTags('Catalog') @Controller('catalog') +@AuthenticateCondition((req, user) => { + let action; + + switch (req.method) { + case 'POST': + action = 'CREATE'; + break; + + case 'PUT': + action = 'UPDATE'; + break; + + default: + action = req.method; + } + + return user.permissions.includes(Permissions.CATALOG[action].seqid); +}) export class CatalogController { constructor(private catalogService: CatalogService) {} diff --git a/src/modules/health/health.controller.ts b/src/modules/health/health.controller.ts index 86445fb..1617c9c 100644 --- a/src/modules/health/health.controller.ts +++ b/src/modules/health/health.controller.ts @@ -1,6 +1,8 @@ import { Controller, Get } from '@nestjs/common'; +import { ApiTags } from '@nestjs/swagger'; import { HealthService } from './health.service'; +@ApiTags('Health') @Controller('health') export class HealthController { constructor(private readonly healthService: HealthService) {} diff --git a/src/modules/inputs/inputs.controller.ts b/src/modules/inputs/inputs.controller.ts index 71f4340..4e47326 100644 --- a/src/modules/inputs/inputs.controller.ts +++ b/src/modules/inputs/inputs.controller.ts @@ -10,6 +10,9 @@ import { import { InputsService } from './inputs.service'; import { InputsClientService } from 'src/clients/inputs/client.service'; import { UpdateInputRequest } from 'src/clients/inputs/interfaces'; +import { InputNewCreateRequest } from '@victorradael/protospack'; +import { Permissions } from '../../authentication/permissions.enum'; +import { AuthenticateCondition } from 'src/authentication/authentication.decorator'; import { ApiOkResponse, ApiTags } from '@nestjs/swagger'; import { CreateInputReq, @@ -24,6 +27,35 @@ import { @ApiTags('inputs') @Controller('inputs') +@AuthenticateCondition((req, user) => { + let action; + + switch (req.method) { + case 'POST': + action = 'CREATE'; + break; + + case 'PUT': + action = 'UPDATE'; + break; + + case 'PATCH': + action = 'UPDATE_PARTIAL'; + break; + + default: + action = req.method; + } + + if ( + `${req.method} ${req.route.path}` === + 'GET /inputs/available-entities/:plugin' + ) { + action = 'GET_ENTITIES'; + } + + return user.permissions.includes(Permissions.INPUT[action].seqid); +}) export class InputsController { inputService: InputsService; constructor(private inputsClientService: InputsClientService) { diff --git a/src/modules/outputs/outputs.controllers.ts b/src/modules/outputs/outputs.controllers.ts index e9f73d3..e3d6597 100644 --- a/src/modules/outputs/outputs.controllers.ts +++ b/src/modules/outputs/outputs.controllers.ts @@ -8,12 +8,34 @@ import { Put, } from '@nestjs/common'; import { Payload } from '@nestjs/microservices'; +import { ApiTags } from '@nestjs/swagger'; import { OutputsClientService } from 'src/clients/outputs/client.service'; +import { AuthenticateCondition } from 'src/authentication/authentication.decorator'; +import { Permissions } from '../../authentication/permissions.enum'; import { OutputsService } from './outputs.service'; +@ApiTags('Outputs') @Controller('outputs') +@AuthenticateCondition((req, user) => { + let action; + + switch (req.method) { + case 'POST': + action = 'CREATE'; + break; + + case 'PUT': + action = 'UPDATE'; + break; + + default: + action = req.method; + } + + return user.permissions.includes(Permissions.OUTPUT[action].seqid); +}) export class OutputsController { - constructor(private outputsClientService: OutputsClientService) {} + constructor(private outputsClientService: OutputsClientService) { } @Post() async create(@Body() createOutputDto) { diff --git a/src/modules/pipelines/pipelines.controller.ts b/src/modules/pipelines/pipelines.controller.ts index 961f2a3..7cbfe8e 100644 --- a/src/modules/pipelines/pipelines.controller.ts +++ b/src/modules/pipelines/pipelines.controller.ts @@ -7,10 +7,32 @@ import { Post, Put, } from '@nestjs/common'; +import { ApiTags } from '@nestjs/swagger'; import { PipelinesClientService } from 'src/clients/pipelines/client.service'; +import { AuthenticateCondition } from 'src/authentication/authentication.decorator'; +import { Permissions } from '../../authentication/permissions.enum'; import { PipelinesService } from './pipelines.service'; +@ApiTags('Pipelines') @Controller('pipelines') +@AuthenticateCondition((req, user) => { + let action; + + switch (req.method) { + case 'POST': + action = 'CREATE'; + break; + + case 'PUT': + action = 'UPDATE'; + break; + + default: + action = req.method; + } + + return user.permissions.includes(Permissions.PIPELINE[action].seqid); +}) export class PipelinesController { constructor(private pipelinesClientService: PipelinesClientService) {} diff --git a/src/modules/transformations/transformations.controller.ts b/src/modules/transformations/transformations.controller.ts index 3234dfc..5caea42 100644 --- a/src/modules/transformations/transformations.controller.ts +++ b/src/modules/transformations/transformations.controller.ts @@ -8,11 +8,33 @@ import { Put, } from '@nestjs/common'; import { Payload } from '@nestjs/microservices'; +import { ApiTags } from '@nestjs/swagger'; import { TransformationsClientService } from 'src/clients/transformations/client.service'; import { IIdRequest } from 'src/clients/transformations/interfaces'; +import { AuthenticateCondition } from 'src/authentication/authentication.decorator'; +import { Permissions } from '../../authentication/permissions.enum'; import { TransformationsService } from './transformations.service'; +@ApiTags('Transformations') @Controller('transformations') +@AuthenticateCondition((req, user) => { + let action; + + switch (req.method) { + case 'POST': + action = 'CREATE'; + break; + + case 'PUT': + action = 'UPDATE'; + break; + + default: + action = req.method; + } + + return user.permissions.includes(Permissions.TRANSFORMATIONS[action].seqid); +}) export class TransformationsController { constructor( private transformationsClientService: TransformationsClientService, diff --git a/src/utils/ErrorBuilder.ts b/src/utils/ErrorBuilder.ts index a95f71b..fd7095d 100644 --- a/src/utils/ErrorBuilder.ts +++ b/src/utils/ErrorBuilder.ts @@ -1,131 +1,145 @@ -import { HttpStatus, HttpException } from '@nestjs/common'; +import { HttpStatus, HttpException, Logger } from '@nestjs/common'; +import { RpcException } from '@nestjs/microservices'; import ErrorCodes from './errorCodes'; -function Builder({ statusCode, message, error, code }) { - return new HttpException({ statusCode, message, error, code }, statusCode); -} - -export default function ErrorBuilder(code: string) { - console.log(code); - +function enrichErrorCode(code: string) { switch (code) { case ErrorCodes.AUTH.WRONG_CREDENTIALS: - return Builder({ + return { statusCode: HttpStatus.UNAUTHORIZED, error: 'Não autenticado', message: 'Usuário ou senha incorretos', code, - }); + }; case ErrorCodes.AUTH.WRONG_PASSWORD_CONFIRMATION: - return Builder({ + return { statusCode: HttpStatus.UNAUTHORIZED, error: 'Senha incorreta', message: 'Confirmação de senha incorreta', code, - }); + }; case ErrorCodes.AUTH.TOTP_NOT_ENABLED: - return Builder({ + return { statusCode: HttpStatus.PRECONDITION_FAILED, error: 'Não permitido', message: 'A autenticação multifator não está habilitada', code, - }); + }; case ErrorCodes.AUTH.TOTP_ALREADY_ENABLED: - return Builder({ + return { statusCode: HttpStatus.PRECONDITION_FAILED, error: 'Não permitido', message: 'A autenticação multifator já está habilitada', code, - }); + }; case ErrorCodes.AUTH.TOTP_ALREADY_DISABLED: - return Builder({ + return { statusCode: HttpStatus.PRECONDITION_FAILED, error: 'Não permitido', message: 'A autenticação multifator já está desabilitada', code, - }); + }; case ErrorCodes.AUTH.TOTP_REQUIRED: - return Builder({ + return { statusCode: HttpStatus.UNAUTHORIZED, error: 'Não autenticado', message: 'Informe o token de autenticação multifator', code, - }); + }; case ErrorCodes.AUTH.CODE_MISMATCH: case ErrorCodes.AUTH.CODE_ALREADY_USED: - return Builder({ + return { statusCode: HttpStatus.UNAUTHORIZED, error: 'Não autenticado', message: 'Token de autenticação multifator inválido', code, - }); + }; case ErrorCodes.AUTH.RESET_PASSWORD_CODE_EXPIRED: - return Builder({ + return { statusCode: HttpStatus.UNAUTHORIZED, error: 'Não permitido', message: 'Token para recuperar senha expirado', code, - }); + }; case ErrorCodes.AUTH.RESET_PASSWORD_CODE_INVALID: - return Builder({ + return { statusCode: HttpStatus.UNAUTHORIZED, error: 'Não permitido', message: 'Token para recuperar senha inválido', code, - }); + }; case ErrorCodes.AUTH.WEAK_NEW_PASSWORD: - return Builder({ + return { statusCode: HttpStatus.BAD_REQUEST, error: 'Não permitido', message: 'Senha muito fraca. Escolha uma senha mais forte', code, - }); + }; case ErrorCodes.RATE_LIMIT: - return Builder({ + return { statusCode: HttpStatus.TOO_MANY_REQUESTS, error: 'Limite excedido', message: 'Você tentou realizar essa operação muitas vezes. Tente novamente mais tarde', code, - }); + }; case ErrorCodes.AUTH.UNAUTHORIZED: - return Builder({ + return { statusCode: HttpStatus.UNAUTHORIZED, error: 'Não autenticado', message: 'É necessário estar logado para realizar essa operação', code, - }); + }; case ErrorCodes.AUTH.FORBIDDEN: - return Builder({ + return { statusCode: HttpStatus.FORBIDDEN, error: 'Não autorizado', message: 'Você não tem permissões suficientes para realizar essa operação', code, - }); + }; case ErrorCodes.INTERNAL: case ErrorCodes.UNKNOWN: default: - return Builder({ + return { statusCode: HttpStatus.INTERNAL_SERVER_ERROR, error: 'Desconhecido', message: 'Erro desconhecido. Tente novamente ou entre em contato com o suporte', code: ErrorCodes.UNKNOWN, - }); + }; + } +} + +const logger = new Logger(); + +export default class ErrorBuilder extends HttpException { + code: string; + + constructor(code: string | RpcException) { + if (typeof code !== 'string') { + logger.log(code.stack); + code = (code as any).details as string; + } else { + logger.log(code); + } + + const { statusCode, message, error, code: rCode } = enrichErrorCode(code); + super({ statusCode, message, error, code: rCode }, statusCode); + this.code = code; } } diff --git a/src/utils/grpcHandler.ts b/src/utils/grpcHandler.ts new file mode 100644 index 0000000..0e7d77b --- /dev/null +++ b/src/utils/grpcHandler.ts @@ -0,0 +1,19 @@ +import { Logger } from '@nestjs/common'; +import { RpcException } from '@nestjs/microservices'; +import { from } from 'rxjs'; + +import ErrorBuilder from './ErrorBuilder'; + +const logger = new Logger(); + +export default async function grpcHandler(method: Promise) { + return new Promise((resolve, reject) => { + from(method).subscribe({ + next: resolve, + error: reject, + complete: () => logger.log('done'), + }); + }).catch((err: RpcException) => { + throw new ErrorBuilder(err); + }); +} diff --git a/swagger.json b/swagger.json index a36331c..2a97b88 100644 --- a/swagger.json +++ b/swagger.json @@ -1 +1 @@ -{"openapi":"3.0.0","paths":{"/inputs/available-entities/{plugin}":{"get":{"operationId":"InputsController_getAvailableEntities","parameters":[{"name":"plugin","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAvailableEntitiesRes"}}}}},"tags":["inputs"]}},"/inputs/test-connection":{"post":{"operationId":"InputsController_testConnection","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionRes"}}}}},"tags":["inputs"]}},"/inputs/test-connection/get-columns":{"post":{"operationId":"InputsController_getColumns","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionGetColumnsReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionGetColumnsRes"}}}}},"tags":["inputs"]}},"/inputs":{"post":{"operationId":"InputsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInputReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}}}},"tags":["inputs"]},"get":{"operationId":"InputsController_findAll","parameters":[],"responses":{"200":{"description":""}},"tags":["inputs"]}},"/inputs/{id}":{"post":{"operationId":"InputsController_reCreate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInputReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}}}},"tags":["inputs"]},"get":{"operationId":"InputsController_findOne","parameters":[],"responses":{"200":{"description":""}},"tags":["inputs"]},"patch":{"operationId":"InputsController_update","parameters":[],"responses":{"200":{"description":""}},"tags":["inputs"]},"delete":{"operationId":"InputsController_delete","parameters":[],"responses":{"200":{"description":""}},"tags":["inputs"]}},"/transformations":{"post":{"operationId":"TransformationsController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"TransformationsController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/transformations/{id}":{"get":{"operationId":"TransformationsController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"TransformationsController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"TransformationsController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/outputs":{"post":{"operationId":"OutputsController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"OutputsController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/outputs/{id}":{"get":{"operationId":"OutputsController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"OutputsController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"OutputsController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/start/{id}":{"post":{"operationId":"PipelinesController_activate","parameters":[],"responses":{"201":{"description":""}}}},"/pipelines/{id}/status":{"get":{"operationId":"PipelinesController_getPipelineStatus","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/{id}/{details}":{"get":{"operationId":"PipelinesController_getPipelineLogs","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines":{"post":{"operationId":"PipelinesController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"PipelinesController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/{id}":{"get":{"operationId":"PipelinesController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"PipelinesController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"PipelinesController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/auth":{"post":{"operationId":"AuthController_signIn_old","parameters":[],"responses":{"200":{"description":""}}}},"/auth/login":{"post":{"operationId":"AuthController_signIn_login","parameters":[],"responses":{"200":{"description":""}}}},"/auth/sign-in":{"post":{"operationId":"AuthController_signIn","parameters":[],"responses":{"200":{"description":""}}}},"/auth/refresh-access-token":{"post":{"operationId":"AuthController_refreshAccessToken","parameters":[],"responses":{"200":{"description":""}}}},"/auth/enable-totp":{"post":{"operationId":"AuthController_enableTotpMFA","parameters":[],"responses":{"200":{"description":""}}}},"/auth/disable-totp":{"post":{"operationId":"AuthController_disableTotpMFA","parameters":[],"responses":{"200":{"description":""}}}},"/auth/dismiss-totp":{"post":{"operationId":"AuthController_dismissTotpMFA","parameters":[],"responses":{"200":{"description":""}}}},"/auth/verify-totp":{"post":{"operationId":"AuthController_verifyTotp","parameters":[],"responses":{"200":{"description":""}}}},"/auth/change-password":{"post":{"operationId":"AuthController_changePassword","parameters":[],"responses":{"200":{"description":""}}}},"/auth/reset-password":{"post":{"operationId":"AuthController_resetPassword","parameters":[],"responses":{"200":{"description":""}}}},"/auth/verify-reset-password-code":{"post":{"operationId":"AuthController_verifyResetPasswordCode","parameters":[],"responses":{"200":{"description":""}}}},"/auth/confirm-reset-password":{"post":{"operationId":"AuthController_confirmResetPassword","parameters":[],"responses":{"200":{"description":""}}}},"/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/all":{"get":{"operationId":"CatalogController_catalogAll","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/data_apps":{"get":{"operationId":"CatalogController_dataAppsAll","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/data_apps/{id}":{"delete":{"operationId":"CatalogController_dataAppsOne","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/dashboard-metabase":{"get":{"operationId":"CatalogController_getAllDashboardMetabase","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/dashboard-metabase/{id}":{"get":{"operationId":"CatalogController_getOneDashboardMetabase","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/table-metadata":{"get":{"operationId":"CatalogController_getAllTableMetadata","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/table-metadata/{id}":{"delete":{"operationId":"CatalogController_deleteOneTableMetadata","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/column-metadata":{"get":{"operationId":"CatalogController_getOneColumnMetadata","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/column-metadata/{id}":{"delete":{"operationId":"CatalogController_deleteOneColumnMetadata","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/data-preview":{"get":{"operationId":"CatalogController_getOneDataPreview","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/data-status":{"get":{"operationId":"CatalogController_createDataStatus","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/data-description":{"get":{"operationId":"CatalogController_getDataDescription","parameters":[],"responses":{"200":{"description":""}}},"post":{"operationId":"CatalogController_createDataDescription","parameters":[],"responses":{"201":{"description":""}}}},"/catalog/data-docs":{"get":{"operationId":"CatalogController_getDataDocs","parameters":[],"responses":{"200":{"description":""}}},"post":{"operationId":"CatalogController_createDataDocs","parameters":[],"responses":{"201":{"description":""}}}},"/catalog/data-rating":{"get":{"operationId":"CatalogController_getDataRating","parameters":[],"responses":{"200":{"description":""}}},"post":{"operationId":"CatalogController_createDataRating","parameters":[],"responses":{"201":{"description":""}}}},"/catalog/summary-rating/{id}":{"get":{"operationId":"CatalogController_getSummaryRating","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/data-comment":{"get":{"operationId":"CatalogController_getDataComment","parameters":[],"responses":{"200":{"description":""}}},"post":{"operationId":"CatalogController_createDataComment","parameters":[],"responses":{"201":{"description":""}}}},"/catalog/data-review":{"get":{"operationId":"CatalogController_getDataReview","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/tags":{"post":{"operationId":"CatalogController_createTags","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"CatalogController_findAllTags","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/tags/{id}":{"delete":{"operationId":"CatalogController_deleteTags","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/table-tags":{"post":{"operationId":"CatalogController_createTableTags","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"CatalogController_getAllTableTags","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/table-tags/{id}":{"delete":{"operationId":"CatalogController_deleteTableTags","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/table-rules":{"get":{"operationId":"CatalogController_getTableRules","parameters":[],"responses":{"200":{"description":""}}}},"/catalog/table-rules/{id}":{"delete":{"operationId":"CatalogController_deleteTableRules","parameters":[],"responses":{"200":{"description":""}}}},"/oauth/hubspot":{"get":{"operationId":"OauthController_oauthHubspot","parameters":[],"responses":{"200":{"description":""}},"tags":["oauth"]}},"/oauth/hubspot/callback":{"get":{"operationId":"OauthController_oauthHubspotCallback","parameters":[],"responses":{"200":{"description":""}},"tags":["oauth"]}}},"info":{"title":"Maestro Grpc Documentation","description":"Documentation for Maestro gateway","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetAvailableEntitiesRes":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"string"}}},"required":["entities"]},"CredentialsJdbc":{"type":"object","properties":{"jdbc_user":{"type":"string"},"jdbc_password":{"type":"string"},"database":{"type":"string"},"endpoint":{"type":"string"},"port":{"type":"string"},"engine":{"type":"string"},"schema":{"type":"string"}}},"TestConnectionReq":{"type":"object","properties":{"plugin":{"type":"string"},"credentials":{"$ref":"#/components/schemas/CredentialsJdbc"}},"required":["plugin","credentials"]},"TestConnectionRes":{"type":"object","properties":{"connection_state":{"type":"boolean"},"total_entities":{"type":"number"},"database_tables":{"type":"array","items":{"type":"string"}}},"required":["connection_state","total_entities","database_tables"]},"TestConnectionGetColumnsReq":{"type":"object","properties":{"plugin":{"type":"string"},"tables":{"type":"array","items":{"type":"string"}},"credentials":{"$ref":"#/components/schemas/CredentialsJdbc"},"id":{"type":"string"}},"required":["plugin","tables"]},"TestConnectionGetColumnsRes":{"type":"object","properties":{"tables":{"type":"array","items":{"type":"string"}}},"required":["tables"]},"FileFormatParams":{"type":"object","properties":{"file_format":{"type":"string"},"encoding":{"type":"string"}}},"GoogleAnalyticsClientSecrets":{"type":"object","properties":{"type":{"type":"string"},"project_id":{"type":"string"},"private_key_id":{"type":"string"},"private_key":{"type":"string"},"client_email":{"type":"string"},"client_id":{"type":"string"},"auth_uri":{"type":"string"},"token_uri":{"type":"string"},"auth_provider_x509_cert_url":{"type":"string"},"client_x509_cert_url":{"type":"string"}},"required":["type","project_id","private_key_id","private_key","client_email","client_id","auth_uri","token_uri","auth_provider_x509_cert_url","client_x509_cert_url"]},"Credentials":{"type":"object","properties":{"jdbc_user":{"type":"string"},"jdbc_password":{"type":"string"},"database":{"type":"string"},"endpoint":{"type":"string"},"port":{"type":"string"},"engine":{"type":"string"},"schema":{"type":"string"},"connection_type":{"type":"string"},"client_aws_access_key_id":{"type":"string"},"client_aws_secret_access_key":{"type":"string"},"client_bucket":{"type":"string"},"file_to_extract":{"type":"string"},"file_format_params":{"$ref":"#/components/schemas/FileFormatParams"},"view_id":{"type":"string"},"client_secrets":{"$ref":"#/components/schemas/GoogleAnalyticsClientSecrets"},"start_date":{"type":"string"},"end_date":{"type":"string"},"oauth_code":{"type":"string"}},"required":["connection_type"]},"OauthObject":{"type":"object","properties":{"get_tokens_url":{"type":"string"},"get_tokens_url_params":{"type":"string"},"get_tokens_set_response":{"type":"object"},"content_type":{"type":"string"}}},"InputOptions":{"type":"object","properties":{"oauth":{"$ref":"#/components/schemas/OauthObject"},"skip_select_columns":{"type":"boolean"},"skip_select_entities":{"type":"boolean"},"skip_transformation":{"type":"boolean"}}},"CreateInputReq":{"type":"object","properties":{"id":{"type":"string"},"plugin":{"type":"string"},"category":{"type":"string"},"credentials":{"$ref":"#/components/schemas/Credentials"},"name":{"type":"string"},"options":{"$ref":"#/components/schemas/InputOptions"}},"required":["plugin","category","credentials","name"]},"Input":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"plugin":{"type":"string"},"name":{"type":"string"},"cron":{"type":"string"},"credentials":{"$ref":"#/components/schemas/Credentials"},"client_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","category","plugin","name","cron","credentials","client_id","created_at","updated_at"]}}}} \ No newline at end of file +{"openapi":"3.0.0","paths":{"/inputs/available-entities/{plugin}":{"get":{"operationId":"InputsController_getAvailableEntities","parameters":[{"name":"plugin","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAvailableEntitiesRes"}}}}},"tags":["inputs"]}},"/inputs/test-connection":{"post":{"operationId":"InputsController_testConnection","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionRes"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["inputs"]}},"/inputs/test-connection/get-columns":{"post":{"operationId":"InputsController_getColumns","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionGetColumnsReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionGetColumnsRes"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["inputs"]}},"/inputs":{"post":{"operationId":"InputsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInputReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["inputs"]},"get":{"operationId":"InputsController_findAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["inputs"]}},"/inputs/{id}":{"post":{"operationId":"InputsController_reCreate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInputReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}}},"201":{"description":""}},"tags":["inputs"]},"get":{"operationId":"InputsController_findOne","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["inputs"]},"patch":{"operationId":"InputsController_update","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["inputs"]},"delete":{"operationId":"InputsController_delete","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["inputs"]}},"/transformations":{"post":{"operationId":"TransformationsController_create","parameters":[],"responses":{"201":{"description":""}},"tags":["Transformations"]},"get":{"operationId":"TransformationsController_findAll","parameters":[],"responses":{"200":{"description":""}},"tags":["Transformations"]}},"/transformations/{id}":{"get":{"operationId":"TransformationsController_findOne","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Transformations"]},"put":{"operationId":"TransformationsController_update","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Transformations"]},"delete":{"operationId":"TransformationsController_delete","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Transformations"]}},"/outputs":{"post":{"operationId":"OutputsController_create","parameters":[],"responses":{"201":{"description":""}},"tags":["Outputs"]},"get":{"operationId":"OutputsController_findAll","parameters":[],"responses":{"200":{"description":""}},"tags":["Outputs"]}},"/outputs/{id}":{"get":{"operationId":"OutputsController_findOne","parameters":[],"responses":{"200":{"description":""}},"tags":["Outputs"]},"put":{"operationId":"OutputsController_update","parameters":[],"responses":{"200":{"description":""}},"tags":["Outputs"]},"delete":{"operationId":"OutputsController_delete","parameters":[],"responses":{"200":{"description":""}},"tags":["Outputs"]}},"/pipelines/start/{id}":{"post":{"operationId":"PipelinesController_activate","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Pipelines"]}},"/pipelines/{id}/status":{"get":{"operationId":"PipelinesController_getPipelineStatus","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Pipelines"]}},"/pipelines/{id}/{details}":{"get":{"operationId":"PipelinesController_getPipelineLogs","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Pipelines"]}},"/pipelines":{"post":{"operationId":"PipelinesController_create","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Pipelines"]},"get":{"operationId":"PipelinesController_findAll","parameters":[],"responses":{"200":{"description":""}},"tags":["Pipelines"]}},"/pipelines/{id}":{"get":{"operationId":"PipelinesController_findOne","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Pipelines"]},"put":{"operationId":"PipelinesController_update","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Pipelines"]},"delete":{"operationId":"PipelinesController_delete","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Pipelines"]}},"/auth/sign-in":{"post":{"operationId":"AuthController_signIn","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/refresh-access-token":{"post":{"operationId":"AuthController_refreshAccessToken","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/change-password":{"post":{"operationId":"AuthController_changePassword","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/reset-password":{"post":{"operationId":"AuthController_resetPassword","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/verify-reset-password-code":{"post":{"operationId":"AuthController_verifyResetPasswordCode","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/confirm-reset-password":{"post":{"operationId":"AuthController_confirmResetPassword","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/enable-totp":{"post":{"operationId":"AuthController_enableTotpMFA","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/disable-totp":{"post":{"operationId":"AuthController_disableTotpMFA","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/dismiss-totp":{"post":{"operationId":"AuthController_dismissTotpMFA","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/auth/verify-totp":{"post":{"operationId":"AuthController_verifyTotp","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Auth"]}},"/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":""}},"tags":["Health"]}},"/catalog/all":{"get":{"operationId":"CatalogController_catalogAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/data_apps":{"get":{"operationId":"CatalogController_dataAppsAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/data_apps/{id}":{"delete":{"operationId":"CatalogController_dataAppsOne","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/dashboard-metabase":{"get":{"operationId":"CatalogController_getAllDashboardMetabase","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/dashboard-metabase/{id}":{"get":{"operationId":"CatalogController_getOneDashboardMetabase","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/table-metadata":{"get":{"operationId":"CatalogController_getAllTableMetadata","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/table-metadata/{id}":{"delete":{"operationId":"CatalogController_deleteOneTableMetadata","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/column-metadata":{"get":{"operationId":"CatalogController_getOneColumnMetadata","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/column-metadata/{id}":{"delete":{"operationId":"CatalogController_deleteOneColumnMetadata","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/data-preview":{"get":{"operationId":"CatalogController_getOneDataPreview","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/data-status":{"get":{"operationId":"CatalogController_createDataStatus","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/data-description":{"get":{"operationId":"CatalogController_getDataDescription","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]},"post":{"operationId":"CatalogController_createDataDescription","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/data-docs":{"get":{"operationId":"CatalogController_getDataDocs","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]},"post":{"operationId":"CatalogController_createDataDocs","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/data-rating":{"get":{"operationId":"CatalogController_getDataRating","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]},"post":{"operationId":"CatalogController_createDataRating","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/summary-rating/{id}":{"get":{"operationId":"CatalogController_getSummaryRating","parameters":[],"responses":{"200":{"description":""}},"tags":["Catalog"]}},"/catalog/data-comment":{"get":{"operationId":"CatalogController_getDataComment","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]},"post":{"operationId":"CatalogController_createDataComment","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/data-review":{"get":{"operationId":"CatalogController_getDataReview","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/tags":{"post":{"operationId":"CatalogController_createTags","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]},"get":{"operationId":"CatalogController_findAllTags","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/tags/{id}":{"delete":{"operationId":"CatalogController_deleteTags","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/table-tags":{"post":{"operationId":"CatalogController_createTableTags","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]},"get":{"operationId":"CatalogController_getAllTableTags","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/table-tags/{id}":{"delete":{"operationId":"CatalogController_deleteTableTags","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/table-rules":{"get":{"operationId":"CatalogController_getTableRules","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/catalog/table-rules/{id}":{"delete":{"operationId":"CatalogController_deleteTableRules","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Catalog"]}},"/oauth/hubspot":{"get":{"operationId":"OauthController_oauthHubspot","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}},"tags":["oauth"]}},"/oauth/hubspot/callback":{"get":{"operationId":"OauthController_oauthHubspotCallback","parameters":[],"responses":{"200":{"description":""}},"tags":["oauth"]}}},"info":{"title":"Maestro Grpc Documentation","description":"Documentation for Maestro gateway","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetAvailableEntitiesRes":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"string"}}},"required":["entities"]},"CredentialsJdbc":{"type":"object","properties":{"jdbc_user":{"type":"string"},"jdbc_password":{"type":"string"},"database":{"type":"string"},"endpoint":{"type":"string"},"port":{"type":"string"},"engine":{"type":"string"},"schema":{"type":"string"}}},"TestConnectionReq":{"type":"object","properties":{"plugin":{"type":"string"},"credentials":{"$ref":"#/components/schemas/CredentialsJdbc"}},"required":["plugin","credentials"]},"TestConnectionRes":{"type":"object","properties":{"connection_state":{"type":"boolean"},"total_entities":{"type":"number"},"database_tables":{"type":"array","items":{"type":"string"}}},"required":["connection_state","total_entities","database_tables"]},"TestConnectionGetColumnsReq":{"type":"object","properties":{"plugin":{"type":"string"},"tables":{"type":"array","items":{"type":"string"}},"credentials":{"$ref":"#/components/schemas/CredentialsJdbc"},"id":{"type":"string"}},"required":["plugin","tables"]},"TestConnectionGetColumnsRes":{"type":"object","properties":{"tables":{"type":"array","items":{"type":"string"}}},"required":["tables"]},"FileFormatParams":{"type":"object","properties":{"file_format":{"type":"string"},"encoding":{"type":"string"}}},"GoogleAnalyticsClientSecrets":{"type":"object","properties":{"type":{"type":"string"},"project_id":{"type":"string"},"private_key_id":{"type":"string"},"private_key":{"type":"string"},"client_email":{"type":"string"},"client_id":{"type":"string"},"auth_uri":{"type":"string"},"token_uri":{"type":"string"},"auth_provider_x509_cert_url":{"type":"string"},"client_x509_cert_url":{"type":"string"}},"required":["type","project_id","private_key_id","private_key","client_email","client_id","auth_uri","token_uri","auth_provider_x509_cert_url","client_x509_cert_url"]},"Credentials":{"type":"object","properties":{"jdbc_user":{"type":"string"},"jdbc_password":{"type":"string"},"database":{"type":"string"},"endpoint":{"type":"string"},"port":{"type":"string"},"engine":{"type":"string"},"schema":{"type":"string"},"connection_type":{"type":"string"},"client_aws_access_key_id":{"type":"string"},"client_aws_secret_access_key":{"type":"string"},"client_bucket":{"type":"string"},"file_to_extract":{"type":"string"},"file_format_params":{"$ref":"#/components/schemas/FileFormatParams"},"view_id":{"type":"string"},"client_secrets":{"$ref":"#/components/schemas/GoogleAnalyticsClientSecrets"},"start_date":{"type":"string"},"end_date":{"type":"string"},"oauth_code":{"type":"string"}},"required":["connection_type"]},"OauthObject":{"type":"object","properties":{"get_tokens_url":{"type":"string"},"get_tokens_url_params":{"type":"string"},"get_tokens_set_response":{"type":"object"},"content_type":{"type":"string"}}},"InputOptions":{"type":"object","properties":{"oauth":{"$ref":"#/components/schemas/OauthObject"},"skip_select_columns":{"type":"boolean"},"skip_select_entities":{"type":"boolean"},"skip_transformation":{"type":"boolean"}}},"CreateInputReq":{"type":"object","properties":{"id":{"type":"string"},"plugin":{"type":"string"},"category":{"type":"string"},"credentials":{"$ref":"#/components/schemas/Credentials"},"name":{"type":"string"},"options":{"$ref":"#/components/schemas/InputOptions"}},"required":["plugin","category","credentials","name"]},"Input":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"plugin":{"type":"string"},"name":{"type":"string"},"cron":{"type":"string"},"credentials":{"$ref":"#/components/schemas/Credentials"},"client_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","category","plugin","name","cron","credentials","client_id","created_at","updated_at"]}}}} \ No newline at end of file From 8ce7a692b6e1ba650de0803d26062ba34c297504 Mon Sep 17 00:00:00 2001 From: Arthur Simas Date: Thu, 23 Jun 2022 17:19:12 -0300 Subject: [PATCH 2/4] CHORE: added protospack@v2 correct version --- package-lock.json | 1336 +++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 801 insertions(+), 537 deletions(-) diff --git a/package-lock.json b/package-lock.json index cce02db..7c211e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@nestjs/schedule": "^1.1.0", "@nestjs/swagger": "^5.2.1", "@victorradael/protospack": "2.5.0", - "@victorradael/protospack-v2": "../protospack", + "@victorradael/protospack-v2": "1.1.0", "axios": "^0.25.0", "cron-parser": "^4.4.0", "dotenv": "^14.2.0", @@ -67,19 +67,6 @@ "node": "18.3.0" } }, - "../protospack": { - "name": "@victorradael/protospack-v2", - "version": "1.1.0", - "license": "ISC", - "dependencies": { - "rxjs": "^7.5.5", - "ts-proto": "^1.112.2" - }, - "devDependencies": { - "@types/node": "^17.0.21", - "typescript": "^4.6.2" - } - }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -94,20 +81,19 @@ } }, "node_modules/@angular-devkit/core": { - "version": "13.3.5", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.3.5.tgz", - "integrity": "sha512-w7vzK4VoYP9rLgxJ2SwEfrkpKybdD+QgQZlsDBzT0C6Ebp7b4gkNcNVFo8EiZvfDl6Yplw2IAP7g7fs3STn0hQ==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-14.0.2.tgz", + "integrity": "sha512-lT875LhgO+23HvjUmuCZomH/0ivetzo8xsaT+7YM8SeUpmjsNTpTA/xNAQ4uD4JGscsJeCKsGT/zJIwPAAe6vQ==", "dev": true, "dependencies": { - "ajv": "8.9.0", + "ajv": "8.11.0", "ajv-formats": "2.1.1", - "fast-json-stable-stringify": "2.1.0", - "magic-string": "0.25.7", + "jsonc-parser": "3.0.0", "rxjs": "6.6.7", "source-map": "0.7.3" }, "engines": { - "node": "^12.20.0 || ^14.15.0 || >=16.10.0", + "node": "^14.15.0 || >=16.10.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" }, @@ -139,41 +125,41 @@ "dev": true }, "node_modules/@angular-devkit/schematics": { - "version": "13.3.5", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.3.5.tgz", - "integrity": "sha512-0N/kL/Vfx0yVAEwa3HYxNx9wYb+G9r1JrLjJQQzDp+z9LtcojNf7j3oey6NXrDUs1WjVZOa/AIdRl3/DuaoG5w==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-14.0.2.tgz", + "integrity": "sha512-NCAYwvQBL71MbAzeF8XOM9LXYfZbUK7THYCW8UteKDY4Df6EdVOGhBdWY2LstAkZeVCaQWSJU7FcVRS9Ulvg0A==", "dev": true, "dependencies": { - "@angular-devkit/core": "13.3.5", + "@angular-devkit/core": "14.0.2", "jsonc-parser": "3.0.0", - "magic-string": "0.25.7", + "magic-string": "0.26.1", "ora": "5.4.1", "rxjs": "6.6.7" }, "engines": { - "node": "^12.20.0 || ^14.15.0 || >=16.10.0", + "node": "^14.15.0 || >=16.10.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" } }, "node_modules/@angular-devkit/schematics-cli": { - "version": "13.3.5", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-13.3.5.tgz", - "integrity": "sha512-ARX20ebtfwzef8GdXIcB6uv0sjTsaEniZyXBFchEKD6kR5EYZVaBL+ZVUbmsU1d0XY///WzW7pqwCyu5H1u+vw==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-14.0.2.tgz", + "integrity": "sha512-baqwuiN56mPFVVhthZHwvltjPNrczijM6Hvk9wYqlNeYuawqDD8h57u3PMGzgr9SKLHyCoFNwMQ0B57FN7oXtA==", "dev": true, "dependencies": { - "@angular-devkit/core": "13.3.5", - "@angular-devkit/schematics": "13.3.5", + "@angular-devkit/core": "14.0.2", + "@angular-devkit/schematics": "14.0.2", "ansi-colors": "4.1.1", - "inquirer": "8.2.0", - "minimist": "1.2.6", - "symbol-observable": "4.0.0" + "inquirer": "8.2.4", + "symbol-observable": "4.0.0", + "yargs-parser": "21.0.1" }, "bin": { "schematics": "bin/schematics.js" }, "engines": { - "node": "^12.20.0 || ^14.15.0 || >=16.10.0", + "node": "^14.15.0 || >=16.10.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" } @@ -195,9 +181,9 @@ } }, "node_modules/@angular-devkit/schematics-cli/node_modules/inquirer": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.0.tgz", - "integrity": "sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", + "integrity": "sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg==", "dev": true, "dependencies": { "ansi-escapes": "^4.2.1", @@ -210,13 +196,14 @@ "mute-stream": "0.0.8", "ora": "^5.4.1", "run-async": "^2.4.0", - "rxjs": "^7.2.0", + "rxjs": "^7.5.5", "string-width": "^4.1.0", "strip-ansi": "^6.0.0", - "through": "^2.3.6" + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=12.0.0" } }, "node_modules/@angular-devkit/schematics/node_modules/rxjs": { @@ -1095,18 +1082,18 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz", - "integrity": "sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.5.tgz", + "integrity": "sha512-BxhE40PVCBxVEJsSBhB6UWyAuqJRxGsAw8BdHMJ3AKGydcwuWW4kOO3HmqBQAdcq/OP+/DlTVxLvsCzRTnZuGg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.2.tgz", - "integrity": "sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.5.tgz", + "integrity": "sha512-MGY8vg3DxMnctw0LdvSEojOsumc70g0t18gNyUdAZqB1Rpd1Bqo/svHGvt+UJ6JcGX+DIekGFDxxIWofBxLCnQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", @@ -1115,10 +1102,10 @@ "@babel/helper-compilation-targets": "^7.18.2", "@babel/helper-module-transforms": "^7.18.0", "@babel/helpers": "^7.18.2", - "@babel/parser": "^7.18.0", + "@babel/parser": "^7.18.5", "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.2", - "@babel/types": "^7.18.2", + "@babel/traverse": "^7.18.5", + "@babel/types": "^7.18.4", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -1413,9 +1400,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.5.tgz", + "integrity": "sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1601,9 +1588,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", - "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.5.tgz", + "integrity": "sha512-aKXj1KT66sBj0vVzk6rEeAO6Z9aiiQ68wfDgge3nHhA/my6xMM/7HGQUNumKZaoa2qUPQ5whJG9aAifsxUKfLA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.16.7", @@ -1612,8 +1599,8 @@ "@babel/helper-function-name": "^7.17.9", "@babel/helper-hoist-variables": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", + "@babel/parser": "^7.18.5", + "@babel/types": "^7.18.4", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1736,14 +1723,14 @@ } }, "node_modules/@grpc/proto-loader": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.12.tgz", - "integrity": "sha512-filTVbETFnxb9CyRX98zN18ilChTuf/C5scZ2xyaOTp0EHGq0/ufX8rjqXUcSb1Gpv7eZq4M2jDvbh9BogKnrg==", + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", + "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", "dependencies": { "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", "long": "^4.0.0", - "protobufjs": "^6.10.0", + "protobufjs": "^6.11.3", "yargs": "^16.2.0" }, "bin": { @@ -2248,14 +2235,14 @@ } }, "node_modules/@nestjs/cli": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-8.2.6.tgz", - "integrity": "sha512-uvwKbUZJmgdJu1D24e+uUqHnwoB/0R9hLfUJjr5pTvLlP/RJugHAdJr7m1dQe92Xzdyi36kBN4Id3RXHgfz1UA==", + "version": "8.2.7", + "resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-8.2.7.tgz", + "integrity": "sha512-wvdH9FLpLPj3HVyYVAVLgy4QJSUALVBzaOtd+eAkZgubkhteao+P1Qnqhu7Sugyiv2/bV5yVOJm7x7yqgueJ9g==", "dev": true, "dependencies": { - "@angular-devkit/core": "13.3.5", - "@angular-devkit/schematics": "13.3.5", - "@angular-devkit/schematics-cli": "13.3.5", + "@angular-devkit/core": "14.0.2", + "@angular-devkit/schematics": "14.0.2", + "@angular-devkit/schematics-cli": "14.0.2", "@nestjs/schematics": "^8.0.3", "chalk": "3.0.0", "chokidar": "3.5.3", @@ -2272,8 +2259,8 @@ "tree-kill": "1.2.2", "tsconfig-paths": "3.14.1", "tsconfig-paths-webpack-plugin": "3.5.2", - "typescript": "4.6.4", - "webpack": "5.72.1", + "typescript": "4.7.4", + "webpack": "5.73.0", "webpack-node-externals": "3.0.0" }, "bin": { @@ -2284,23 +2271,10 @@ "npm": ">= 6.11.0" } }, - "node_modules/@nestjs/cli/node_modules/typescript": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", - "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/@nestjs/common": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.6.tgz", - "integrity": "sha512-INp1ERDrLiQ4GwRc3zotTwBLZm2sIwcJwnBE2yXqsth17KijmoVmY8UB5Tares0IlwjsqlRFWkCX8uWE5rzbSA==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.7.tgz", + "integrity": "sha512-m/YsbcBal+gA5CFrDpqXqsSfylo+DIQrkFY3qhVIltsYRfu8ct8J9pqsTO6OPf3mvqdOpFGrV5sBjoyAzOBvsw==", "dependencies": { "axios": "0.27.2", "iterare": "1.2.1", @@ -2377,9 +2351,9 @@ } }, "node_modules/@nestjs/core": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.6.tgz", - "integrity": "sha512-5zHpxTYV7HT3lfF7l/x0EWBfmuyuDOnGRcALf88tzDGs/7Q/VC6l65d6eFwDwI37NLtScqnmEkT9of8E3fT3mA==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.7.tgz", + "integrity": "sha512-XB9uexHqzr2xkPo6QSiQWJJttyYYLmvQ5My64cFvWFi7Wk2NIus0/xUNInwX3kmFWB6pF1ab5Y2ZBvWdPwGBhw==", "hasInstallScript": true, "dependencies": { "@nuxtjs/opencollective": "0.3.2", @@ -2434,9 +2408,9 @@ } }, "node_modules/@nestjs/microservices": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-8.4.6.tgz", - "integrity": "sha512-HEGznxFKnNwjIk+GT/xKzZ4jo4Itus0PhSMm689SDCBOzvdAOuqCkCWZXsP+jTRzeqaI+/7GEFq+P8q1eZsc/A==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-8.4.7.tgz", + "integrity": "sha512-JZX29tBWbbPa+Q06QcCbwKTyEsOFHAPrxgfEkRNwoaiEqqCsITT9w2n5bcz3vlUurdpy5dIgX3/almbitghbKg==", "dependencies": { "iterare": "1.2.1", "tslib": "2.4.0" @@ -2500,14 +2474,14 @@ } }, "node_modules/@nestjs/platform-express": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-8.4.6.tgz", - "integrity": "sha512-OserZ+RwjMyECFAL0/12Bztf63EnFhlFUEJ4/a502RQ0eZogt4M3ROauaW4bpt2Q3YH4hy0eT+4eqkVOMzjtPQ==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-8.4.7.tgz", + "integrity": "sha512-lPE5Ltg2NbQGRQIwXWY+4cNrXhJdycbxFDQ8mNxSIuv+LbrJBIdEB/NONk+LLn9N/8d2+I2LsIETGQrPvsejBg==", "dependencies": { "body-parser": "1.20.0", "cors": "2.8.5", "express": "4.18.1", - "multer": "1.4.4", + "multer": "1.4.4-lts.1", "tslib": "2.4.0" }, "funding": { @@ -2549,6 +2523,94 @@ "typescript": "^3.4.5 || ^4.3.5" } }, + "node_modules/@nestjs/schematics/node_modules/@angular-devkit/core": { + "version": "13.3.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.3.5.tgz", + "integrity": "sha512-w7vzK4VoYP9rLgxJ2SwEfrkpKybdD+QgQZlsDBzT0C6Ebp7b4gkNcNVFo8EiZvfDl6Yplw2IAP7g7fs3STn0hQ==", + "dev": true, + "dependencies": { + "ajv": "8.9.0", + "ajv-formats": "2.1.1", + "fast-json-stable-stringify": "2.1.0", + "magic-string": "0.25.7", + "rxjs": "6.6.7", + "source-map": "0.7.3" + }, + "engines": { + "node": "^12.20.0 || ^14.15.0 || >=16.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@nestjs/schematics/node_modules/@angular-devkit/schematics": { + "version": "13.3.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.3.5.tgz", + "integrity": "sha512-0N/kL/Vfx0yVAEwa3HYxNx9wYb+G9r1JrLjJQQzDp+z9LtcojNf7j3oey6NXrDUs1WjVZOa/AIdRl3/DuaoG5w==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "13.3.5", + "jsonc-parser": "3.0.0", + "magic-string": "0.25.7", + "ora": "5.4.1", + "rxjs": "6.6.7" + }, + "engines": { + "node": "^12.20.0 || ^14.15.0 || >=16.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@nestjs/schematics/node_modules/ajv": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz", + "integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@nestjs/schematics/node_modules/magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.4" + } + }, + "node_modules/@nestjs/schematics/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@nestjs/schematics/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/@nestjs/swagger": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-5.2.1.tgz", @@ -2575,9 +2637,9 @@ } }, "node_modules/@nestjs/testing": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-8.4.6.tgz", - "integrity": "sha512-uGRNQ0iWIHqjz5CLxQCTtQ3dB1KyPfkHXnko5mBwKk/iBTiACmll61rVt89Wh8RM+w0bmvCHp9sacNI7IynESg==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-8.4.7.tgz", + "integrity": "sha512-aedpeJFicTBeiTCvJWUG45WMMS53f5eu8t2fXsfjsU1t+WdDJqYcZyrlCzA4dL1B7MfbqaTURdvuVVHTmJO8ag==", "dev": true, "dependencies": { "tslib": "2.4.0" @@ -2750,27 +2812,27 @@ } }, "node_modules/@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true }, "node_modules/@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, "node_modules/@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, "node_modules/@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", "dev": true }, "node_modules/@types/babel__core": { @@ -2840,9 +2902,9 @@ "dev": true }, "node_modules/@types/eslint": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz", - "integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==", + "version": "8.4.3", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.3.tgz", + "integrity": "sha512-YP1S7YJRMPs+7KZKDb9G63n8YejIwW9BALq7a5j2+H4yl6iOv9CB29edho+cuFRrvmJbbaH2yiVChKLJVysDGw==", "dev": true, "dependencies": { "@types/estree": "*", @@ -2878,9 +2940,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.28", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz", - "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==", + "version": "4.17.29", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.29.tgz", + "integrity": "sha512-uMd++6dMKS32EOuw1Uli3e3BPgdLIXmezcfHv7N4c1s3gkhikBplORPpMq3fuWkxncZN1reb16d5n8yhQ80x7Q==", "dev": true, "dependencies": { "@types/node": "*", @@ -2970,9 +3032,14 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz", - "integrity": "sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==" + "version": "16.11.41", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.41.tgz", + "integrity": "sha512-mqoYK2TnVjdkGk8qXAVGc/x9nSaTpSrFaGFm43BUH3IdoBV0nta6hYaGmdOvIMlbHJbUEVen3gvwpwovAZKNdQ==" + }, + "node_modules/@types/object-hash": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz", + "integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==" }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -3049,14 +3116,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.0.tgz", - "integrity": "sha512-DDrIA7GXtmHXr1VCcx9HivA39eprYBIFxbQEHI6NyraRDxCGpxAFiYQAT/1Y0vh1C+o2vfBiy4IuPoXxtTZCAQ==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", + "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.27.0", - "@typescript-eslint/type-utils": "5.27.0", - "@typescript-eslint/utils": "5.27.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/type-utils": "5.29.0", + "@typescript-eslint/utils": "5.29.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -3082,14 +3149,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.0.tgz", - "integrity": "sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", + "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.27.0", - "@typescript-eslint/types": "5.27.0", - "@typescript-eslint/typescript-estree": "5.27.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", "debug": "^4.3.4" }, "engines": { @@ -3109,13 +3176,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz", - "integrity": "sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", + "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.27.0", - "@typescript-eslint/visitor-keys": "5.27.0" + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3126,12 +3193,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.0.tgz", - "integrity": "sha512-vpTvRRchaf628Hb/Xzfek+85o//zEUotr1SmexKvTfs7czXfYjXVT/a5yDbpzLBX1rhbqxjDdr1Gyo0x1Fc64g==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", + "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.27.0", + "@typescript-eslint/utils": "5.29.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -3152,9 +3219,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.0.tgz", - "integrity": "sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", + "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3165,13 +3232,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz", - "integrity": "sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz", + "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.27.0", - "@typescript-eslint/visitor-keys": "5.27.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3192,15 +3259,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.0.tgz", - "integrity": "sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz", + "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.27.0", - "@typescript-eslint/types": "5.27.0", - "@typescript-eslint/typescript-estree": "5.27.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -3216,12 +3283,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz", - "integrity": "sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz", + "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/types": "5.29.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -3241,8 +3308,13 @@ } }, "node_modules/@victorradael/protospack-v2": { - "resolved": "../protospack", - "link": true + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@victorradael/protospack-v2/-/protospack-v2-1.1.0.tgz", + "integrity": "sha512-SGCJ49kNfOpG59GMbJG6lR/JC/bLBaCcWMENaF1+b2hAXNs8BePDVMiTTJsETjaAZlpmsJeUTPhvkrwD7GO27A==", + "dependencies": { + "rxjs": "^7.5.5", + "ts-proto": "^1.112.2" + } }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", @@ -3494,9 +3566,9 @@ } }, "node_modules/ajv": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz", - "integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", @@ -3912,9 +3984,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.20.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", - "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.0.tgz", + "integrity": "sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA==", "dev": true, "funding": [ { @@ -3927,11 +3999,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001332", - "electron-to-chromium": "^1.4.118", - "escalade": "^3.1.1", - "node-releases": "^2.0.3", - "picocolors": "^1.0.0" + "caniuse-lite": "^1.0.30001358", + "electron-to-chromium": "^1.4.164", + "node-releases": "^2.0.5", + "update-browserslist-db": "^1.0.0" }, "bin": { "browserslist": "cli.js" @@ -4045,9 +4116,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001344", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz", - "integrity": "sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g==", + "version": "1.0.30001358", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001358.tgz", + "integrity": "sha512-hvp8PSRymk85R20bsDra7ZTCpSVGN/PAz9pSAjPSjKC+rNmnUk5vCRgJwiTT/O4feQ/yu/drvZYpKxxhbFuChw==", "dev": true, "funding": [ { @@ -4125,9 +4196,9 @@ } }, "node_modules/ci-info": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", - "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", "dev": true }, "node_modules/cjs-module-lexer": { @@ -4448,6 +4519,11 @@ "node": ">=10" } }, + "node_modules/dataloader": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", + "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==" + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -4635,9 +4711,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.142", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.142.tgz", - "integrity": "sha512-ea8Q1YX0JRp4GylOmX4gFHIizi0j9GfRW4EkaHnkZp0agRCBB4ZGeCv17IEzIvBkiYVwfoKVhKZJbTfqCRdQdg==", + "version": "1.4.167", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.167.tgz", + "integrity": "sha512-lPHuHXBwpkr4RcfaZBKm6TKOWG/1N9mVggUpP4fY3l1JIUU2x4fkM8928smYdZ5lF+6KCTAxo1aK9JmqT+X71Q==", "dev": true }, "node_modules/elliptic": { @@ -4813,7 +4889,7 @@ "node_modules/escodegen/node_modules/prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -4832,7 +4908,7 @@ "node_modules/escodegen/node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "dependencies": { "prelude-ls": "~1.1.2" @@ -4842,9 +4918,9 @@ } }, "node_modules/eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", + "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -5255,7 +5331,7 @@ "node_modules/express/node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "node_modules/external-editor": { "version": "3.1.0", @@ -5649,13 +5725,13 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7449,12 +7525,6 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, - "node_modules/lodash.set": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg==", - "dev": true - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -7525,12 +7595,15 @@ } }, "node_modules/magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.1.tgz", + "integrity": "sha512-ndThHmvgtieXe8J/VGPjG+Apu7v7ItcD5mhEIvOscWjPF/ccOiLxHaSuCAS2G+3x4GKsAbT8u7zdyamupui8Tg==", "dev": true, "dependencies": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.8" + }, + "engines": { + "node": ">=12" } }, "node_modules/make-dir": { @@ -7581,12 +7654,12 @@ } }, "node_modules/memfs": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.4.tgz", - "integrity": "sha512-W4gHNUE++1oSJVn8Y68jPXi+mkx3fXR5ITE/Ubz6EQ3xRpCN5k2CQ4AUR8094Z7211F876TyoBACGsIveqgiGA==", + "version": "3.4.6", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.6.tgz", + "integrity": "sha512-rH9mjopto6Wkr7RFuH9l9dk3qb2XGOcYKr7xMhaYqfzuJqOqhRrcFvfD7JMuPj6SLmPreh5+6eAuv36NFAU+Mw==", "dev": true, "dependencies": { - "fs-monkey": "1.0.3" + "fs-monkey": "^1.0.3" }, "engines": { "node": ">= 4.0.0" @@ -7777,14 +7850,14 @@ "dev": true }, "node_modules/nock": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.4.tgz", - "integrity": "sha512-8GPznwxcPNCH/h8B+XZcKjYPXnUV5clOKCjAqyjsiqA++MpNx9E9+t8YPp0MbThO+KauRo7aZJ1WuIZmOrT2Ug==", + "version": "13.2.7", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.7.tgz", + "integrity": "sha512-R6NUw7RIPtKwgK7jskuKoEi4VFMqIHtV2Uu9K/Uegc4TA5cqe+oNMYslZcUmnVNQCTG6wcSqUBaGTDd7sq5srg==", "dev": true, "dependencies": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", - "lodash.set": "^4.3.2", + "lodash": "^4.17.21", "propagate": "^2.0.0" }, "engines": { @@ -7822,17 +7895,17 @@ "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -7841,7 +7914,7 @@ "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, "node_modules/node-releases": { @@ -7885,7 +7958,7 @@ "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "engines": { "node": ">=0.10.0" } @@ -7920,7 +7993,7 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dependencies": { "wrappy": "1" } @@ -8015,7 +8088,7 @@ "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, "engines": { "node": ">=0.10.0" @@ -8206,7 +8279,7 @@ "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "engines": { "node": ">=0.10.0" } @@ -8311,10 +8384,9 @@ } }, "node_modules/prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", - "dev": true, + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "bin": { "prettier": "bin-prettier.js" }, @@ -8557,7 +8629,7 @@ "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "dependencies": { "resolve": "^1.1.6" @@ -8586,7 +8658,7 @@ "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "engines": { "node": ">=0.10.0" } @@ -8601,12 +8673,12 @@ } }, "node_modules/resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "is-core-module": "^2.8.1", + "is-core-module": "^2.9.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -9011,7 +9083,7 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "node_modules/stack-utils": { @@ -9132,9 +9204,9 @@ } }, "node_modules/superagent": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-7.1.3.tgz", - "integrity": "sha512-WA6et4nAvgBCS73lJvv1D0ssI5uk5Gh+TGN/kNe+B608EtcVs/yzfl+OLXTzDs7tOBDIpvgh/WUs1K2OK1zTeQ==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-7.1.6.tgz", + "integrity": "sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==", "dev": true, "dependencies": { "component-emitter": "^1.3.0", @@ -9144,7 +9216,7 @@ "form-data": "^4.0.0", "formidable": "^2.0.1", "methods": "^1.1.2", - "mime": "^2.5.0", + "mime": "2.6.0", "qs": "^6.10.3", "readable-stream": "^3.6.0", "semver": "^7.3.7" @@ -9243,9 +9315,9 @@ } }, "node_modules/swagger-ui-dist": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.11.1.tgz", - "integrity": "sha512-pf3kfSTYdF9mYFY2VnfJ51wnXlSVhEGdtymhpHzfbFw2jTbiEWgBoVz5EB9aW2EaJvUGTM1YHAXYZX7Jk4RdAQ==" + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.12.0.tgz", + "integrity": "sha512-B0Iy2ueXtbByE6OOyHTi3lFQkpPi/L7kFOKFeKTr44za7dJIELa9kzaca6GkndCgpK1QTjArnoXG+aUy0XQp1w==" }, "node_modules/swagger-ui-express": { "version": "4.4.0", @@ -9302,9 +9374,9 @@ } }, "node_modules/terser": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.0.tgz", - "integrity": "sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==", + "version": "5.14.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.1.tgz", + "integrity": "sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.2", @@ -9320,15 +9392,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz", - "integrity": "sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", + "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.7", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", "terser": "^5.7.2" }, "engines": { @@ -9353,15 +9425,6 @@ } } }, - "node_modules/terser-webpack-plugin/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -9385,7 +9448,7 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, "node_modules/throat": { @@ -9397,7 +9460,7 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, "node_modules/tmp": { @@ -9421,7 +9484,7 @@ "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, "engines": { "node": ">=4" @@ -9534,10 +9597,19 @@ } } }, + "node_modules/ts-jest/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ts-loader": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.0.tgz", - "integrity": "sha512-2kLLAdAD+FCKijvGKi9sS0OzoqxLCF3CxHpok7rVgCZ5UldRzH0TkbwG9XECKjBzHsAewntC5oDaI/FwKzEUog==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.1.tgz", + "integrity": "sha512-OkyShkcZTsTwyS3Kt7a4rsT/t2qvEVQuKCTg4LJmpj9fhFR7ukGdZwV6Qq3tRUkqcXtfGpPR7+hFKHCG/0d3Lw==", "dev": true, "dependencies": { "chalk": "^4.1.0", @@ -9570,9 +9642,9 @@ } }, "node_modules/ts-node": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.8.0.tgz", - "integrity": "sha512-/fNd5Qh+zTt8Vt1KbYZjRHCE9sI5i7nqfD/dzBBRDeVXZXS6kToW6R7tTU6Nd4XavFs0mAVCg29Q//ML7WsZYA==", + "version": "10.8.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.8.1.tgz", + "integrity": "sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -9621,6 +9693,48 @@ "node": ">=0.4.0" } }, + "node_modules/ts-poet": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-4.14.0.tgz", + "integrity": "sha512-hLGzWo3H3GLjVubftvaycGSconJrNpjjdpn43Lthnu61l/R2CaPIu+1JhaWZyqh2yj5NaOv+wZ5zoSJzDouAHw==", + "dependencies": { + "lodash": "^4.17.15", + "prettier": "^2.5.1" + } + }, + "node_modules/ts-proto": { + "version": "1.115.5", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.115.5.tgz", + "integrity": "sha512-JGk6hln3JP0T0wJlqIOUGE/qHDYcI547hrJwAzeLq1E2l7IdYnYiAJRsvJEOsvotIyZXMbHNlZedIZEVIPAspQ==", + "dependencies": { + "@types/object-hash": "^1.3.0", + "dataloader": "^1.4.0", + "object-hash": "^1.3.1", + "protobufjs": "^6.11.3", + "ts-poet": "^4.11.0", + "ts-proto-descriptors": "1.6.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.6.0.tgz", + "integrity": "sha512-Vrhue2Ti99us/o76mGy28nF3W/Uanl1/8detyJw2yyRwiBC5yxy+hEZqQ/ZX2PbZ1vyCpJ51A9L4PnCCnkBMTQ==", + "dependencies": { + "long": "^4.0.0", + "protobufjs": "^6.8.8" + } + }, + "node_modules/ts-proto/node_modules/object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", @@ -9675,7 +9789,7 @@ "node_modules/tsconfig-paths/node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, "engines": { "node": ">=4" @@ -9755,7 +9869,7 @@ "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", @@ -9767,9 +9881,9 @@ } }, "node_modules/typescript": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", - "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -9796,11 +9910,37 @@ "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "engines": { "node": ">= 0.8" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", + "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -9813,12 +9953,12 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "engines": { "node": ">= 0.4.0" } @@ -9860,7 +10000,7 @@ "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "engines": { "node": ">= 0.8" } @@ -9896,9 +10036,9 @@ } }, "node_modules/watchpack": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", - "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -9911,7 +10051,7 @@ "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, "dependencies": { "defaults": "^1.0.3" @@ -9927,9 +10067,9 @@ } }, "node_modules/webpack": { - "version": "5.72.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.1.tgz", - "integrity": "sha512-dXG5zXCLspQR4krZVR6QgajnZOjW2K/djHvdcRaDQvsjV9z9vaW6+ja5dZOYbqBBjF6kGXka/2ZyxNdc+8Jung==", + "version": "5.73.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", + "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -10125,7 +10265,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "3.0.3", @@ -10221,6 +10361,15 @@ } }, "node_modules/yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", @@ -10250,15 +10399,14 @@ } }, "@angular-devkit/core": { - "version": "13.3.5", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.3.5.tgz", - "integrity": "sha512-w7vzK4VoYP9rLgxJ2SwEfrkpKybdD+QgQZlsDBzT0C6Ebp7b4gkNcNVFo8EiZvfDl6Yplw2IAP7g7fs3STn0hQ==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-14.0.2.tgz", + "integrity": "sha512-lT875LhgO+23HvjUmuCZomH/0ivetzo8xsaT+7YM8SeUpmjsNTpTA/xNAQ4uD4JGscsJeCKsGT/zJIwPAAe6vQ==", "dev": true, "requires": { - "ajv": "8.9.0", + "ajv": "8.11.0", "ajv-formats": "2.1.1", - "fast-json-stable-stringify": "2.1.0", - "magic-string": "0.25.7", + "jsonc-parser": "3.0.0", "rxjs": "6.6.7", "source-map": "0.7.3" }, @@ -10281,14 +10429,14 @@ } }, "@angular-devkit/schematics": { - "version": "13.3.5", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.3.5.tgz", - "integrity": "sha512-0N/kL/Vfx0yVAEwa3HYxNx9wYb+G9r1JrLjJQQzDp+z9LtcojNf7j3oey6NXrDUs1WjVZOa/AIdRl3/DuaoG5w==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-14.0.2.tgz", + "integrity": "sha512-NCAYwvQBL71MbAzeF8XOM9LXYfZbUK7THYCW8UteKDY4Df6EdVOGhBdWY2LstAkZeVCaQWSJU7FcVRS9Ulvg0A==", "dev": true, "requires": { - "@angular-devkit/core": "13.3.5", + "@angular-devkit/core": "14.0.2", "jsonc-parser": "3.0.0", - "magic-string": "0.25.7", + "magic-string": "0.26.1", "ora": "5.4.1", "rxjs": "6.6.7" }, @@ -10311,17 +10459,17 @@ } }, "@angular-devkit/schematics-cli": { - "version": "13.3.5", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-13.3.5.tgz", - "integrity": "sha512-ARX20ebtfwzef8GdXIcB6uv0sjTsaEniZyXBFchEKD6kR5EYZVaBL+ZVUbmsU1d0XY///WzW7pqwCyu5H1u+vw==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-14.0.2.tgz", + "integrity": "sha512-baqwuiN56mPFVVhthZHwvltjPNrczijM6Hvk9wYqlNeYuawqDD8h57u3PMGzgr9SKLHyCoFNwMQ0B57FN7oXtA==", "dev": true, "requires": { - "@angular-devkit/core": "13.3.5", - "@angular-devkit/schematics": "13.3.5", + "@angular-devkit/core": "14.0.2", + "@angular-devkit/schematics": "14.0.2", "ansi-colors": "4.1.1", - "inquirer": "8.2.0", - "minimist": "1.2.6", - "symbol-observable": "4.0.0" + "inquirer": "8.2.4", + "symbol-observable": "4.0.0", + "yargs-parser": "21.0.1" }, "dependencies": { "chalk": { @@ -10335,9 +10483,9 @@ } }, "inquirer": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.0.tgz", - "integrity": "sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", + "integrity": "sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", @@ -10350,10 +10498,11 @@ "mute-stream": "0.0.8", "ora": "^5.4.1", "run-async": "^2.4.0", - "rxjs": "^7.2.0", + "rxjs": "^7.5.5", "string-width": "^4.1.0", "strip-ansi": "^6.0.0", - "through": "^2.3.6" + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" } } } @@ -11082,15 +11231,15 @@ } }, "@babel/compat-data": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz", - "integrity": "sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.5.tgz", + "integrity": "sha512-BxhE40PVCBxVEJsSBhB6UWyAuqJRxGsAw8BdHMJ3AKGydcwuWW4kOO3HmqBQAdcq/OP+/DlTVxLvsCzRTnZuGg==", "dev": true }, "@babel/core": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.2.tgz", - "integrity": "sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.5.tgz", + "integrity": "sha512-MGY8vg3DxMnctw0LdvSEojOsumc70g0t18gNyUdAZqB1Rpd1Bqo/svHGvt+UJ6JcGX+DIekGFDxxIWofBxLCnQ==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", @@ -11099,10 +11248,10 @@ "@babel/helper-compilation-targets": "^7.18.2", "@babel/helper-module-transforms": "^7.18.0", "@babel/helpers": "^7.18.2", - "@babel/parser": "^7.18.0", + "@babel/parser": "^7.18.5", "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.2", - "@babel/types": "^7.18.2", + "@babel/traverse": "^7.18.5", + "@babel/types": "^7.18.4", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -11329,9 +11478,9 @@ } }, "@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.5.tgz", + "integrity": "sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -11463,9 +11612,9 @@ } }, "@babel/traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", - "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.5.tgz", + "integrity": "sha512-aKXj1KT66sBj0vVzk6rEeAO6Z9aiiQ68wfDgge3nHhA/my6xMM/7HGQUNumKZaoa2qUPQ5whJG9aAifsxUKfLA==", "dev": true, "requires": { "@babel/code-frame": "^7.16.7", @@ -11474,8 +11623,8 @@ "@babel/helper-function-name": "^7.17.9", "@babel/helper-hoist-variables": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", + "@babel/parser": "^7.18.5", + "@babel/types": "^7.18.4", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -11579,14 +11728,14 @@ } }, "@grpc/proto-loader": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.12.tgz", - "integrity": "sha512-filTVbETFnxb9CyRX98zN18ilChTuf/C5scZ2xyaOTp0EHGq0/ufX8rjqXUcSb1Gpv7eZq4M2jDvbh9BogKnrg==", + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", + "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", "requires": { "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", "long": "^4.0.0", - "protobufjs": "^6.10.0", + "protobufjs": "^6.11.3", "yargs": "^16.2.0" } }, @@ -11986,14 +12135,14 @@ } }, "@nestjs/cli": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-8.2.6.tgz", - "integrity": "sha512-uvwKbUZJmgdJu1D24e+uUqHnwoB/0R9hLfUJjr5pTvLlP/RJugHAdJr7m1dQe92Xzdyi36kBN4Id3RXHgfz1UA==", + "version": "8.2.7", + "resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-8.2.7.tgz", + "integrity": "sha512-wvdH9FLpLPj3HVyYVAVLgy4QJSUALVBzaOtd+eAkZgubkhteao+P1Qnqhu7Sugyiv2/bV5yVOJm7x7yqgueJ9g==", "dev": true, "requires": { - "@angular-devkit/core": "13.3.5", - "@angular-devkit/schematics": "13.3.5", - "@angular-devkit/schematics-cli": "13.3.5", + "@angular-devkit/core": "14.0.2", + "@angular-devkit/schematics": "14.0.2", + "@angular-devkit/schematics-cli": "14.0.2", "@nestjs/schematics": "^8.0.3", "chalk": "3.0.0", "chokidar": "3.5.3", @@ -12010,23 +12159,15 @@ "tree-kill": "1.2.2", "tsconfig-paths": "3.14.1", "tsconfig-paths-webpack-plugin": "3.5.2", - "typescript": "4.6.4", - "webpack": "5.72.1", + "typescript": "4.7.4", + "webpack": "5.73.0", "webpack-node-externals": "3.0.0" - }, - "dependencies": { - "typescript": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", - "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", - "dev": true - } } }, "@nestjs/common": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.6.tgz", - "integrity": "sha512-INp1ERDrLiQ4GwRc3zotTwBLZm2sIwcJwnBE2yXqsth17KijmoVmY8UB5Tares0IlwjsqlRFWkCX8uWE5rzbSA==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.7.tgz", + "integrity": "sha512-m/YsbcBal+gA5CFrDpqXqsSfylo+DIQrkFY3qhVIltsYRfu8ct8J9pqsTO6OPf3mvqdOpFGrV5sBjoyAzOBvsw==", "requires": { "axios": "0.27.2", "iterare": "1.2.1", @@ -12074,9 +12215,9 @@ } }, "@nestjs/core": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.6.tgz", - "integrity": "sha512-5zHpxTYV7HT3lfF7l/x0EWBfmuyuDOnGRcALf88tzDGs/7Q/VC6l65d6eFwDwI37NLtScqnmEkT9of8E3fT3mA==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.7.tgz", + "integrity": "sha512-XB9uexHqzr2xkPo6QSiQWJJttyYYLmvQ5My64cFvWFi7Wk2NIus0/xUNInwX3kmFWB6pF1ab5Y2ZBvWdPwGBhw==", "requires": { "@nuxtjs/opencollective": "0.3.2", "fast-safe-stringify": "2.1.1", @@ -12094,9 +12235,9 @@ "requires": {} }, "@nestjs/microservices": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-8.4.6.tgz", - "integrity": "sha512-HEGznxFKnNwjIk+GT/xKzZ4jo4Itus0PhSMm689SDCBOzvdAOuqCkCWZXsP+jTRzeqaI+/7GEFq+P8q1eZsc/A==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-8.4.7.tgz", + "integrity": "sha512-JZX29tBWbbPa+Q06QcCbwKTyEsOFHAPrxgfEkRNwoaiEqqCsITT9w2n5bcz3vlUurdpy5dIgX3/almbitghbKg==", "requires": { "iterare": "1.2.1", "tslib": "2.4.0" @@ -12109,9 +12250,9 @@ "requires": {} }, "@nestjs/platform-express": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-8.4.6.tgz", - "integrity": "sha512-OserZ+RwjMyECFAL0/12Bztf63EnFhlFUEJ4/a502RQ0eZogt4M3ROauaW4bpt2Q3YH4hy0eT+4eqkVOMzjtPQ==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-8.4.7.tgz", + "integrity": "sha512-lPE5Ltg2NbQGRQIwXWY+4cNrXhJdycbxFDQ8mNxSIuv+LbrJBIdEB/NONk+LLn9N/8d2+I2LsIETGQrPvsejBg==", "requires": { "body-parser": "1.20.0", "cors": "2.8.5", @@ -12140,6 +12281,71 @@ "fs-extra": "10.1.0", "jsonc-parser": "3.0.0", "pluralize": "8.0.0" + }, + "dependencies": { + "@angular-devkit/core": { + "version": "13.3.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.3.5.tgz", + "integrity": "sha512-w7vzK4VoYP9rLgxJ2SwEfrkpKybdD+QgQZlsDBzT0C6Ebp7b4gkNcNVFo8EiZvfDl6Yplw2IAP7g7fs3STn0hQ==", + "dev": true, + "requires": { + "ajv": "8.9.0", + "ajv-formats": "2.1.1", + "fast-json-stable-stringify": "2.1.0", + "magic-string": "0.25.7", + "rxjs": "6.6.7", + "source-map": "0.7.3" + } + }, + "@angular-devkit/schematics": { + "version": "13.3.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.3.5.tgz", + "integrity": "sha512-0N/kL/Vfx0yVAEwa3HYxNx9wYb+G9r1JrLjJQQzDp+z9LtcojNf7j3oey6NXrDUs1WjVZOa/AIdRl3/DuaoG5w==", + "dev": true, + "requires": { + "@angular-devkit/core": "13.3.5", + "jsonc-parser": "3.0.0", + "magic-string": "0.25.7", + "ora": "5.4.1", + "rxjs": "6.6.7" + } + }, + "ajv": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz", + "integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, "@nestjs/swagger": { @@ -12153,9 +12359,9 @@ } }, "@nestjs/testing": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-8.4.6.tgz", - "integrity": "sha512-uGRNQ0iWIHqjz5CLxQCTtQ3dB1KyPfkHXnko5mBwKk/iBTiACmll61rVt89Wh8RM+w0bmvCHp9sacNI7IynESg==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-8.4.7.tgz", + "integrity": "sha512-aedpeJFicTBeiTCvJWUG45WMMS53f5eu8t2fXsfjsU1t+WdDJqYcZyrlCzA4dL1B7MfbqaTURdvuVVHTmJO8ag==", "dev": true, "requires": { "tslib": "2.4.0" @@ -12287,27 +12493,27 @@ "dev": true }, "@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true }, "@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, "@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, "@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", "dev": true }, "@types/babel__core": { @@ -12377,9 +12583,9 @@ "dev": true }, "@types/eslint": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz", - "integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==", + "version": "8.4.3", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.3.tgz", + "integrity": "sha512-YP1S7YJRMPs+7KZKDb9G63n8YejIwW9BALq7a5j2+H4yl6iOv9CB29edho+cuFRrvmJbbaH2yiVChKLJVysDGw==", "dev": true, "requires": { "@types/estree": "*", @@ -12415,9 +12621,9 @@ } }, "@types/express-serve-static-core": { - "version": "4.17.28", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz", - "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==", + "version": "4.17.29", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.29.tgz", + "integrity": "sha512-uMd++6dMKS32EOuw1Uli3e3BPgdLIXmezcfHv7N4c1s3gkhikBplORPpMq3fuWkxncZN1reb16d5n8yhQ80x7Q==", "dev": true, "requires": { "@types/node": "*", @@ -12507,9 +12713,14 @@ "dev": true }, "@types/node": { - "version": "16.11.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz", - "integrity": "sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==" + "version": "16.11.41", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.41.tgz", + "integrity": "sha512-mqoYK2TnVjdkGk8qXAVGc/x9nSaTpSrFaGFm43BUH3IdoBV0nta6hYaGmdOvIMlbHJbUEVen3gvwpwovAZKNdQ==" + }, + "@types/object-hash": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz", + "integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==" }, "@types/parse-json": { "version": "4.0.0", @@ -12586,14 +12797,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.0.tgz", - "integrity": "sha512-DDrIA7GXtmHXr1VCcx9HivA39eprYBIFxbQEHI6NyraRDxCGpxAFiYQAT/1Y0vh1C+o2vfBiy4IuPoXxtTZCAQ==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", + "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.27.0", - "@typescript-eslint/type-utils": "5.27.0", - "@typescript-eslint/utils": "5.27.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/type-utils": "5.29.0", + "@typescript-eslint/utils": "5.29.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -12603,52 +12814,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.0.tgz", - "integrity": "sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", + "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.27.0", - "@typescript-eslint/types": "5.27.0", - "@typescript-eslint/typescript-estree": "5.27.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz", - "integrity": "sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", + "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.27.0", - "@typescript-eslint/visitor-keys": "5.27.0" + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0" } }, "@typescript-eslint/type-utils": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.0.tgz", - "integrity": "sha512-vpTvRRchaf628Hb/Xzfek+85o//zEUotr1SmexKvTfs7czXfYjXVT/a5yDbpzLBX1rhbqxjDdr1Gyo0x1Fc64g==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", + "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.27.0", + "@typescript-eslint/utils": "5.29.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.0.tgz", - "integrity": "sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", + "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz", - "integrity": "sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz", + "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.27.0", - "@typescript-eslint/visitor-keys": "5.27.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -12657,26 +12868,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.0.tgz", - "integrity": "sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz", + "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.27.0", - "@typescript-eslint/types": "5.27.0", - "@typescript-eslint/typescript-estree": "5.27.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz", - "integrity": "sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz", + "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/types": "5.29.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -12689,12 +12900,12 @@ } }, "@victorradael/protospack-v2": { - "version": "file:../protospack", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@victorradael/protospack-v2/-/protospack-v2-1.1.0.tgz", + "integrity": "sha512-SGCJ49kNfOpG59GMbJG6lR/JC/bLBaCcWMENaF1+b2hAXNs8BePDVMiTTJsETjaAZlpmsJeUTPhvkrwD7GO27A==", "requires": { - "@types/node": "^17.0.21", "rxjs": "^7.5.5", - "ts-proto": "^1.112.2", - "typescript": "^4.6.2" + "ts-proto": "^1.112.2" } }, "@webassemblyjs/ast": { @@ -12924,9 +13135,9 @@ } }, "ajv": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz", - "integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -13251,16 +13462,15 @@ "dev": true }, "browserslist": { - "version": "4.20.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", - "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.0.tgz", + "integrity": "sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001332", - "electron-to-chromium": "^1.4.118", - "escalade": "^3.1.1", - "node-releases": "^2.0.3", - "picocolors": "^1.0.0" + "caniuse-lite": "^1.0.30001358", + "electron-to-chromium": "^1.4.164", + "node-releases": "^2.0.5", + "update-browserslist-db": "^1.0.0" } }, "bs-logger": { @@ -13336,9 +13546,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001344", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz", - "integrity": "sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g==", + "version": "1.0.30001358", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001358.tgz", + "integrity": "sha512-hvp8PSRymk85R20bsDra7ZTCpSVGN/PAz9pSAjPSjKC+rNmnUk5vCRgJwiTT/O4feQ/yu/drvZYpKxxhbFuChw==", "dev": true }, "chalk": { @@ -13386,9 +13596,9 @@ "dev": true }, "ci-info": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", - "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", "dev": true }, "cjs-module-lexer": { @@ -13650,6 +13860,11 @@ "whatwg-url": "^8.0.0" } }, + "dataloader": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", + "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==" + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -13794,9 +14009,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "electron-to-chromium": { - "version": "1.4.142", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.142.tgz", - "integrity": "sha512-ea8Q1YX0JRp4GylOmX4gFHIizi0j9GfRW4EkaHnkZp0agRCBB4ZGeCv17IEzIvBkiYVwfoKVhKZJbTfqCRdQdg==", + "version": "1.4.167", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.167.tgz", + "integrity": "sha512-lPHuHXBwpkr4RcfaZBKm6TKOWG/1N9mVggUpP4fY3l1JIUU2x4fkM8928smYdZ5lF+6KCTAxo1aK9JmqT+X71Q==", "dev": true }, "elliptic": { @@ -13930,7 +14145,7 @@ "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true }, "source-map": { @@ -13943,7 +14158,7 @@ "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "requires": { "prelude-ls": "~1.1.2" @@ -13952,9 +14167,9 @@ } }, "eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", + "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -14261,7 +14476,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" } } }, @@ -14560,13 +14775,13 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" } }, "get-package-type": { @@ -15940,12 +16155,6 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, - "lodash.set": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg==", - "dev": true - }, "log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -15994,12 +16203,12 @@ "dev": true }, "magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.1.tgz", + "integrity": "sha512-ndThHmvgtieXe8J/VGPjG+Apu7v7ItcD5mhEIvOscWjPF/ccOiLxHaSuCAS2G+3x4GKsAbT8u7zdyamupui8Tg==", "dev": true, "requires": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.8" } }, "make-dir": { @@ -16040,12 +16249,12 @@ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" }, "memfs": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.4.tgz", - "integrity": "sha512-W4gHNUE++1oSJVn8Y68jPXi+mkx3fXR5ITE/Ubz6EQ3xRpCN5k2CQ4AUR8094Z7211F876TyoBACGsIveqgiGA==", + "version": "3.4.6", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.6.tgz", + "integrity": "sha512-rH9mjopto6Wkr7RFuH9l9dk3qb2XGOcYKr7xMhaYqfzuJqOqhRrcFvfD7JMuPj6SLmPreh5+6eAuv36NFAU+Mw==", "dev": true, "requires": { - "fs-monkey": "1.0.3" + "fs-monkey": "^1.0.3" } }, "merge-descriptors": { @@ -16191,14 +16400,14 @@ "dev": true }, "nock": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.4.tgz", - "integrity": "sha512-8GPznwxcPNCH/h8B+XZcKjYPXnUV5clOKCjAqyjsiqA++MpNx9E9+t8YPp0MbThO+KauRo7aZJ1WuIZmOrT2Ug==", + "version": "13.2.7", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.7.tgz", + "integrity": "sha512-R6NUw7RIPtKwgK7jskuKoEi4VFMqIHtV2Uu9K/Uegc4TA5cqe+oNMYslZcUmnVNQCTG6wcSqUBaGTDd7sq5srg==", "dev": true, "requires": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", - "lodash.set": "^4.3.2", + "lodash": "^4.17.21", "propagate": "^2.0.0" } }, @@ -16222,17 +16431,17 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -16243,7 +16452,7 @@ "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, "node-releases": { @@ -16281,7 +16490,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-hash": { "version": "3.0.0", @@ -16304,7 +16513,7 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "requires": { "wrappy": "1" } @@ -16374,7 +16583,7 @@ "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true }, "p-limit": { @@ -16505,7 +16714,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" }, "path-key": { "version": "3.1.1", @@ -16580,10 +16789,9 @@ "dev": true }, "prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", - "dev": true + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==" }, "prettier-linter-helpers": { "version": "1.0.0", @@ -16763,7 +16971,7 @@ "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "requires": { "resolve": "^1.1.6" @@ -16783,7 +16991,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" }, "require-from-string": { "version": "2.0.2", @@ -16792,12 +17000,12 @@ "dev": true }, "resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { - "is-core-module": "^2.8.1", + "is-core-module": "^2.9.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -17098,7 +17306,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "stack-utils": { @@ -17190,9 +17398,9 @@ "dev": true }, "superagent": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-7.1.3.tgz", - "integrity": "sha512-WA6et4nAvgBCS73lJvv1D0ssI5uk5Gh+TGN/kNe+B608EtcVs/yzfl+OLXTzDs7tOBDIpvgh/WUs1K2OK1zTeQ==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-7.1.6.tgz", + "integrity": "sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==", "dev": true, "requires": { "component-emitter": "^1.3.0", @@ -17202,7 +17410,7 @@ "form-data": "^4.0.0", "formidable": "^2.0.1", "methods": "^1.1.2", - "mime": "^2.5.0", + "mime": "2.6.0", "qs": "^6.10.3", "readable-stream": "^3.6.0", "semver": "^7.3.7" @@ -17273,9 +17481,9 @@ "dev": true }, "swagger-ui-dist": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.11.1.tgz", - "integrity": "sha512-pf3kfSTYdF9mYFY2VnfJ51wnXlSVhEGdtymhpHzfbFw2jTbiEWgBoVz5EB9aW2EaJvUGTM1YHAXYZX7Jk4RdAQ==" + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.12.0.tgz", + "integrity": "sha512-B0Iy2ueXtbByE6OOyHTi3lFQkpPi/L7kFOKFeKTr44za7dJIELa9kzaca6GkndCgpK1QTjArnoXG+aUy0XQp1w==" }, "swagger-ui-express": { "version": "4.4.0", @@ -17314,9 +17522,9 @@ } }, "terser": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.0.tgz", - "integrity": "sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==", + "version": "5.14.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.1.tgz", + "integrity": "sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ==", "dev": true, "requires": { "@jridgewell/source-map": "^0.3.2", @@ -17334,24 +17542,16 @@ } }, "terser-webpack-plugin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz", - "integrity": "sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", + "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.7", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", "terser": "^5.7.2" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, "test-exclude": { @@ -17368,7 +17568,7 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, "throat": { @@ -17380,7 +17580,7 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, "tmp": { @@ -17401,7 +17601,7 @@ "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true }, "to-regex-range": { @@ -17466,12 +17666,20 @@ "make-error": "1.x", "semver": "7.x", "yargs-parser": "20.x" + }, + "dependencies": { + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + } } }, "ts-loader": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.0.tgz", - "integrity": "sha512-2kLLAdAD+FCKijvGKi9sS0OzoqxLCF3CxHpok7rVgCZ5UldRzH0TkbwG9XECKjBzHsAewntC5oDaI/FwKzEUog==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.1.tgz", + "integrity": "sha512-OkyShkcZTsTwyS3Kt7a4rsT/t2qvEVQuKCTg4LJmpj9fhFR7ukGdZwV6Qq3tRUkqcXtfGpPR7+hFKHCG/0d3Lw==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -17493,9 +17701,9 @@ } }, "ts-node": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.8.0.tgz", - "integrity": "sha512-/fNd5Qh+zTt8Vt1KbYZjRHCE9sI5i7nqfD/dzBBRDeVXZXS6kToW6R7tTU6Nd4XavFs0mAVCg29Q//ML7WsZYA==", + "version": "10.8.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.8.1.tgz", + "integrity": "sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g==", "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", @@ -17521,6 +17729,44 @@ } } }, + "ts-poet": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-4.14.0.tgz", + "integrity": "sha512-hLGzWo3H3GLjVubftvaycGSconJrNpjjdpn43Lthnu61l/R2CaPIu+1JhaWZyqh2yj5NaOv+wZ5zoSJzDouAHw==", + "requires": { + "lodash": "^4.17.15", + "prettier": "^2.5.1" + } + }, + "ts-proto": { + "version": "1.115.5", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.115.5.tgz", + "integrity": "sha512-JGk6hln3JP0T0wJlqIOUGE/qHDYcI547hrJwAzeLq1E2l7IdYnYiAJRsvJEOsvotIyZXMbHNlZedIZEVIPAspQ==", + "requires": { + "@types/object-hash": "^1.3.0", + "dataloader": "^1.4.0", + "object-hash": "^1.3.1", + "protobufjs": "^6.11.3", + "ts-poet": "^4.11.0", + "ts-proto-descriptors": "1.6.0" + }, + "dependencies": { + "object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==" + } + } + }, + "ts-proto-descriptors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.6.0.tgz", + "integrity": "sha512-Vrhue2Ti99us/o76mGy28nF3W/Uanl1/8detyJw2yyRwiBC5yxy+hEZqQ/ZX2PbZ1vyCpJ51A9L4PnCCnkBMTQ==", + "requires": { + "long": "^4.0.0", + "protobufjs": "^6.8.8" + } + }, "tsconfig-paths": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", @@ -17545,7 +17791,7 @@ "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true } } @@ -17628,7 +17874,7 @@ "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, "typedarray-to-buffer": { "version": "3.1.5", @@ -17640,9 +17886,9 @@ } }, "typescript": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", - "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true }, "uid2": { @@ -17659,7 +17905,17 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + }, + "update-browserslist-db": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", + "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } }, "uri-js": { "version": "4.4.1", @@ -17673,12 +17929,12 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { "version": "8.3.2", @@ -17711,7 +17967,7 @@ "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" }, "w3c-hr-time": { "version": "1.0.2", @@ -17741,9 +17997,9 @@ } }, "watchpack": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", - "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", @@ -17753,7 +18009,7 @@ "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, "requires": { "defaults": "^1.0.3" @@ -17766,9 +18022,9 @@ "dev": true }, "webpack": { - "version": "5.72.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.1.tgz", - "integrity": "sha512-dXG5zXCLspQR4krZVR6QgajnZOjW2K/djHvdcRaDQvsjV9z9vaW6+ja5dZOYbqBBjF6kGXka/2ZyxNdc+8Jung==", + "version": "5.73.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", + "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", @@ -17906,7 +18162,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "write-file-atomic": { "version": "3.0.3", @@ -17973,12 +18229,20 @@ "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" + }, + "dependencies": { + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + } } }, "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "dev": true }, "yn": { "version": "3.1.1", diff --git a/package.json b/package.json index 34a2ed5..03e0132 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@nestjs/schedule": "^1.1.0", "@nestjs/swagger": "^5.2.1", "@victorradael/protospack": "2.5.0", - "@victorradael/protospack-v2": "../protospack", + "@victorradael/protospack-v2": "1.1.0", "axios": "^0.25.0", "cron-parser": "^4.4.0", "dotenv": "^14.2.0", From 55fb1a8b3491dea3be13bdf27ba488ea3400a4f7 Mon Sep 17 00:00:00 2001 From: Arthur Simas Date: Thu, 23 Jun 2022 23:38:24 -0300 Subject: [PATCH 3/4] FIX: suppressing health check not authenticated log --- src/authentication/authentication.guard.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/authentication/authentication.guard.ts b/src/authentication/authentication.guard.ts index bf4fbf2..f4d3454 100644 --- a/src/authentication/authentication.guard.ts +++ b/src/authentication/authentication.guard.ts @@ -123,7 +123,11 @@ export class AuthenticationGuard jwt.verify(accessToken, pemValue); accessTokenPayload = accessTokenDecoded.payload; } catch (err) { - this.logger.log('Unable to verify duc access token\n' + err.stack); + // only log if it's not a health check request + if (`${request.method} ${request.route.path}` !== 'GET /health') { + this.logger.log('Unable to verify duc access token\n' + err.stack); + } + return false; } From 3fe91ad4e88c51728f2119c7726d0e4354be5dd5 Mon Sep 17 00:00:00 2001 From: Arthur Simas Date: Sat, 25 Jun 2022 20:07:16 -0300 Subject: [PATCH 4/4] FIX: logging errors only if auth is required --- src/authentication/authentication.guard.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/authentication/authentication.guard.ts b/src/authentication/authentication.guard.ts index f4d3454..00edbd6 100644 --- a/src/authentication/authentication.guard.ts +++ b/src/authentication/authentication.guard.ts @@ -63,7 +63,7 @@ export class AuthenticationGuard ); const request = ctx.switchToHttp().getRequest(); - const accessToken = this.verifyToken(request); + const accessToken = this.verifyToken(request, mustBeAuthenticated); if (!accessToken) { // couldn't load valid token @@ -96,7 +96,7 @@ export class AuthenticationGuard return true; } - private verifyToken(request) { + private verifyToken(request, mustBeAuthenticated: boolean) { const accessToken = request.get('Authorization'); let accessTokenPayload; @@ -123,8 +123,8 @@ export class AuthenticationGuard jwt.verify(accessToken, pemValue); accessTokenPayload = accessTokenDecoded.payload; } catch (err) { - // only log if it's not a health check request - if (`${request.method} ${request.route.path}` !== 'GET /health') { + // log errors if authentication is required + if (mustBeAuthenticated) { this.logger.log('Unable to verify duc access token\n' + err.stack); }