From 30a95e334731ac239fbf5955265cd667abefc71a Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 8 Nov 2023 04:37:20 +0000 Subject: [PATCH 1/5] refactor: proper request type - WIP --- .../src/controllers/api-tokens.controller.ts | 9 ++--- .../attachments-secure.controller.ts | 13 ++++---- .../src/controllers/attachments.controller.ts | 16 ++++----- .../src/controllers/audits.controller.ts | 13 ++++---- .../src/controllers/auth/auth.controller.ts | 14 ++++---- .../src/controllers/base-users.controller.ts | 15 +++++---- .../src/controllers/bases.controller.ts | 11 ++++--- .../controllers/bulk-data-alias.controller.ts | 17 +++++----- .../src/controllers/columns.controller.ts | 11 ++++--- .../data-alias-export.controller.ts | 7 ++-- .../data-alias-nested.controller.ts | 17 +++++----- .../src/controllers/data-alias.controller.ts | 33 ++++++++++--------- .../src/controllers/data-table.controller.ts | 27 +++++++-------- .../src/controllers/datas.controller.ts | 27 +++++++-------- .../src/controllers/filters.controller.ts | 9 ++--- .../controllers/form-columns.controller.ts | 5 +-- .../src/controllers/forms.controller.ts | 4 +-- .../src/controllers/galleries.controller.ts | 4 +-- .../controllers/grid-columns.controller.ts | 2 +- .../src/controllers/grids.controller.ts | 4 +-- .../src/controllers/hooks.controller.ts | 10 +++--- .../src/controllers/kanbans.controller.ts | 4 +-- .../nocodb/src/controllers/maps.controller.ts | 4 +-- .../model-visibilities.controller.ts | 2 +- .../controllers/notifications.controller.ts | 2 +- .../src/controllers/org-tokens.controller.ts | 2 +- .../src/controllers/org-users.controller.ts | 2 +- .../src/controllers/plugins.controller.ts | 4 +-- .../controllers/public-datas.controller.ts | 19 ++++++----- .../controllers/public-metas.controller.ts | 2 +- .../controllers/shared-bases.controller.ts | 2 +- .../src/controllers/sorts.controller.ts | 6 ++-- .../src/controllers/sources.controller.ts | 5 +-- .../nocodb/src/controllers/sync.controller.ts | 6 ++-- .../src/controllers/utils.controller.ts | 2 +- .../controllers/view-columns.controller.ts | 4 +-- .../src/controllers/views.controller.ts | 6 ++-- packages/nocodb/src/interface/config.ts | 9 +++++ .../src/modules/jobs/jobs.controller.ts | 2 +- .../jobs/at-import/at-import.controller.ts | 2 +- .../export-import/duplicate.controller.ts | 6 ++-- .../jobs/meta-sync/meta-sync.controller.ts | 4 +-- .../source-create/source-create.controller.ts | 2 +- .../source-delete/source-delete.controller.ts | 2 +- packages/nocodb/src/types/express.d.ts | 26 +++++++++++++++ packages/nocodb/tsconfig.json | 3 +- 46 files changed, 223 insertions(+), 173 deletions(-) create mode 100644 packages/nocodb/src/types/express.d.ts diff --git a/packages/nocodb/src/controllers/api-tokens.controller.ts b/packages/nocodb/src/controllers/api-tokens.controller.ts index e6a3e51fc0..3549f388d9 100644 --- a/packages/nocodb/src/controllers/api-tokens.controller.ts +++ b/packages/nocodb/src/controllers/api-tokens.controller.ts @@ -6,9 +6,10 @@ import { HttpCode, Param, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { ApiTokensService } from '~/services/api-tokens.service'; @@ -25,7 +26,7 @@ export class ApiTokensController { '/api/v2/meta/bases/:baseId/api-tokens', ]) @Acl('baseApiTokenList') - async apiTokenList(@Request() req) { + async apiTokenList(@Req() req: Request) { return new PagedResponseImpl( await this.apiTokensService.apiTokenList({ userId: req['user'].id }), ); @@ -37,7 +38,7 @@ export class ApiTokensController { ]) @HttpCode(200) @Acl('baseApiTokenCreate') - async apiTokenCreate(@Request() req, @Body() body) { + async apiTokenCreate(@Req() req: Request, @Body() body) { return await this.apiTokensService.apiTokenCreate({ tokenBody: body, userId: req['user'].id, @@ -50,7 +51,7 @@ export class ApiTokensController { '/api/v2/meta/bases/:baseId/api-tokens/:token', ]) @Acl('baseApiTokenDelete') - async apiTokenDelete(@Request() req, @Param('token') token: string) { + async apiTokenDelete(@Req() req: Request, @Param('token') token: string) { return await this.apiTokensService.apiTokenDelete({ token, user: req['user'], diff --git a/packages/nocodb/src/controllers/attachments-secure.controller.ts b/packages/nocodb/src/controllers/attachments-secure.controller.ts index 8fc84680c6..9a41df56e1 100644 --- a/packages/nocodb/src/controllers/attachments-secure.controller.ts +++ b/packages/nocodb/src/controllers/attachments-secure.controller.ts @@ -6,8 +6,8 @@ import { HttpCode, Param, Post, - Request, - Response, + Req, + Res, UploadedFiles, UseGuards, UseInterceptors, @@ -15,8 +15,7 @@ import { import hash from 'object-hash'; import moment from 'moment'; import { AnyFilesInterceptor } from '@nestjs/platform-express'; -import { Response as ResponseType } from 'express'; -import type { Request as RequestType } from 'express'; +import { Request, Response } from 'express'; import type { AttachmentReqType, FileType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { AttachmentsService } from '~/services/attachments.service'; @@ -34,7 +33,7 @@ export class AttachmentsSecureController { @UseInterceptors(UploadAllowedInterceptor, AnyFilesInterceptor()) async upload( @UploadedFiles() files: Array, - @Request() req: RequestType & { user: { id: string } }, + @Req() req: Request & { user: { id: string } }, ) { const path = `${moment().format('YYYY/MM/DD')}/${hash(req.user.id)}`; @@ -53,7 +52,7 @@ export class AttachmentsSecureController { @UseGuards(MetaApiLimiterGuard, GlobalGuard) async uploadViaURL( @Body() body: Array, - @Request() req: RequestType & { user: { id: string } }, + @Req() req: Request & { user: { id: string } }, ) { const path = `${moment().format('YYYY/MM/DD')}/${hash(req.user.id)}`; @@ -69,7 +68,7 @@ export class AttachmentsSecureController { @Get('/dltemp/:param(*)') async fileReadv3( @Param('param') param: string, - @Response() res: ResponseType, + @Res() res: Response, ) { try { const fpath = await PresignedUrl.getPath(`dltemp/${param}`); diff --git a/packages/nocodb/src/controllers/attachments.controller.ts b/packages/nocodb/src/controllers/attachments.controller.ts index b15d534fc1..3ec0c2da82 100644 --- a/packages/nocodb/src/controllers/attachments.controller.ts +++ b/packages/nocodb/src/controllers/attachments.controller.ts @@ -7,14 +7,14 @@ import { Param, Post, Query, - Request, - Response, + Req, + Res, UploadedFiles, UseGuards, UseInterceptors, } from '@nestjs/common'; import { AnyFilesInterceptor } from '@nestjs/platform-express'; -import { Request as RequestType, Response as ResponseType } from 'express'; +import { Request, Response } from 'express'; import type { AttachmentReqType, FileType } from 'nocodb-sdk'; import { UploadAllowedInterceptor } from '~/interceptors/is-upload-allowed/is-upload-allowed.interceptor'; import { GlobalGuard } from '~/guards/global/global.guard'; @@ -32,7 +32,7 @@ export class AttachmentsController { @UseInterceptors(UploadAllowedInterceptor, AnyFilesInterceptor()) async upload( @UploadedFiles() files: Array, - @Request() req: RequestType, + @Req() req: Request, ) { const attachments = await this.attachmentsService.upload({ files: files, @@ -50,7 +50,7 @@ export class AttachmentsController { async uploadViaURL( @Body() body: Array, @Query('path') path: string, - @Request() req: any, + @Req() req: Request, ) { const attachments = await this.attachmentsService.uploadViaURL({ urls: body, @@ -67,7 +67,7 @@ export class AttachmentsController { // This route will match any URL that starts with async fileRead( @Param('filename') filename: string, - @Response() res: ResponseType, + @Res() res: Response, ) { try { const file = await this.attachmentsService.getFile({ @@ -87,7 +87,7 @@ export class AttachmentsController { @Param('param1') param1: string, @Param('param2') param2: string, @Param('filename') filename: string, - @Response() res: ResponseType, + @Res() res: Response, ) { try { const file = await this.attachmentsService.getFile({ @@ -109,7 +109,7 @@ export class AttachmentsController { @Get('/dltemp/:param(*)') async fileReadv3( @Param('param') param: string, - @Response() res: ResponseType, + @Res() res: Response, ) { try { const fpath = await PresignedUrl.getPath(`dltemp/${param}`); diff --git a/packages/nocodb/src/controllers/audits.controller.ts b/packages/nocodb/src/controllers/audits.controller.ts index 1e21690de8..64791f5928 100644 --- a/packages/nocodb/src/controllers/audits.controller.ts +++ b/packages/nocodb/src/controllers/audits.controller.ts @@ -7,9 +7,10 @@ import { Patch, Post, Query, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { AuditsService } from '~/services/audits.service'; @@ -24,7 +25,7 @@ export class AuditsController { @Post(['/api/v1/db/meta/audits/comments', '/api/v2/meta/audits/comments']) @HttpCode(200) @Acl('commentRow') - async commentRow(@Request() req) { + async commentRow(@Req() req: Request) { return await this.auditsService.commentRow({ user: (req as any).user, body: req.body, @@ -46,7 +47,7 @@ export class AuditsController { @Get(['/api/v1/db/meta/audits/comments', '/api/v2/meta/audits/comments']) @Acl('commentList') - async commentList(@Request() req) { + async commentList(@Req() req: Request) { return new PagedResponseImpl( await this.auditsService.commentList({ query: req.query }), ); @@ -59,7 +60,7 @@ export class AuditsController { @Acl('commentUpdate') async commentUpdate( @Param('auditId') auditId: string, - @Request() req, + @Req() req: Request, @Body() body: any, ) { return await this.auditsService.commentUpdate({ @@ -74,14 +75,14 @@ export class AuditsController { '/api/v2/meta/bases/:baseId/audits/', ]) @Acl('auditList') - async auditList(@Request() req, @Param('baseId') baseId: string) { + async auditList(@Req() req: Request, @Param('baseId') baseId: string) { return new PagedResponseImpl( await this.auditsService.auditList({ query: req.query, baseId, }), { - count: this.auditsService.auditCount({ baseId }), + count: await this.auditsService.auditCount({ baseId }), ...req.query, }, ); diff --git a/packages/nocodb/src/controllers/auth/auth.controller.ts b/packages/nocodb/src/controllers/auth/auth.controller.ts index bee594a67a..c7780cf61f 100644 --- a/packages/nocodb/src/controllers/auth/auth.controller.ts +++ b/packages/nocodb/src/controllers/auth/auth.controller.ts @@ -41,7 +41,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) - async signup(@Request() req: any, @Response() res: any): Promise { + async signup(@Req() req: Request, @Response() res: any): Promise { if (this.config.get('auth', { infer: true }).disableEmailAuth) { NcError.forbidden('Email authentication is disabled'); } @@ -61,7 +61,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) - async refreshToken(@Request() req: any, @Response() res: any): Promise { + async refreshToken(@Req() req: Request, @Response() res: any): Promise { res.json( await this.usersService.refreshToken({ body: req.body, @@ -137,7 +137,7 @@ export class AuthController { scope: 'org', }) @HttpCode(200) - async passwordChange(@Request() req: any): Promise { + async passwordChange(@Req() req: Request): Promise { if (!(req as any).isAuthenticated()) { NcError.forbidden('Not allowed'); } @@ -158,7 +158,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) - async passwordForgot(@Request() req: any): Promise { + async passwordForgot(@Req() req: Request): Promise { await this.usersService.passwordForgot({ siteUrl: (req as any).ncSiteUrl, body: req.body, @@ -190,7 +190,7 @@ export class AuthController { @UseGuards(PublicApiLimiterGuard) @HttpCode(200) async passwordReset( - @Request() req: any, + @Req() req: Request, @Param('tokenId') tokenId: string, @Body() body: any, ): Promise { @@ -210,7 +210,7 @@ export class AuthController { @UseGuards(PublicApiLimiterGuard) @HttpCode(200) async emailVerification( - @Request() req: any, + @Req() req: Request, @Param('tokenId') tokenId: string, ): Promise { await this.usersService.emailVerification({ @@ -227,7 +227,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard) async renderPasswordReset( - @Request() req: any, + @Req() req: Request, @Response() res: any, @Param('tokenId') tokenId: string, ): Promise { diff --git a/packages/nocodb/src/controllers/base-users.controller.ts b/packages/nocodb/src/controllers/base-users.controller.ts index b32bae2ebe..4fdb903970 100644 --- a/packages/nocodb/src/controllers/base-users.controller.ts +++ b/packages/nocodb/src/controllers/base-users.controller.ts @@ -7,9 +7,10 @@ import { Param, Patch, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { ProjectUserReqType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { BaseUsersService } from '~/services/base-users/base-users.service'; @@ -27,7 +28,7 @@ export class BaseUsersController { '/api/v2/meta/bases/:baseId/users', ]) @Acl('userList') - async userList(@Param('baseId') baseId: string, @Request() req) { + async userList(@Param('baseId') baseId: string, @Req() req: Request) { return { users: await this.baseUsersService.userList({ baseId, @@ -44,7 +45,7 @@ export class BaseUsersController { @Acl('userInvite') async userInvite( @Param('baseId') baseId: string, - @Request() req, + @Req() req: Request, @Body() body: ProjectUserReqType, ): Promise { // todo: move this to a service @@ -66,7 +67,7 @@ export class BaseUsersController { async baseUserUpdate( @Param('baseId') baseId: string, @Param('userId') userId: string, - @Request() req, + @Req() req: Request, @Body() body: ProjectUserReqType & { base_id: string; @@ -91,7 +92,7 @@ export class BaseUsersController { async baseUserDelete( @Param('baseId') baseId: string, @Param('userId') userId: string, - @Request() req, + @Req() req: Request, ): Promise { await this.baseUsersService.baseUserDelete({ baseId, @@ -112,7 +113,7 @@ export class BaseUsersController { async baseUserInviteResend( @Param('baseId') baseId: string, @Param('userId') userId: string, - @Request() req, + @Req() req: Request, @Body() body: ProjectUserReqType, ): Promise { await this.baseUsersService.baseUserInviteResend({ @@ -133,7 +134,7 @@ export class BaseUsersController { @Acl('baseUserMetaUpdate') async baseUserMetaUpdate( @Param('baseId') baseId: string, - @Request() req, + @Req() req: Request, @Body() body: ProjectUserReqType, ): Promise { return await this.baseUsersService.baseUserMetaUpdate({ diff --git a/packages/nocodb/src/controllers/bases.controller.ts b/packages/nocodb/src/controllers/bases.controller.ts index b2571e3413..3128fc0015 100644 --- a/packages/nocodb/src/controllers/bases.controller.ts +++ b/packages/nocodb/src/controllers/bases.controller.ts @@ -8,9 +8,10 @@ import { Patch, Post, Query, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import isDocker from 'is-docker'; import { ProjectReqType } from 'nocodb-sdk'; import type { BaseType } from 'nocodb-sdk'; @@ -32,7 +33,7 @@ export class BasesController { scope: 'org', }) @Get(['/api/v1/db/meta/projects/', '/api/v2/meta/bases/']) - async list(@Query() queryParams: Record, @Request() req) { + async list(@Query() queryParams: Record, @Req() req: Request) { const bases = await this.projectsService.baseList({ user: req.user, query: queryParams, @@ -76,7 +77,7 @@ export class BasesController { async baseUpdate( @Param('baseId') baseId: string, @Body() body: Record, - @Request() req, + @Req() req: Request, ) { const base = await this.projectsService.baseUpdate({ baseId, @@ -90,7 +91,7 @@ export class BasesController { @Acl('baseDelete') @Delete(['/api/v1/db/meta/projects/:baseId', '/api/v2/meta/bases/:baseId']) - async baseDelete(@Param('baseId') baseId: string, @Request() req) { + async baseDelete(@Param('baseId') baseId: string, @Req() req: Request) { const deleted = await this.projectsService.baseSoftDelete({ baseId, user: req.user, @@ -105,7 +106,7 @@ export class BasesController { }) @Post(['/api/v1/db/meta/projects', '/api/v2/meta/bases']) @HttpCode(200) - async baseCreate(@Body() baseBody: ProjectReqType, @Request() req) { + async baseCreate(@Body() baseBody: ProjectReqType, @Req() req: Request) { const base = await this.projectsService.baseCreate({ base: baseBody, req, diff --git a/packages/nocodb/src/controllers/bulk-data-alias.controller.ts b/packages/nocodb/src/controllers/bulk-data-alias.controller.ts index 90cbd51c28..740979667d 100644 --- a/packages/nocodb/src/controllers/bulk-data-alias.controller.ts +++ b/packages/nocodb/src/controllers/bulk-data-alias.controller.ts @@ -6,10 +6,11 @@ import { Param, Patch, Post, - Request, - Response, + Req, + Res, UseGuards, } from '@nestjs/common'; +import { Request, Response } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { BulkDataAliasService } from '~/services/bulk-data-alias.service'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; @@ -24,8 +25,8 @@ export class BulkDataAliasController { @HttpCode(200) @Acl('bulkDataInsert') async bulkDataInsert( - @Request() req, - @Response() res, + @Req() req: Request, + @Res() res: Response, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Body() body: any, @@ -43,7 +44,7 @@ export class BulkDataAliasController { @Patch(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName']) @Acl('bulkDataUpdate') async bulkDataUpdate( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Body() body: any, @@ -60,7 +61,7 @@ export class BulkDataAliasController { @Patch(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all']) @Acl('bulkDataUpdateAll') async bulkDataUpdateAll( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Body() body: any, @@ -77,7 +78,7 @@ export class BulkDataAliasController { @Delete(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName']) @Acl('bulkDataDelete') async bulkDataDelete( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Body() body: any, @@ -95,7 +96,7 @@ export class BulkDataAliasController { @Delete(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all']) @Acl('bulkDataDeleteAll') async bulkDataDeleteAll( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, ) { diff --git a/packages/nocodb/src/controllers/columns.controller.ts b/packages/nocodb/src/controllers/columns.controller.ts index deccc874e9..d27ace33ce 100644 --- a/packages/nocodb/src/controllers/columns.controller.ts +++ b/packages/nocodb/src/controllers/columns.controller.ts @@ -7,9 +7,10 @@ import { Param, Patch, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { ColumnReqType } from 'nocodb-sdk'; import type { Column } from '~/models'; import { GlobalGuard } from '~/guards/global/global.guard'; @@ -31,7 +32,7 @@ export class ColumnsController { async columnAdd( @Param('tableId') tableId: string, @Body() body: ColumnReqType, - @Request() req: any, + @Req() req: Request, ) { return await this.columnsService.columnAdd({ tableId, @@ -49,7 +50,7 @@ export class ColumnsController { async columnUpdate( @Param('columnId') columnId: string, @Body() body: ColumnReqType, - @Request() req: any, + @Req() req: Request, ) { return await this.columnsService.columnUpdate({ columnId: columnId, @@ -64,7 +65,7 @@ export class ColumnsController { '/api/v2/meta/columns/:columnId', ]) @Acl('columnDelete') - async columnDelete(@Param('columnId') columnId: string, @Request() req: any) { + async columnDelete(@Param('columnId') columnId: string, @Req() req: Request) { return await this.columnsService.columnDelete({ columnId, req, @@ -113,7 +114,7 @@ export class ColumnsController { column: Partial; }[]; }, - @Request() req: any, + @Req() req: Request, ) { return await this.columnsService.columnBulk(tableId, body, req); } diff --git a/packages/nocodb/src/controllers/data-alias-export.controller.ts b/packages/nocodb/src/controllers/data-alias-export.controller.ts index 0193b21292..4d94ada8ae 100644 --- a/packages/nocodb/src/controllers/data-alias-export.controller.ts +++ b/packages/nocodb/src/controllers/data-alias-export.controller.ts @@ -1,4 +1,5 @@ -import { Controller, Get, Request, Response, UseGuards } from '@nestjs/common'; +import { Controller, Get, Req, Res, UseGuards } from '@nestjs/common'; +import { Request, Response } from 'express'; import * as XLSX from 'xlsx'; import { GlobalGuard } from '~/guards/global/global.guard'; import { DatasService } from '~/services/datas.service'; @@ -17,7 +18,7 @@ export class DataAliasExportController { '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/export/excel', ]) @Acl('exportExcel') - async excelDataExport(@Request() req, @Response() res) { + async excelDataExport(@Req() req: Request, @Res() res: Response) { const { model, view } = await this.datasService.getViewAndModelFromRequestByAliasOrId(req); let targetView = view; @@ -44,7 +45,7 @@ export class DataAliasExportController { '/api/v1/db/data/:orgs/:baseName/:tableName/export/csv', ]) @Acl('exportCsv') - async csvDataExport(@Request() req, @Response() res) { + async csvDataExport(@Req() req: Request, @Res() res: Response) { const { model, view } = await this.datasService.getViewAndModelFromRequestByAliasOrId(req); let targetView = view; diff --git a/packages/nocodb/src/controllers/data-alias-nested.controller.ts b/packages/nocodb/src/controllers/data-alias-nested.controller.ts index 616ac033ee..3807d2478f 100644 --- a/packages/nocodb/src/controllers/data-alias-nested.controller.ts +++ b/packages/nocodb/src/controllers/data-alias-nested.controller.ts @@ -5,9 +5,10 @@ import { HttpCode, Param, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { DataAliasNestedService } from '~/services/data-alias-nested.service'; import { GlobalGuard } from '~/guards/global/global.guard'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; @@ -22,7 +23,7 @@ export class DataAliasNestedController { @Get(['/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName']) @Acl('mmList') async mmList( - @Request() req, + @Req() req: Request, @Param('columnName') columnName: string, @Param('rowId') rowId: string, @Param('baseName') baseName: string, @@ -42,7 +43,7 @@ export class DataAliasNestedController { ]) @Acl('mmExcludedList') async mmExcludedList( - @Request() req, + @Req() req: Request, @Param('columnName') columnName: string, @Param('rowId') rowId: string, @Param('baseName') baseName: string, @@ -62,7 +63,7 @@ export class DataAliasNestedController { ]) @Acl('hmExcludedList') async hmExcludedList( - @Request() req, + @Req() req: Request, @Param('columnName') columnName: string, @Param('rowId') rowId: string, @Param('baseName') baseName: string, @@ -82,7 +83,7 @@ export class DataAliasNestedController { ]) @Acl('btExcludedList') async btExcludedList( - @Request() req, + @Req() req: Request, @Param('columnName') columnName: string, @Param('rowId') rowId: string, @Param('baseName') baseName: string, @@ -102,7 +103,7 @@ export class DataAliasNestedController { @Get(['/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName']) @Acl('hmList') async hmList( - @Request() req, + @Req() req: Request, @Param('columnName') columnName: string, @Param('rowId') rowId: string, @Param('baseName') baseName: string, @@ -122,7 +123,7 @@ export class DataAliasNestedController { ]) @Acl('relationDataRemove') async relationDataRemove( - @Request() req, + @Req() req: Request, @Param('columnName') columnName: string, @Param('rowId') rowId: string, @Param('baseName') baseName: string, @@ -148,7 +149,7 @@ export class DataAliasNestedController { @Acl('relationDataAdd') @HttpCode(200) async relationDataAdd( - @Request() req, + @Req() req: Request, @Param('columnName') columnName: string, @Param('rowId') rowId: string, @Param('baseName') baseName: string, diff --git a/packages/nocodb/src/controllers/data-alias.controller.ts b/packages/nocodb/src/controllers/data-alias.controller.ts index 24f70fab92..a1228605d1 100644 --- a/packages/nocodb/src/controllers/data-alias.controller.ts +++ b/packages/nocodb/src/controllers/data-alias.controller.ts @@ -8,10 +8,11 @@ import { Patch, Post, Query, - Request, - Response, + Req, + Res, UseGuards, } from '@nestjs/common'; +import { Request, Response } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { parseHrtimeToMilliSeconds } from '~/helpers'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; @@ -30,8 +31,8 @@ export class DataAliasController { ]) @Acl('dataList') async dataList( - @Request() req, - @Response() res, + @Req() req: Request, + @Res() res: Response, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -62,7 +63,7 @@ export class DataAliasController { ]) @Acl('dataFindOne') async dataFindOne( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -81,7 +82,7 @@ export class DataAliasController { ]) @Acl('dataGroupBy') async dataGroupBy( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -100,8 +101,8 @@ export class DataAliasController { ]) @Acl('dataCount') async dataCount( - @Request() req, - @Response() res, + @Req() req: Request, + @Res() res: Response, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -123,7 +124,7 @@ export class DataAliasController { @HttpCode(200) @Acl('dataInsert') async dataInsert( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -146,7 +147,7 @@ export class DataAliasController { ]) @Acl('dataUpdate') async dataUpdate( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -170,7 +171,7 @@ export class DataAliasController { ]) @Acl('dataDelete') async dataDelete( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -191,7 +192,7 @@ export class DataAliasController { ]) @Acl('dataRead') async dataRead( - @Request() req, + @Req() req: Request, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -216,8 +217,8 @@ export class DataAliasController { ]) @Acl('dataExist') async dataExist( - @Request() req, - @Response() res, + @Req() req: Request, + @Res() res: Response, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, @@ -242,8 +243,8 @@ export class DataAliasController { ]) @Acl('groupedDataList') async groupedDataList( - @Request() req, - @Response() res, + @Req() req: Request, + @Res() res: Response, @Param('baseName') baseName: string, @Param('tableName') tableName: string, @Param('viewName') viewName: string, diff --git a/packages/nocodb/src/controllers/data-table.controller.ts b/packages/nocodb/src/controllers/data-table.controller.ts index 9a4e16d0f8..e15bb39ffb 100644 --- a/packages/nocodb/src/controllers/data-table.controller.ts +++ b/packages/nocodb/src/controllers/data-table.controller.ts @@ -8,10 +8,11 @@ import { Patch, Post, Query, - Request, - Response, + Req, + Res, UseGuards, } from '@nestjs/common'; +import { Request, Response } from 'express'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; import { DataTableService } from '~/services/data-table.service'; import { parseHrtimeToMilliSeconds } from '~/helpers'; @@ -27,8 +28,8 @@ export class DataTableController { @Get('/api/v2/tables/:modelId/records') @Acl('dataList') async dataList( - @Request() req, - @Response() res, + @Req() req: Request, + @Res() res: Response, @Param('modelId') modelId: string, @Query('viewId') viewId: string, ) { @@ -46,8 +47,8 @@ export class DataTableController { @Get(['/api/v2/tables/:modelId/records/count']) @Acl('dataCount') async dataCount( - @Request() req, - @Response() res, + @Req() req: Request, + @Res() res: Response, @Param('modelId') modelId: string, @Query('viewId') viewId: string, ) { @@ -64,7 +65,7 @@ export class DataTableController { @HttpCode(200) @Acl('dataInsert') async dataInsert( - @Request() req, + @Req() req: Request, @Param('modelId') modelId: string, @Query('viewId') viewId: string, @Body() body: any, @@ -80,7 +81,7 @@ export class DataTableController { @Patch(['/api/v2/tables/:modelId/records']) @Acl('dataUpdate') async dataUpdate( - @Request() req, + @Req() req: Request, @Param('modelId') modelId: string, @Query('viewId') viewId: string, @Param('rowId') _rowId: string, @@ -96,7 +97,7 @@ export class DataTableController { @Delete(['/api/v2/tables/:modelId/records']) @Acl('dataDelete') async dataDelete( - @Request() req, + @Req() req: Request, @Param('modelId') modelId: string, @Query('viewId') viewId: string, @Param('rowId') _rowId: string, @@ -112,7 +113,7 @@ export class DataTableController { @Get(['/api/v2/tables/:modelId/records/:rowId']) @Acl('dataRead') async dataRead( - @Request() req, + @Req() req: Request, @Param('modelId') modelId: string, @Query('viewId') viewId: string, @Param('rowId') rowId: string, @@ -128,7 +129,7 @@ export class DataTableController { @Get(['/api/v2/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataList') async nestedDataList( - @Request() req, + @Req() req: Request, @Param('modelId') modelId: string, @Query('viewId') viewId: string, @Param('columnId') columnId: string, @@ -146,7 +147,7 @@ export class DataTableController { @Post(['/api/v2/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataLink') async nestedLink( - @Request() req, + @Req() req: Request, @Param('modelId') modelId: string, @Query('viewId') viewId: string, @Param('columnId') columnId: string, @@ -168,7 +169,7 @@ export class DataTableController { @Delete(['/api/v2/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataUnlink') async nestedUnlink( - @Request() req, + @Req() req: Request, @Param('modelId') modelId: string, @Query('viewId') viewId: string, @Param('columnId') columnId: string, diff --git a/packages/nocodb/src/controllers/datas.controller.ts b/packages/nocodb/src/controllers/datas.controller.ts index 4c55980dae..49c51a676c 100644 --- a/packages/nocodb/src/controllers/datas.controller.ts +++ b/packages/nocodb/src/controllers/datas.controller.ts @@ -7,9 +7,10 @@ import { Param, Patch, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { DatasService } from '~/services/datas.service'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; @@ -22,7 +23,7 @@ export class DatasController { @Get('/data/:viewId/') @Acl('dataList') - async dataList(@Request() req, @Param('viewId') viewId: string) { + async dataList(@Req() req: Request, @Param('viewId') viewId: string) { return await this.datasService.dataListByViewId({ viewId: viewId, query: req.query, @@ -32,7 +33,7 @@ export class DatasController { @Get('/data/:viewId/:rowId/mm/:colId') @Acl('mmList') async mmList( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('colId') colId: string, @Param('rowId') rowId: string, @@ -48,7 +49,7 @@ export class DatasController { @Get('/data/:viewId/:rowId/mm/:colId/exclude') @Acl('mmExcludedList') async mmExcludedList( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('colId') colId: string, @Param('rowId') rowId: string, @@ -64,7 +65,7 @@ export class DatasController { @Get('/data/:viewId/:rowId/hm/:colId/exclude') @Acl('hmExcludedList') async hmExcludedList( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('colId') colId: string, @Param('rowId') rowId: string, @@ -80,7 +81,7 @@ export class DatasController { @Get('/data/:viewId/:rowId/bt/:colId/exclude') @Acl('btExcludedList') async btExcludedList( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('colId') colId: string, @Param('rowId') rowId: string, @@ -96,7 +97,7 @@ export class DatasController { @Get('/data/:viewId/:rowId/hm/:colId') @Acl('hmList') async hmList( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('colId') colId: string, @Param('rowId') rowId: string, @@ -112,7 +113,7 @@ export class DatasController { @Get('/data/:viewId/:rowId') @Acl('dataRead') async dataRead( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('rowId') rowId: string, ) { @@ -127,7 +128,7 @@ export class DatasController { @HttpCode(200) @Acl('dataInsert') async dataInsert( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Body() body: any, ) { @@ -141,7 +142,7 @@ export class DatasController { @Patch('/data/:viewId/:rowId') @Acl('dataUpdate') async dataUpdate( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('rowId') rowId: string, @Body() body: any, @@ -157,7 +158,7 @@ export class DatasController { @Delete('/data/:viewId/:rowId') @Acl('dataDelete') async dataDelete( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('rowId') rowId: string, ) { @@ -171,7 +172,7 @@ export class DatasController { @Delete('/data/:viewId/:rowId/:relationType/:colId/:childId') @Acl('relationDataDelete') async relationDataDelete( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('rowId') rowId: string, @Param('relationType') relationType: string, @@ -193,7 +194,7 @@ export class DatasController { @HttpCode(200) @Acl('relationDataAdd') async relationDataAdd( - @Request() req, + @Req() req: Request, @Param('viewId') viewId: string, @Param('rowId') rowId: string, @Param('relationType') relationType: string, diff --git a/packages/nocodb/src/controllers/filters.controller.ts b/packages/nocodb/src/controllers/filters.controller.ts index 10ee4dba81..3de7aa9009 100644 --- a/packages/nocodb/src/controllers/filters.controller.ts +++ b/packages/nocodb/src/controllers/filters.controller.ts @@ -10,6 +10,7 @@ import { Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { FilterReqType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; @@ -44,7 +45,7 @@ export class FiltersController { async filterCreate( @Param('viewId') viewId: string, @Body() body: FilterReqType, - @Req() req, + @Req() req: Request, ) { const filter = await this.filtersService.filterCreate({ filter: body, @@ -64,7 +65,7 @@ export class FiltersController { async hookFilterCreate( @Param('hookId') hookId: string, @Body() body: FilterReqType, - @Req() req, + @Req() req: Request, ) { const filter = await this.filtersService.hookFilterCreate({ filter: body, @@ -102,7 +103,7 @@ export class FiltersController { async filterUpdate( @Param('filterId') filterId: string, @Body() body: FilterReqType, - @Req() req, + @Req() req: Request, ) { const filter = await this.filtersService.filterUpdate({ filterId: filterId, @@ -118,7 +119,7 @@ export class FiltersController { '/api/v2/meta/filters/:filterId', ]) @Acl('filterDelete') - async filterDelete(@Param('filterId') filterId: string, @Req() req) { + async filterDelete(@Param('filterId') filterId: string, @Req() req: Request) { const filter = await this.filtersService.filterDelete({ req, filterId, diff --git a/packages/nocodb/src/controllers/form-columns.controller.ts b/packages/nocodb/src/controllers/form-columns.controller.ts index 3273ec5642..8d412c86cf 100644 --- a/packages/nocodb/src/controllers/form-columns.controller.ts +++ b/packages/nocodb/src/controllers/form-columns.controller.ts @@ -3,9 +3,10 @@ import { Controller, Param, Patch, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { FormColumnsService } from '~/services/form-columns.service'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; @@ -27,7 +28,7 @@ export class FormColumnsController { @Param('formViewColumnId') formViewColumnId: string, @Body() formViewColumnbody: FormColumnUpdateReqType, - @Request() req: any, + @Req() req: Request, ) { return await this.formColumnsService.columnUpdate({ formViewColumnId, diff --git a/packages/nocodb/src/controllers/forms.controller.ts b/packages/nocodb/src/controllers/forms.controller.ts index 3589071b0a..7a6fd5369a 100644 --- a/packages/nocodb/src/controllers/forms.controller.ts +++ b/packages/nocodb/src/controllers/forms.controller.ts @@ -39,7 +39,7 @@ export class FormsController { async formViewCreate( @Param('tableId') tableId: string, @Body() body: ViewCreateReqType, - @Req() req: any, + @Req() req: Request, ) { const view = await this.formsService.formViewCreate({ body, @@ -57,7 +57,7 @@ export class FormsController { async formViewUpdate( @Param('formViewId') formViewId: string, @Body() body, - @Request() req: any, + @Req() req: Request, ) { return await this.formsService.formViewUpdate({ formViewId, diff --git a/packages/nocodb/src/controllers/galleries.controller.ts b/packages/nocodb/src/controllers/galleries.controller.ts index 42bceb5825..bcc8c96380 100644 --- a/packages/nocodb/src/controllers/galleries.controller.ts +++ b/packages/nocodb/src/controllers/galleries.controller.ts @@ -40,7 +40,7 @@ export class GalleriesController { async galleryViewCreate( @Param('tableId') tableId: string, @Body() body: ViewCreateReqType, - @Req() req: any, + @Req() req: Request, ) { return await this.galleriesService.galleryViewCreate({ gallery: body, @@ -60,7 +60,7 @@ export class GalleriesController { @Param('galleryViewId') galleryViewId: string, @Body() body: GalleryUpdateReqType, - @Req() req: any, + @Req() req: Request, ) { return await this.galleriesService.galleryViewUpdate({ galleryViewId, diff --git a/packages/nocodb/src/controllers/grid-columns.controller.ts b/packages/nocodb/src/controllers/grid-columns.controller.ts index b500a00da5..fe307a85ff 100644 --- a/packages/nocodb/src/controllers/grid-columns.controller.ts +++ b/packages/nocodb/src/controllers/grid-columns.controller.ts @@ -37,7 +37,7 @@ export class GridColumnsController { @Param('gridViewColumnId') gridViewColumnId: string, @Body() body: GridColumnReqType, - @Req() req: any, + @Req() req: Request, ) { return this.gridColumnsService.gridColumnUpdate({ gridViewColumnId, diff --git a/packages/nocodb/src/controllers/grids.controller.ts b/packages/nocodb/src/controllers/grids.controller.ts index 161f4754e3..8c819f7fc1 100644 --- a/packages/nocodb/src/controllers/grids.controller.ts +++ b/packages/nocodb/src/controllers/grids.controller.ts @@ -28,7 +28,7 @@ export class GridsController { async gridViewCreate( @Param('tableId') tableId: string, @Body() body: ViewCreateReqType, - @Req() req: any, + @Req() req: Request, ) { const view = await this.gridsService.gridViewCreate({ grid: body, @@ -42,7 +42,7 @@ export class GridsController { async gridViewUpdate( @Param('viewId') viewId: string, @Body() body, - @Req() req: any, + @Req() req: Request, ) { return await this.gridsService.gridViewUpdate({ viewId, diff --git a/packages/nocodb/src/controllers/hooks.controller.ts b/packages/nocodb/src/controllers/hooks.controller.ts index f153779b6c..1b578abbea 100644 --- a/packages/nocodb/src/controllers/hooks.controller.ts +++ b/packages/nocodb/src/controllers/hooks.controller.ts @@ -41,7 +41,7 @@ export class HooksController { async hookCreate( @Param('tableId') tableId: string, @Body() body: HookReqType, - @Request() req: any, + @Req() req: Request, ) { const hook = await this.hooksService.hookCreate({ hook: body, @@ -53,7 +53,7 @@ export class HooksController { @Delete(['/api/v1/db/meta/hooks/:hookId', '/api/v2/meta/hooks/:hookId']) @Acl('hookDelete') - async hookDelete(@Param('hookId') hookId: string, @Request() req: any) { + async hookDelete(@Param('hookId') hookId: string, @Req() req: Request) { return await this.hooksService.hookDelete({ hookId, req }); } @@ -62,7 +62,7 @@ export class HooksController { async hookUpdate( @Param('hookId') hookId: string, @Body() body: HookReqType, - @Request() req: any, + @Req() req: Request, ) { return await this.hooksService.hookUpdate({ hookId, hook: body, req }); } @@ -73,7 +73,7 @@ export class HooksController { ]) @HttpCode(200) @Acl('hookTest') - async hookTest(@Body() body: HookTestReqType, @Request() req: any) { + async hookTest(@Body() body: HookTestReqType, @Req() req: Request) { try { await this.hooksService.hookTest({ hookTest: { @@ -115,7 +115,7 @@ export class HooksController { '/api/v2/meta/hooks/:hookId/logs', ]) @Acl('hookLogList') - async hookLogList(@Param('hookId') hookId: string, @Request() req: any) { + async hookLogList(@Param('hookId') hookId: string, @Req() req: Request) { return new PagedResponseImpl( await this.hooksService.hookLogList({ query: req.query, diff --git a/packages/nocodb/src/controllers/kanbans.controller.ts b/packages/nocodb/src/controllers/kanbans.controller.ts index 0dce011a19..5641afa174 100644 --- a/packages/nocodb/src/controllers/kanbans.controller.ts +++ b/packages/nocodb/src/controllers/kanbans.controller.ts @@ -40,7 +40,7 @@ export class KanbansController { async kanbanViewCreate( @Param('tableId') tableId: string, @Body() body: ViewCreateReqType, - @Req() req: any, + @Req() req: Request, ) { return await this.kanbansService.kanbanViewCreate({ tableId, @@ -59,7 +59,7 @@ export class KanbansController { @Param('kanbanViewId') kanbanViewId: string, @Body() body, - @Req() req: any, + @Req() req: Request, ) { return await this.kanbansService.kanbanViewUpdate({ kanbanViewId, diff --git a/packages/nocodb/src/controllers/maps.controller.ts b/packages/nocodb/src/controllers/maps.controller.ts index 756d51bf0c..48c5bcfbde 100644 --- a/packages/nocodb/src/controllers/maps.controller.ts +++ b/packages/nocodb/src/controllers/maps.controller.ts @@ -35,7 +35,7 @@ export class MapsController { async mapViewCreate( @Param('tableId') tableId: string, @Body() body: ViewCreateReqType, - @Req() req: any, + @Req() req: Request, ) { const view = await this.mapsService.mapViewCreate({ tableId, @@ -52,7 +52,7 @@ export class MapsController { @Param('mapViewId') mapViewId: string, @Body() body: MapUpdateReqType, - @Req() req: any, + @Req() req: Request, ) { return await this.mapsService.mapViewUpdate({ mapViewId: mapViewId, diff --git a/packages/nocodb/src/controllers/model-visibilities.controller.ts b/packages/nocodb/src/controllers/model-visibilities.controller.ts index 99e5a76ceb..4e84697409 100644 --- a/packages/nocodb/src/controllers/model-visibilities.controller.ts +++ b/packages/nocodb/src/controllers/model-visibilities.controller.ts @@ -30,7 +30,7 @@ export class ModelVisibilitiesController { async xcVisibilityMetaSetAll( @Param('baseId') baseId: string, @Body() body: any, - @Req() req: any, + @Req() req: Request, ) { await this.modelVisibilitiesService.xcVisibilityMetaSetAll({ visibilityRule: body, diff --git a/packages/nocodb/src/controllers/notifications.controller.ts b/packages/nocodb/src/controllers/notifications.controller.ts index ae2adf0c37..c834bbc548 100644 --- a/packages/nocodb/src/controllers/notifications.controller.ts +++ b/packages/nocodb/src/controllers/notifications.controller.ts @@ -22,7 +22,7 @@ export class NotificationsController { @Get('/api/v1/notifications') // @Acl('notificationList') - async notificationList(@Request() req) { + async notificationList(@Req() req: Request) { return this.notificationsService.notificationList({ user: req.user, is_deleted: false, diff --git a/packages/nocodb/src/controllers/org-tokens.controller.ts b/packages/nocodb/src/controllers/org-tokens.controller.ts index 571df96ebf..44e3eaf730 100644 --- a/packages/nocodb/src/controllers/org-tokens.controller.ts +++ b/packages/nocodb/src/controllers/org-tokens.controller.ts @@ -30,7 +30,7 @@ export class OrgTokensController { scope: 'org', blockApiTokenAccess: true, }) - async apiTokenList(@Request() req) { + async apiTokenList(@Req() req: Request) { return await getConditionalHandler( this.orgTokensService.apiTokenList, this.orgTokensEeService.apiTokenListEE, diff --git a/packages/nocodb/src/controllers/org-users.controller.ts b/packages/nocodb/src/controllers/org-users.controller.ts index 58f5e70dcc..96eeae2672 100644 --- a/packages/nocodb/src/controllers/org-users.controller.ts +++ b/packages/nocodb/src/controllers/org-users.controller.ts @@ -29,7 +29,7 @@ export class OrgUsersController { allowedRoles: [OrgUserRoles.SUPER_ADMIN], blockApiTokenAccess: true, }) - async userList(@Request() req) { + async userList(@Req() req: Request) { return new PagedResponseImpl( await this.orgUsersService.userList({ query: req.query, diff --git a/packages/nocodb/src/controllers/plugins.controller.ts b/packages/nocodb/src/controllers/plugins.controller.ts index d25c34a1f5..aa7f7ba620 100644 --- a/packages/nocodb/src/controllers/plugins.controller.ts +++ b/packages/nocodb/src/controllers/plugins.controller.ts @@ -48,7 +48,7 @@ export class PluginsController { @Acl('pluginTest', { scope: 'org', }) - async pluginTest(@Body() body: any, @Req() req: any) { + async pluginTest(@Body() body: any, @Req() req: Request) { return await this.pluginsService.pluginTest({ body: body, req }); } @@ -70,7 +70,7 @@ export class PluginsController { async pluginUpdate( @Body() body: any, @Param('pluginId') pluginId: string, - @Req() req: any, + @Req() req: Request, ) { const plugin = await this.pluginsService.pluginUpdate({ pluginId: pluginId, diff --git a/packages/nocodb/src/controllers/public-datas.controller.ts b/packages/nocodb/src/controllers/public-datas.controller.ts index b17abc7e74..187e8ecbdd 100644 --- a/packages/nocodb/src/controllers/public-datas.controller.ts +++ b/packages/nocodb/src/controllers/public-datas.controller.ts @@ -4,10 +4,11 @@ import { HttpCode, Param, Post, - Request, + Req, UseGuards, UseInterceptors, } from '@nestjs/common'; +import { Request } from 'express'; import { AnyFilesInterceptor } from '@nestjs/platform-express'; import { PublicDatasService } from '~/services/public-datas.service'; import { PublicApiLimiterGuard } from '~/guards/public-api-limiter.guard'; @@ -22,7 +23,7 @@ export class PublicDatasController { '/api/v2/public/shared-view/:sharedViewUuid/rows', ]) async dataList( - @Request() req, + @Req() req: Request, @Param('sharedViewUuid') sharedViewUuid: string, ) { const pagedResponse = await this.publicDatasService.dataList({ @@ -38,7 +39,7 @@ export class PublicDatasController { '/api/v2/public/shared-view/:sharedViewUuid/groupby', ]) async dataGroupBy( - @Request() req, + @Req() req: Request, @Param('sharedViewUuid') sharedViewUuid: string, ) { return await this.publicDatasService.dataGroupBy({ @@ -53,7 +54,7 @@ export class PublicDatasController { '/api/v2/public/shared-view/:sharedViewUuid/group/:columnId', ]) async groupedDataList( - @Request() req, + @Req() req: Request, @Param('sharedViewUuid') sharedViewUuid: string, @Param('columnId') columnId: string, ) { @@ -73,7 +74,7 @@ export class PublicDatasController { @HttpCode(200) @UseInterceptors(AnyFilesInterceptor()) async dataInsert( - @Request() req, + @Req() req: Request, @Param('sharedViewUuid') sharedViewUuid: string, ) { const insertResult = await this.publicDatasService.dataInsert({ @@ -81,7 +82,7 @@ export class PublicDatasController { password: req.headers?.['xc-password'] as string, body: req.body?.data, siteUrl: (req as any).ncSiteUrl, - files: req.files, + files: req.files as any[], }); return insertResult; @@ -92,7 +93,7 @@ export class PublicDatasController { '/api/v2/public/shared-view/:sharedViewUuid/nested/:columnId', ]) async relDataList( - @Request() req, + @Req() req: Request, @Param('sharedViewUuid') sharedViewUuid: string, @Param('columnId') columnId: string, ) { @@ -111,7 +112,7 @@ export class PublicDatasController { '/api/v2/public/shared-view/:sharedViewUuid/rows/:rowId/mm/:columnId', ]) async publicMmList( - @Request() req, + @Req() req: Request, @Param('sharedViewUuid') sharedViewUuid: string, @Param('rowId') rowId: string, @Param('columnId') columnId: string, @@ -131,7 +132,7 @@ export class PublicDatasController { '/api/v2/public/shared-view/:sharedViewUuid/rows/:rowId/hm/:columnId', ]) async publicHmList( - @Request() req, + @Req() req: Request, @Param('sharedViewUuid') sharedViewUuid: string, @Param('rowId') rowId: string, @Param('columnId') columnId: string, diff --git a/packages/nocodb/src/controllers/public-metas.controller.ts b/packages/nocodb/src/controllers/public-metas.controller.ts index 1aab81d353..f1861c7ae1 100644 --- a/packages/nocodb/src/controllers/public-metas.controller.ts +++ b/packages/nocodb/src/controllers/public-metas.controller.ts @@ -12,7 +12,7 @@ export class PublicMetasController { '/api/v2/public/shared-view/:sharedViewUuid/meta', ]) async viewMetaGet( - @Request() req, + @Req() req: Request, @Param('sharedViewUuid') sharedViewUuid: string, ) { return await this.publicMetasService.viewMetaGet({ diff --git a/packages/nocodb/src/controllers/shared-bases.controller.ts b/packages/nocodb/src/controllers/shared-bases.controller.ts index e6e5ff347d..52c2304d3b 100644 --- a/packages/nocodb/src/controllers/shared-bases.controller.ts +++ b/packages/nocodb/src/controllers/shared-bases.controller.ts @@ -70,7 +70,7 @@ export class SharedBasesController { @Acl('disableSharedBaseLink') async disableSharedBaseLink( @Param('baseId') baseId: string, - @Request() req: any, + @Req() req: Request, ): Promise { const sharedBase = await this.sharedBasesService.disableSharedBaseLink({ baseId, diff --git a/packages/nocodb/src/controllers/sorts.controller.ts b/packages/nocodb/src/controllers/sorts.controller.ts index 3daf7f65ac..6311b7416c 100644 --- a/packages/nocodb/src/controllers/sorts.controller.ts +++ b/packages/nocodb/src/controllers/sorts.controller.ts @@ -44,7 +44,7 @@ export class SortsController { async sortCreate( @Param('viewId') viewId: string, @Body() body: SortReqType, - @Req() req, + @Req() req: Request, ) { const sort = await this.sortsService.sortCreate({ sort: body, @@ -68,7 +68,7 @@ export class SortsController { async sortUpdate( @Param('sortId') sortId: string, @Body() body: SortReqType, - @Req() req, + @Req() req: Request, ) { const sort = await this.sortsService.sortUpdate({ sortId, @@ -80,7 +80,7 @@ export class SortsController { @Delete(['/api/v1/db/meta/sorts/:sortId', '/api/v2/meta/sorts/:sortId']) @Acl('sortDelete') - async sortDelete(@Param('sortId') sortId: string, @Req() req) { + async sortDelete(@Param('sortId') sortId: string, @Req() req: Request) { const sort = await this.sortsService.sortDelete({ sortId, req, diff --git a/packages/nocodb/src/controllers/sources.controller.ts b/packages/nocodb/src/controllers/sources.controller.ts index 5e85d10e00..6413e7be3b 100644 --- a/packages/nocodb/src/controllers/sources.controller.ts +++ b/packages/nocodb/src/controllers/sources.controller.ts @@ -4,9 +4,10 @@ import { Get, Param, Patch, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { BaseReqType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; @@ -45,7 +46,7 @@ export class SourcesController { @Param('sourceId') sourceId: string, @Param('baseId') baseId: string, @Body() body: BaseReqType, - @Request() req: any, + @Req() req: Request, ) { const source = await this.sourcesService.baseUpdate({ sourceId, diff --git a/packages/nocodb/src/controllers/sync.controller.ts b/packages/nocodb/src/controllers/sync.controller.ts index 0af1908e94..6885e09dd4 100644 --- a/packages/nocodb/src/controllers/sync.controller.ts +++ b/packages/nocodb/src/controllers/sync.controller.ts @@ -48,7 +48,7 @@ export class SyncController { async syncCreate( @Param('baseId') baseId: string, @Body() body: any, - @Req() req, + @Req() req: Request, @Param('sourceId') sourceId?: string, ) { return await this.syncService.syncCreate({ @@ -62,7 +62,7 @@ export class SyncController { @Delete(['/api/v1/db/meta/syncs/:syncId', '/api/v2/meta/syncs/:syncId']) @Acl('syncSourceDelete') - async syncDelete(@Param('syncId') syncId: string, @Req() req: any) { + async syncDelete(@Param('syncId') syncId: string, @Req() req: Request) { return await this.syncService.syncDelete({ syncId: syncId, req, @@ -74,7 +74,7 @@ export class SyncController { async syncUpdate( @Param('syncId') syncId: string, @Body() body: any, - @Req() req: any, + @Req() req: Request, ) { return await this.syncService.syncUpdate({ syncId: syncId, diff --git a/packages/nocodb/src/controllers/utils.controller.ts b/packages/nocodb/src/controllers/utils.controller.ts index 5530f9bd9e..e430fb459f 100644 --- a/packages/nocodb/src/controllers/utils.controller.ts +++ b/packages/nocodb/src/controllers/utils.controller.ts @@ -63,7 +63,7 @@ export class UtilsController { '/api/v2/meta/nocodb/info', '/api/v1/meta/nocodb/info', ]) - async appInfo(@Request() req) { + async appInfo(@Req() req: Request) { return await this.utilsService.appInfo({ req: { ncSiteUrl: (req as any).ncSiteUrl, diff --git a/packages/nocodb/src/controllers/view-columns.controller.ts b/packages/nocodb/src/controllers/view-columns.controller.ts index ae1d897a83..95b1de089c 100644 --- a/packages/nocodb/src/controllers/view-columns.controller.ts +++ b/packages/nocodb/src/controllers/view-columns.controller.ts @@ -43,7 +43,7 @@ export class ViewColumnsController { async columnAdd( @Param('viewId') viewId: string, @Body() body: ViewColumnReqType, - @Req() req: any, + @Req() req: Request, ) { const viewColumn = await this.viewColumnsService.columnAdd({ viewId, @@ -62,7 +62,7 @@ export class ViewColumnsController { @Param('viewId') viewId: string, @Param('columnId') columnId: string, @Body() body: ViewColumnReqType, - @Req() req: any, + @Req() req: Request, ) { const result = await this.viewColumnsService.columnUpdate({ viewId, diff --git a/packages/nocodb/src/controllers/views.controller.ts b/packages/nocodb/src/controllers/views.controller.ts index 8ff49f5fb6..2a12dc9661 100644 --- a/packages/nocodb/src/controllers/views.controller.ts +++ b/packages/nocodb/src/controllers/views.controller.ts @@ -28,7 +28,7 @@ export class ViewsController { '/api/v2/meta/tables/:tableId/views', ]) @Acl('viewList') - async viewList(@Param('tableId') tableId: string, @Request() req) { + async viewList(@Param('tableId') tableId: string, @Req() req: Request) { return new PagedResponseImpl( await this.viewsService.viewList({ tableId, @@ -42,7 +42,7 @@ export class ViewsController { async viewUpdate( @Param('viewId') viewId: string, @Body() body: ViewUpdateReqType, - @Request() req, + @Req() req: Request, ) { const result = await this.viewsService.viewUpdate({ viewId, @@ -55,7 +55,7 @@ export class ViewsController { @Delete(['/api/v1/db/meta/views/:viewId', '/api/v2/meta/views/:viewId']) @Acl('viewDelete') - async viewDelete(@Param('viewId') viewId: string, @Request() req) { + async viewDelete(@Param('viewId') viewId: string, @Req() req: Request) { const result = await this.viewsService.viewDelete({ viewId, user: req.user, diff --git a/packages/nocodb/src/interface/config.ts b/packages/nocodb/src/interface/config.ts index 6b10a0382e..7ec3024000 100644 --- a/packages/nocodb/src/interface/config.ts +++ b/packages/nocodb/src/interface/config.ts @@ -1,3 +1,4 @@ +import type { ReqId } from 'pino-http'; import type { Handler } from 'express'; import type * as e from 'express'; import type { Knex } from 'knex'; @@ -319,3 +320,11 @@ export interface AppConfig { mainSubDomain: string; dashboardPath: string; } + +export interface NcRequest { + id?: ReqId; + user?: Record; + ncWorkspaceId?: string; + ncProjectId?: string; + headers?: Record | IncomingHttpHeaders; +} diff --git a/packages/nocodb/src/modules/jobs/jobs.controller.ts b/packages/nocodb/src/modules/jobs/jobs.controller.ts index f5a2cdeb4c..d83291a125 100644 --- a/packages/nocodb/src/modules/jobs/jobs.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs.controller.ts @@ -47,7 +47,7 @@ export class JobsController implements OnModuleInit { @HttpCode(200) async listen( @Response() res, - @Request() req, + @Req() req: Request, @Body() body: { _mid: number; data: { id: string } }, ) { const { _mid = 0, data } = body; diff --git a/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts b/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts index 4f66681f82..b1a2427ae0 100644 --- a/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts @@ -24,7 +24,7 @@ export class AtImportController { ]) @Acl('airtableImport') @HttpCode(200) - async triggerSync(@Request() req) { + async triggerSync(@Req() req: Request) { const jobs = await this.jobsService.jobList(); const fnd = jobs.find((j) => j.data.syncId === req.params.syncId); diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts index 561e51da7e..9354ce40e3 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts @@ -34,7 +34,7 @@ export class DuplicateController { scope: 'org', }) public async duplicateSharedBase( - @Request() req, + @Req() req: Request, @Param('workspaceId') _workspaceId: string, @Param('sharedBaseId') sharedBaseId: string, @Body() @@ -101,7 +101,7 @@ export class DuplicateController { @HttpCode(200) @Acl('duplicateBase') async duplicateBase( - @Request() req, + @Req() req: Request, @Param('baseId') baseId: string, @Param('sourceId') sourceId?: string, @Body() @@ -168,7 +168,7 @@ export class DuplicateController { @HttpCode(200) @Acl('duplicateModel') async duplicateModel( - @Request() req, + @Req() req: Request, @Param('baseId') baseId: string, @Param('modelId') modelId?: string, @Body() diff --git a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts index be11af5efa..3319454bc3 100644 --- a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts @@ -24,7 +24,7 @@ export class MetaSyncController { ]) @HttpCode(200) @Acl('metaDiffSync') - async metaDiffSync(@Param('baseId') baseId: string, @Request() req) { + async metaDiffSync(@Param('baseId') baseId: string, @Req() req: Request) { const jobs = await this.jobsService.jobList(); const fnd = jobs.find( (j) => j.name === JobTypes.MetaSync && j.data.baseId === baseId, @@ -57,7 +57,7 @@ export class MetaSyncController { async baseMetaDiffSync( @Param('baseId') baseId: string, @Param('sourceId') sourceId: string, - @Request() req, + @Req() req: Request, ) { const jobs = await this.jobsService.jobList(); const fnd = jobs.find( diff --git a/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts b/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts index ac81599c1c..7da4ec1787 100644 --- a/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts @@ -29,7 +29,7 @@ export class SourceCreateController { async baseCreate( @Param('baseId') baseId: string, @Body() body: BaseReqType, - @Req() req, + @Req() req: Request, ) { const jobs = await this.jobsService.jobList(); const fnd = jobs.find( diff --git a/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts b/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts index e5a0e61f99..6780edac03 100644 --- a/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts @@ -26,7 +26,7 @@ export class SourceDeleteController { '/api/v2/meta/bases/:baseId/sources/:sourceId', ]) @Acl('baseDelete') - async baseDelete(@Param('sourceId') sourceId: string, @Req() req) { + async baseDelete(@Param('sourceId') sourceId: string, @Req() req: Request) { const jobs = await this.jobsService.jobList(); const fnd = jobs.find( (j) => j.name === JobTypes.BaseDelete && j.data.sourceId === sourceId, diff --git a/packages/nocodb/src/types/express.d.ts b/packages/nocodb/src/types/express.d.ts new file mode 100644 index 0000000000..58da809cdd --- /dev/null +++ b/packages/nocodb/src/types/express.d.ts @@ -0,0 +1,26 @@ +import * as express from 'express'; +import { Express } from 'express-serve-static-core'; + +// declare global { +// namespace Express { +// interface Request { +// id?: string; +// ncWorkspaceId?: string; +// ncProjectId?: string; +// user?: any; +// } +// } +// } +// +// interface TokenData { +// userId: string; +// iat: string; +// } +declare module 'express-serve-static-core' { + interface Request { + // id?: string; + // ncWorkspaceId?: string; + // ncProjectId?: string; + user: any; + } +} diff --git a/packages/nocodb/tsconfig.json b/packages/nocodb/tsconfig.json index c9121c8022..7e2cd8aa22 100644 --- a/packages/nocodb/tsconfig.json +++ b/packages/nocodb/tsconfig.json @@ -26,6 +26,7 @@ "src/*": ["./src/*"], "~/*": ["./src/*"], "@/*": ["./src/*"] - } + }, + "typeRoots": ["./src/types","./node_modules/@types", ] } } From 256a88118d9582bf987261945fe2d19539188a14 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 8 Nov 2023 04:37:20 +0000 Subject: [PATCH 2/5] refactor: proper request type in controllers --- .../src/controllers/auth/auth.controller.ts | 19 ++++++++++--------- .../src/controllers/forms.controller.ts | 2 +- .../src/controllers/galleries.controller.ts | 1 + .../src/controllers/hooks.controller.ts | 3 ++- .../src/controllers/kanbans.controller.ts | 1 + .../nocodb/src/controllers/maps.controller.ts | 1 + .../controllers/notifications.controller.ts | 9 +++++---- .../src/controllers/org-tokens.controller.ts | 7 ++++--- .../src/controllers/org-users.controller.ts | 9 +++++---- .../controllers/public-metas.controller.ts | 3 ++- .../controllers/shared-bases.controller.ts | 9 +++++---- .../src/controllers/utils.controller.ts | 5 +++-- .../src/controllers/views.controller.ts | 9 +++++---- .../src/modules/jobs/jobs.controller.ts | 9 +++++---- .../jobs/at-import/at-import.controller.ts | 5 +++-- .../export-import/duplicate.controller.ts | 3 ++- .../jobs/meta-sync/meta-sync.controller.ts | 3 ++- .../source-delete/source-delete.controller.ts | 1 + packages/nocodb/src/types/express.d.ts | 7 ++++--- 19 files changed, 62 insertions(+), 44 deletions(-) diff --git a/packages/nocodb/src/controllers/auth/auth.controller.ts b/packages/nocodb/src/controllers/auth/auth.controller.ts index c7780cf61f..d21fe8efe7 100644 --- a/packages/nocodb/src/controllers/auth/auth.controller.ts +++ b/packages/nocodb/src/controllers/auth/auth.controller.ts @@ -5,10 +5,11 @@ import { HttpCode, Param, Post, - Request, - Response, + Req, + Res, UseGuards, } from '@nestjs/common'; +import { Request, Response } from 'express'; import { AuthGuard } from '@nestjs/passport'; import { ConfigService } from '@nestjs/config'; import { extractRolesObj } from 'nocodb-sdk'; @@ -41,7 +42,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) - async signup(@Req() req: Request, @Response() res: any): Promise { + async signup(@Req() req: Request, @Res() res:Response): Promise { if (this.config.get('auth', { infer: true }).disableEmailAuth) { NcError.forbidden('Email authentication is disabled'); } @@ -61,7 +62,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) - async refreshToken(@Req() req: Request, @Response() res: any): Promise { + async refreshToken(@Req() req: Request, @Res() res:Response): Promise { res.json( await this.usersService.refreshToken({ body: req.body, @@ -78,7 +79,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard, AuthGuard('local')) @HttpCode(200) - async signin(@Request() req, @Response() res) { + async signin(@Req() req:Request, @Res() res:Response) { if (this.config.get('auth', { infer: true }).disableEmailAuth) { NcError.forbidden('Email authentication is disabled'); } @@ -89,7 +90,7 @@ export class AuthController { @UseGuards(GlobalGuard) @Post('/api/v1/auth/user/signout') @HttpCode(200) - async signOut(@Request() req, @Response() res): Promise { + async signOut(@Req() req:Request, @Res() res:Response): Promise { if (!(req as any).isAuthenticated()) { NcError.forbidden('Not allowed'); } @@ -104,7 +105,7 @@ export class AuthController { @Post(`/auth/google/genTokenByCode`) @HttpCode(200) @UseGuards(PublicApiLimiterGuard, AuthGuard('google')) - async googleSignin(@Request() req, @Response() res) { + async googleSignin(@Req() req:Request, @Res() res:Response) { await this.setRefreshToken({ req, res }); res.json(await this.usersService.login(req.user, req)); } @@ -117,7 +118,7 @@ export class AuthController { @Get(['/auth/user/me', '/api/v1/db/auth/user/me', '/api/v1/auth/user/me']) @UseGuards(MetaApiLimiterGuard, GlobalGuard) - async me(@Request() req) { + async me(@Req() req:Request) { const user = { ...req.user, roles: extractRolesObj(req.user.roles), @@ -228,7 +229,7 @@ export class AuthController { @UseGuards(PublicApiLimiterGuard) async renderPasswordReset( @Req() req: Request, - @Response() res: any, + @Res() res:Response, @Param('tokenId') tokenId: string, ): Promise { try { diff --git a/packages/nocodb/src/controllers/forms.controller.ts b/packages/nocodb/src/controllers/forms.controller.ts index 7a6fd5369a..bbf2d65cdd 100644 --- a/packages/nocodb/src/controllers/forms.controller.ts +++ b/packages/nocodb/src/controllers/forms.controller.ts @@ -7,9 +7,9 @@ import { Patch, Post, Req, - Request, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { ViewCreateReqType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { FormsService } from '~/services/forms.service'; diff --git a/packages/nocodb/src/controllers/galleries.controller.ts b/packages/nocodb/src/controllers/galleries.controller.ts index bcc8c96380..c9440b3cfe 100644 --- a/packages/nocodb/src/controllers/galleries.controller.ts +++ b/packages/nocodb/src/controllers/galleries.controller.ts @@ -9,6 +9,7 @@ import { Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GalleryUpdateReqType, ViewCreateReqType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { GalleriesService } from '~/services/galleries.service'; diff --git a/packages/nocodb/src/controllers/hooks.controller.ts b/packages/nocodb/src/controllers/hooks.controller.ts index 1b578abbea..ef3e951d4a 100644 --- a/packages/nocodb/src/controllers/hooks.controller.ts +++ b/packages/nocodb/src/controllers/hooks.controller.ts @@ -7,9 +7,10 @@ import { Param, Patch, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { HookReqType, HookTestReqType } from 'nocodb-sdk'; import type { HookType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; diff --git a/packages/nocodb/src/controllers/kanbans.controller.ts b/packages/nocodb/src/controllers/kanbans.controller.ts index 5641afa174..656bf59905 100644 --- a/packages/nocodb/src/controllers/kanbans.controller.ts +++ b/packages/nocodb/src/controllers/kanbans.controller.ts @@ -9,6 +9,7 @@ import { Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { ViewCreateReqType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { KanbansService } from '~/services/kanbans.service'; diff --git a/packages/nocodb/src/controllers/maps.controller.ts b/packages/nocodb/src/controllers/maps.controller.ts index 48c5bcfbde..7131125e89 100644 --- a/packages/nocodb/src/controllers/maps.controller.ts +++ b/packages/nocodb/src/controllers/maps.controller.ts @@ -9,6 +9,7 @@ import { Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { MapUpdateReqType, ViewCreateReqType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { MapsService } from '~/services/maps.service'; diff --git a/packages/nocodb/src/controllers/notifications.controller.ts b/packages/nocodb/src/controllers/notifications.controller.ts index c834bbc548..24c1d5addb 100644 --- a/packages/nocodb/src/controllers/notifications.controller.ts +++ b/packages/nocodb/src/controllers/notifications.controller.ts @@ -7,9 +7,10 @@ import { Param, Patch, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { NotificationsService } from '~/services/notifications.service'; import { GlobalGuard } from '~/guards/global/global.guard'; import { extractProps } from '~/helpers/extractProps'; @@ -36,7 +37,7 @@ export class NotificationsController { async notificationUpdate( @Param('notificationId') notificationId, @Body() body, - @Request() req, + @Req() req:Request, ) { return this.notificationsService.notificationUpdate({ notificationId, @@ -47,7 +48,7 @@ export class NotificationsController { @Post('/api/v1/notifications/mark-all-read') @HttpCode(200) - async markAllRead(@Request() req) { + async markAllRead(@Req() req:Request) { return this.notificationsService.markAllRead({ user: req.user, }); @@ -57,7 +58,7 @@ export class NotificationsController { // @Acl('notificationDelete') async notificationDelete( @Param('notificationId') notificationId, - @Request() req, + @Req() req:Request, ) { return this.notificationsService.notificationUpdate({ notificationId, diff --git a/packages/nocodb/src/controllers/org-tokens.controller.ts b/packages/nocodb/src/controllers/org-tokens.controller.ts index 44e3eaf730..6654de192a 100644 --- a/packages/nocodb/src/controllers/org-tokens.controller.ts +++ b/packages/nocodb/src/controllers/org-tokens.controller.ts @@ -6,9 +6,10 @@ import { HttpCode, Param, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { ApiTokenReqType } from 'nocodb-sdk'; import { AuthGuard } from '@nestjs/passport'; import { getConditionalHandler } from '~/helpers/getHandler'; @@ -46,7 +47,7 @@ export class OrgTokensController { scope: 'org', blockApiTokenAccess: true, }) - async apiTokenCreate(@Request() req, @Body() body: ApiTokenReqType) { + async apiTokenCreate(@Req() req:Request, @Body() body: ApiTokenReqType) { return await this.orgTokensService.apiTokenCreate({ apiToken: body, user: req['user'], @@ -60,7 +61,7 @@ export class OrgTokensController { // allowedRoles: [OrgUserRoles.SUPER], blockApiTokenAccess: true, }) - async apiTokenDelete(@Request() req, @Param('token') token: string) { + async apiTokenDelete(@Req() req:Request, @Param('token') token: string) { await this.orgTokensService.apiTokenDelete({ token, user: req['user'], diff --git a/packages/nocodb/src/controllers/org-users.controller.ts b/packages/nocodb/src/controllers/org-users.controller.ts index 96eeae2672..f7410f4039 100644 --- a/packages/nocodb/src/controllers/org-users.controller.ts +++ b/packages/nocodb/src/controllers/org-users.controller.ts @@ -7,9 +7,10 @@ import { Param, Patch, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { OrgUserRoles } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; @@ -75,7 +76,7 @@ export class OrgUsersController { allowedRoles: [OrgUserRoles.SUPER_ADMIN], blockApiTokenAccess: true, }) - async userAdd(@Body() body, @Request() req) { + async userAdd(@Body() body, @Req() req: Request) { const result = await this.orgUsersService.userAdd({ user: req.body, req, @@ -104,7 +105,7 @@ export class OrgUsersController { blockApiTokenAccess: true, }) async userInviteResend( - @Request() req, + @Req() req: Request, @Param('userId') userId: string, ): Promise { await this.orgUsersService.userInviteResend({ @@ -122,7 +123,7 @@ export class OrgUsersController { allowedRoles: [OrgUserRoles.SUPER_ADMIN], blockApiTokenAccess: true, }) - async generateResetUrl(@Request() req, @Param('userId') userId: string) { + async generateResetUrl(@Req() req: Request, @Param('userId') userId: string) { const result = await this.orgUsersService.generateResetUrl({ siteUrl: req.ncSiteUrl, userId, diff --git a/packages/nocodb/src/controllers/public-metas.controller.ts b/packages/nocodb/src/controllers/public-metas.controller.ts index f1861c7ae1..f9bf2b67e5 100644 --- a/packages/nocodb/src/controllers/public-metas.controller.ts +++ b/packages/nocodb/src/controllers/public-metas.controller.ts @@ -1,4 +1,5 @@ -import { Controller, Get, Param, Request, UseGuards } from '@nestjs/common'; +import { Controller, Get, Param, Req, UseGuards } from '@nestjs/common'; +import { Request } from 'express'; import { PublicMetasService } from '~/services/public-metas.service'; import { PublicApiLimiterGuard } from '~/guards/public-api-limiter.guard'; diff --git a/packages/nocodb/src/controllers/shared-bases.controller.ts b/packages/nocodb/src/controllers/shared-bases.controller.ts index 52c2304d3b..5d8f73b377 100644 --- a/packages/nocodb/src/controllers/shared-bases.controller.ts +++ b/packages/nocodb/src/controllers/shared-bases.controller.ts @@ -7,9 +7,10 @@ import { Param, Patch, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { SharedBasesService } from '~/services/shared-bases.service'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; @@ -27,7 +28,7 @@ export class SharedBasesController { @HttpCode(200) @Acl('createSharedBaseLink') async createSharedBaseLink( - @Request() req, + @Req() req:Request, @Body() body: any, @Param('baseId') baseId: string, ): Promise { @@ -48,7 +49,7 @@ export class SharedBasesController { ]) @Acl('updateSharedBaseLink') async updateSharedBaseLink( - @Request() req, + @Req() req:Request, @Body() body: any, @Param('baseId') baseId: string, ): Promise { @@ -86,7 +87,7 @@ export class SharedBasesController { ]) @Acl('getSharedBaseLink') async getSharedBaseLink( - @Request() req, + @Req() req:Request, @Param('baseId') baseId: string, ): Promise { const sharedBase = await this.sharedBasesService.getSharedBaseLink({ diff --git a/packages/nocodb/src/controllers/utils.controller.ts b/packages/nocodb/src/controllers/utils.controller.ts index e430fb459f..8725b0af18 100644 --- a/packages/nocodb/src/controllers/utils.controller.ts +++ b/packages/nocodb/src/controllers/utils.controller.ts @@ -6,9 +6,10 @@ import { Get, HttpCode, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { UtilsService } from '~/services/utils.service'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; @@ -48,7 +49,7 @@ export class UtilsController { scope: 'org', }) @HttpCode(200) - async testConnection(@Body() body: any, @Request() _req: any) { + async testConnection(@Body() body: any, @Req() _req: Request) { body.pool = { min: 0, max: 1, diff --git a/packages/nocodb/src/controllers/views.controller.ts b/packages/nocodb/src/controllers/views.controller.ts index 2a12dc9661..3f5213ef7c 100644 --- a/packages/nocodb/src/controllers/views.controller.ts +++ b/packages/nocodb/src/controllers/views.controller.ts @@ -8,9 +8,10 @@ import { Patch, Post, Query, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { ViewUpdateReqType } from 'nocodb-sdk'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { GlobalGuard } from '~/guards/global/global.guard'; @@ -101,7 +102,7 @@ export class ViewsController { ]) @HttpCode(200) @Acl('shareView') - async shareView(@Param('viewId') viewId: string, @Request() req) { + async shareView(@Param('viewId') viewId: string, @Req() req:Request) { return await this.viewsService.shareView({ viewId, user: req.user, req }); } @@ -126,7 +127,7 @@ export class ViewsController { async shareViewUpdate( @Param('viewId') viewId: string, @Body() body: ViewUpdateReqType, - @Request() req, + @Req() req:Request, ) { return await this.viewsService.shareViewUpdate({ viewId, @@ -141,7 +142,7 @@ export class ViewsController { '/api/v2/meta/views/:viewId/share', ]) @Acl('shareViewDelete') - async shareViewDelete(@Param('viewId') viewId: string, @Request() req) { + async shareViewDelete(@Param('viewId') viewId: string, @Req() req:Request) { return await this.viewsService.shareViewDelete({ viewId, user: req.user, diff --git a/packages/nocodb/src/modules/jobs/jobs.controller.ts b/packages/nocodb/src/modules/jobs/jobs.controller.ts index d83291a125..8fc4992d3c 100644 --- a/packages/nocodb/src/modules/jobs/jobs.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs.controller.ts @@ -4,10 +4,11 @@ import { HttpCode, Inject, Post, - Request, - Response, + Req, + Res, UseGuards, } from '@nestjs/common'; +import { Request, Response } from 'express'; import { OnEvent } from '@nestjs/event-emitter'; import { customAlphabet } from 'nanoid'; import { ModuleRef } from '@nestjs/core'; @@ -46,7 +47,7 @@ export class JobsController implements OnModuleInit { @Post('/jobs/listen') @HttpCode(200) async listen( - @Response() res, + @Res() res:Response &{resId?:string}, @Req() req: Request, @Body() body: { _mid: number; data: { id: string } }, ) { @@ -134,7 +135,7 @@ export class JobsController implements OnModuleInit { res.on('close', () => { if (jobId && this.jobRooms[jobId]?.listeners) { this.jobRooms[jobId].listeners = this.jobRooms[jobId].listeners.filter( - (r) => r.resId !== res.resId, + (r) => r.resId !== (res as any).resId, ); } }); diff --git a/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts b/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts index b1a2427ae0..129a75036a 100644 --- a/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts @@ -3,9 +3,10 @@ import { HttpCode, Inject, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; import { SyncSource } from '~/models'; @@ -69,7 +70,7 @@ export class AtImportController { ]) @Acl('airtableImport') @HttpCode(200) - async abortImport(@Request() _) { + async abortImport() { return {}; } } diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts index 9354ce40e3..7266b320b7 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts @@ -5,9 +5,10 @@ import { Inject, Param, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { ProjectStatus } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; diff --git a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts index 3319454bc3..061cab7467 100644 --- a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts @@ -4,9 +4,10 @@ import { Inject, Param, Post, - Request, + Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; import { NcError } from '~/helpers/catchError'; diff --git a/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts b/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts index 6780edac03..09bfd00c7e 100644 --- a/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts @@ -6,6 +6,7 @@ import { Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; import { NcError } from '~/helpers/catchError'; diff --git a/packages/nocodb/src/types/express.d.ts b/packages/nocodb/src/types/express.d.ts index 58da809cdd..10f041fa6f 100644 --- a/packages/nocodb/src/types/express.d.ts +++ b/packages/nocodb/src/types/express.d.ts @@ -18,9 +18,10 @@ import { Express } from 'express-serve-static-core'; // } declare module 'express-serve-static-core' { interface Request { - // id?: string; - // ncWorkspaceId?: string; - // ncProjectId?: string; + ncWorkspaceId?: string; + ncProjectId?: string; user: any; + ncSiteUrl: string; + clientIp: string; } } From d61424c3e6617bee78a6f86944f7e86f3007318b Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 8 Nov 2023 04:37:20 +0000 Subject: [PATCH 3/5] refactor: proper custom request type in service and other files --- packages/nocodb/src/guards/global/global.guard.ts | 3 ++- packages/nocodb/src/helpers/catchError.ts | 5 +++-- packages/nocodb/src/interface/config.ts | 5 ++++- .../jobs/jobs/export-import/import.service.ts | 7 ++++--- .../jobs/jobs/meta-sync/meta-sync.processor.ts | 3 ++- .../nocodb/src/services/api-tokens.service.ts | 5 +++-- .../nocodb/src/services/app-hooks/interfaces.ts | 2 +- .../nocodb/src/services/attachments.service.ts | 5 +++-- .../src/services/base-users/base-users.service.ts | 3 ++- packages/nocodb/src/services/bases.service.ts | 11 ++++++----- packages/nocodb/src/services/columns.service.ts | 5 +++-- packages/nocodb/src/services/filters.service.ts | 9 +++++---- .../nocodb/src/services/form-columns.service.ts | 3 ++- packages/nocodb/src/services/forms.service.ts | 5 +++-- packages/nocodb/src/services/galleries.service.ts | 5 +++-- .../nocodb/src/services/grid-columns.service.ts | 3 ++- packages/nocodb/src/services/grids.service.ts | 5 +++-- packages/nocodb/src/services/hooks.service.ts | 9 +++++---- packages/nocodb/src/services/kanbans.service.ts | 5 +++-- packages/nocodb/src/services/maps.service.ts | 5 +++-- .../src/services/model-visibilities.service.ts | 3 ++- .../nocodb/src/services/notifications.service.ts | 3 ++- .../nocodb/src/services/org-tokens.service.ts | 5 +++-- packages/nocodb/src/services/org-users.service.ts | 5 +++-- packages/nocodb/src/services/plugins.service.ts | 5 +++-- .../nocodb/src/services/shared-bases.service.ts | 8 ++++---- packages/nocodb/src/services/sorts.service.ts | 7 ++++--- packages/nocodb/src/services/sources.service.ts | 7 ++++--- packages/nocodb/src/services/sync.service.ts | 7 ++++--- packages/nocodb/src/services/tables.service.ts | 3 ++- .../nocodb/src/services/users/users.service.ts | 11 ++++++----- .../nocodb/src/services/view-columns.service.ts | 5 +++-- packages/nocodb/src/services/views.service.ts | 15 ++++++++------- .../authtoken.strategy/authtoken.strategy.ts | 3 ++- .../base-view.strategy/base-view.strategy.ts | 4 +++- .../strategies/google.strategy/google.strategy.ts | 5 +++-- packages/nocodb/src/types/express.d.ts | 8 +++++++- 37 files changed, 125 insertions(+), 82 deletions(-) diff --git a/packages/nocodb/src/guards/global/global.guard.ts b/packages/nocodb/src/guards/global/global.guard.ts index c0dc6e8ce2..f0ccf8874d 100644 --- a/packages/nocodb/src/guards/global/global.guard.ts +++ b/packages/nocodb/src/guards/global/global.guard.ts @@ -4,6 +4,7 @@ import { lastValueFrom, Observable } from 'rxjs'; import { extractRolesObj } from 'nocodb-sdk'; import type { ExecutionContext } from '@nestjs/common'; import { JwtStrategy } from '~/strategies/jwt.strategy'; +import {Request} from 'express' @Injectable() export class GlobalGuard extends AuthGuard(['jwt']) { @@ -75,7 +76,7 @@ export class GlobalGuard extends AuthGuard(['jwt']) { } private async authenticate( - req: any, + req: Request, user: any = { roles: { guest: true, diff --git a/packages/nocodb/src/helpers/catchError.ts b/packages/nocodb/src/helpers/catchError.ts index 289727f7d9..ce6ab3d288 100644 --- a/packages/nocodb/src/helpers/catchError.ts +++ b/packages/nocodb/src/helpers/catchError.ts @@ -1,4 +1,5 @@ import type { ErrorObject } from 'ajv'; +import {NextFunction,Request,Response} from "express"; export enum DBError { TABLE_EXIST = 'TABLE_EXIST', @@ -384,9 +385,9 @@ export function extractDBError(error): { } export default function ( - requestHandler: (req: any, res: any, next?: any) => any, + requestHandler: (req: Request, res: Response, next?: NextFunction) => any, ) { - return async function (req: any, res: any, next: any) { + return async function (req: Request, res: Response, next?: NextFunction) { try { return await requestHandler(req, res, next); } catch (e) { diff --git a/packages/nocodb/src/interface/config.ts b/packages/nocodb/src/interface/config.ts index 7ec3024000..9fffdcc59e 100644 --- a/packages/nocodb/src/interface/config.ts +++ b/packages/nocodb/src/interface/config.ts @@ -2,6 +2,8 @@ import type { ReqId } from 'pino-http'; import type { Handler } from 'express'; import type * as e from 'express'; import type { Knex } from 'knex'; +import {UserType} from "nocodb-sdk"; +import {User} from "~/models"; export interface Route { path: string; @@ -323,8 +325,9 @@ export interface AppConfig { export interface NcRequest { id?: ReqId; - user?: Record; + user?: UserType | User; ncWorkspaceId?: string; ncProjectId?: string; headers?: Record | IncomingHttpHeaders; + clientIp?: string; } diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts index 5b0f70ce57..a9b58627e2 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts @@ -35,6 +35,7 @@ import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2'; import { BulkDataAliasService } from '~/services/bulk-data-alias.service'; import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; import { sanitizeColumnName } from '~/helpers'; +import {NcRequest} from "~/interface/config"; @Injectable() export class ImportService { @@ -64,7 +65,7 @@ export class ImportService { data: | { models: { model: any; views: any[]; hooks?: any[] }[] } | { model: any; views: any[]; hooks?: any[] }[]; - req: any; + req: NcRequest; externalModels?: Model[]; }) { const hrTime = initTime(); @@ -1051,7 +1052,7 @@ export class ImportService { vw: Partial, views: View[], user: UserType, - req: any, + req: NcRequest, ): Promise { if (vw.is_default) { const view = views.find((a) => a.is_default); @@ -1197,7 +1198,7 @@ export class ImportService { url?: string; file?: any; }; - req: any; + req: NcRequest; }) { const hrTime = initTime(); diff --git a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.processor.ts b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.processor.ts index a4d09fbaaa..0b236c67b9 100644 --- a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.processor.ts +++ b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.processor.ts @@ -3,6 +3,7 @@ import { Process, Processor } from '@nestjs/bull'; import { Job } from 'bull'; import { JOBS_QUEUE, JobTypes } from '~/interface/Jobs'; import { MetaDiffsService } from '~/services/meta-diffs.service'; +import {NcRequest} from "~/interface/config"; @Processor(JOBS_QUEUE) export class MetaSyncProcessor { @@ -18,7 +19,7 @@ export class MetaSyncProcessor { baseId: string; sourceId: string; user: any; - req: any; + req: NcRequest; } = job.data; if (info.sourceId === 'all') { diff --git a/packages/nocodb/src/services/api-tokens.service.ts b/packages/nocodb/src/services/api-tokens.service.ts index 8864dffcd7..bcd669e57c 100644 --- a/packages/nocodb/src/services/api-tokens.service.ts +++ b/packages/nocodb/src/services/api-tokens.service.ts @@ -6,6 +6,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { NcError } from '~/helpers/catchError'; import { validatePayload } from '~/helpers'; import { ApiToken } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class ApiTokensService { @@ -17,7 +18,7 @@ export class ApiTokensService { async apiTokenCreate(param: { userId: string; tokenBody: ApiTokenReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ApiTokenReq', @@ -36,7 +37,7 @@ export class ApiTokensService { }); } - async apiTokenDelete(param: { token; user: User; req: any }) { + async apiTokenDelete(param: { token; user: User; req: NcRequest }) { const apiToken = await ApiToken.getByToken(param.token); if ( !extractRolesObj(param.user.roles)[OrgUserRoles.SUPER_ADMIN] && diff --git a/packages/nocodb/src/services/app-hooks/interfaces.ts b/packages/nocodb/src/services/app-hooks/interfaces.ts index 7727d81155..ee2013f535 100644 --- a/packages/nocodb/src/services/app-hooks/interfaces.ts +++ b/packages/nocodb/src/services/app-hooks/interfaces.ts @@ -18,7 +18,7 @@ import type { } from 'nocodb-sdk'; export interface NcBaseEvent extends NcBaseEvent { - req: any; + req: NcRequest; clientId?: string; } diff --git a/packages/nocodb/src/services/attachments.service.ts b/packages/nocodb/src/services/attachments.service.ts index 0da2a8d7ee..7c7e965442 100644 --- a/packages/nocodb/src/services/attachments.service.ts +++ b/packages/nocodb/src/services/attachments.service.ts @@ -10,12 +10,13 @@ import Local from '~/plugins/storage/Local'; import mimetypes, { mimeIcons } from '~/utils/mimeTypes'; import { PresignedUrl } from '~/models'; import { utf8ify } from '~/helpers/stringHelpers'; +import {NcRequest} from "~/interface/config"; @Injectable() export class AttachmentsService { constructor(private readonly appHooksService: AppHooksService) {} - async upload(param: { path?: string; files: FileType[]; req: any }) { + async upload(param: { path?: string; files: FileType[]; req: NcRequest }) { // TODO: add getAjvValidatorMw const filePath = this.sanitizeUrlPath( param.path?.toString()?.split('/') || [''], @@ -92,7 +93,7 @@ export class AttachmentsService { async uploadViaURL(param: { path?: string; urls: AttachmentReqType[]; - req: any; + req: NcRequest; }) { // TODO: add getAjvValidatorMw const filePath = this.sanitizeUrlPath( diff --git a/packages/nocodb/src/services/base-users/base-users.service.ts b/packages/nocodb/src/services/base-users/base-users.service.ts index 50b65a2834..6f466cc1bd 100644 --- a/packages/nocodb/src/services/base-users/base-users.service.ts +++ b/packages/nocodb/src/services/base-users/base-users.service.ts @@ -23,6 +23,7 @@ import { Base, BaseUser, User } from '~/models'; import { CacheGetType, CacheScope, MetaTable } from '~/utils/globals'; import { extractProps } from '~/helpers/extractProps'; import { getProjectRolePower } from '~/utils/roleHelper'; +import {NcRequest} from "~/interface/config"; @Injectable() export class BaseUsersService { @@ -47,7 +48,7 @@ export class BaseUsersService { async userInvite(param: { baseId: string; baseUser: ProjectUserReqType; - req: any; + req: NcRequest; }): Promise { validatePayload( 'swagger.json#/components/schemas/ProjectUserReq', diff --git a/packages/nocodb/src/services/bases.service.ts b/packages/nocodb/src/services/bases.service.ts index 2353d93ddd..8a179bb385 100644 --- a/packages/nocodb/src/services/bases.service.ts +++ b/packages/nocodb/src/services/bases.service.ts @@ -24,6 +24,7 @@ import { getToolDir } from '~/utils/nc-config'; import { MetaService } from '~/meta/meta.service'; import { MetaTable } from '~/utils/globals'; import { TablesService } from '~/services/tables.service'; +import {NcRequest} from "~/interface/config"; const nanoid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz_', 4); @@ -36,7 +37,7 @@ export class BasesService { ) {} async baseList(param: { - user: { id: string; roles: Record }; + user: { id: string; roles?: string | Record}; query?: any; }) { const bases = extractRolesObj(param.user?.roles)[OrgUserRoles.SUPER_ADMIN] @@ -63,7 +64,7 @@ export class BasesService { baseId: string; base: ProjectUpdateReqType; user: UserType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ProjectUpdateReq', @@ -101,7 +102,7 @@ export class BasesService { } } - async baseSoftDelete(param: { baseId: any; user: UserType; req: any }) { + async baseSoftDelete(param: { baseId: any; user: UserType; req: NcRequest }) { const base = await Base.getWithInfo(param.baseId); if (!base) { @@ -119,7 +120,7 @@ export class BasesService { return true; } - async baseCreate(param: { base: ProjectReqType; user: any; req: any }) { + async baseCreate(param: { base: ProjectReqType; user: any; req: NcRequest }) { validatePayload('swagger.json#/components/schemas/ProjectReq', param.base); const baseId = await this.metaService.genNanoid(MetaTable.PROJECT); @@ -225,7 +226,7 @@ export class BasesService { return base; } - async createDefaultBase(param: { user: UserType; req: any }) { + async createDefaultBase(param: { user: UserType; req: NcRequest }) { const base = await this.baseCreate({ base: { title: 'Getting Started', diff --git a/packages/nocodb/src/services/columns.service.ts b/packages/nocodb/src/services/columns.service.ts index 0a08c0670b..db3126b8d4 100644 --- a/packages/nocodb/src/services/columns.service.ts +++ b/packages/nocodb/src/services/columns.service.ts @@ -47,6 +47,7 @@ import Noco from '~/Noco'; import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; import { MetaTable } from '~/utils/globals'; import { MetaService } from '~/meta/meta.service'; +import {NcRequest} from "~/interface/config"; // todo: move export enum Altered { @@ -1030,7 +1031,7 @@ export class ColumnsService { } async columnAdd(param: { - req: any; + req: NcRequest; tableId: string; column: ColumnReqType; user: UserType; @@ -2194,7 +2195,7 @@ export class ColumnsService { column: Partial; }[]; }, - req: any, + req: NcRequest, ) { // TODO validatePayload diff --git a/packages/nocodb/src/services/filters.service.ts b/packages/nocodb/src/services/filters.service.ts index 8c419942a8..23e7e9295b 100644 --- a/packages/nocodb/src/services/filters.service.ts +++ b/packages/nocodb/src/services/filters.service.ts @@ -5,6 +5,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { Filter, Hook, View } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class FiltersService { @@ -14,7 +15,7 @@ export class FiltersService { filter: FilterReqType; hookId: any; user: UserType; - req: any; + req: NcRequest; }) { validatePayload('swagger.json#/components/schemas/FilterReq', param.filter); @@ -41,7 +42,7 @@ export class FiltersService { return Filter.rootFilterListByHook({ hookId: param.hookId }); } - async filterDelete(param: { filterId: string; req: any }) { + async filterDelete(param: { filterId: string; req: NcRequest }) { const filter = await Filter.get(param.filterId); if (!filter) { @@ -62,7 +63,7 @@ export class FiltersService { filter: FilterReqType; viewId: string; user: UserType; - req: any; + req: NcRequest; }) { validatePayload('swagger.json#/components/schemas/FilterReq', param.filter); @@ -86,7 +87,7 @@ export class FiltersService { filter: FilterReqType; filterId: string; user: UserType; - req: any; + req: NcRequest; }) { validatePayload('swagger.json#/components/schemas/FilterReq', param.filter); diff --git a/packages/nocodb/src/services/form-columns.service.ts b/packages/nocodb/src/services/form-columns.service.ts index 6c8b917a2f..cddf40b133 100644 --- a/packages/nocodb/src/services/form-columns.service.ts +++ b/packages/nocodb/src/services/form-columns.service.ts @@ -3,6 +3,7 @@ import { AppEvents } from 'nocodb-sdk'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { FormViewColumn } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class FormColumnsService { @@ -12,7 +13,7 @@ export class FormColumnsService { formViewColumnId: string; // todo: replace with FormColumnReq formViewColumn: FormViewColumn; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/FormColumnReq', diff --git a/packages/nocodb/src/services/forms.service.ts b/packages/nocodb/src/services/forms.service.ts index 612fa76395..be76e6f051 100644 --- a/packages/nocodb/src/services/forms.service.ts +++ b/packages/nocodb/src/services/forms.service.ts @@ -9,6 +9,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { FormView, View } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class FormsService { @@ -23,7 +24,7 @@ export class FormsService { tableId: string; body: ViewCreateReqType; user: UserType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ViewCreateReq', @@ -55,7 +56,7 @@ export class FormsService { async formViewUpdate(param: { formViewId: string; form: FormUpdateReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/FormUpdateReq', diff --git a/packages/nocodb/src/services/galleries.service.ts b/packages/nocodb/src/services/galleries.service.ts index 55b0397032..7f20af63ea 100644 --- a/packages/nocodb/src/services/galleries.service.ts +++ b/packages/nocodb/src/services/galleries.service.ts @@ -9,6 +9,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { GalleryView, View } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class GalleriesService { @@ -23,7 +24,7 @@ export class GalleriesService { gallery: ViewCreateReqType; user: UserType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ViewCreateReq', @@ -48,7 +49,7 @@ export class GalleriesService { async galleryViewUpdate(param: { galleryViewId: string; gallery: GalleryUpdateReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/GalleryUpdateReq', diff --git a/packages/nocodb/src/services/grid-columns.service.ts b/packages/nocodb/src/services/grid-columns.service.ts index 6da1c3b7e4..6cf59a14e0 100644 --- a/packages/nocodb/src/services/grid-columns.service.ts +++ b/packages/nocodb/src/services/grid-columns.service.ts @@ -4,6 +4,7 @@ import type { GridColumnReqType } from 'nocodb-sdk'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { GridViewColumn } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class GridColumnsService { @@ -16,7 +17,7 @@ export class GridColumnsService { async gridColumnUpdate(param: { gridViewColumnId: string; grid: GridColumnReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/GridColumnReq', diff --git a/packages/nocodb/src/services/grids.service.ts b/packages/nocodb/src/services/grids.service.ts index a78438ffdb..31fd69d7b1 100644 --- a/packages/nocodb/src/services/grids.service.ts +++ b/packages/nocodb/src/services/grids.service.ts @@ -5,6 +5,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { GridView, View } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class GridsService { @@ -13,7 +14,7 @@ export class GridsService { async gridViewCreate(param: { tableId: string; grid: ViewCreateReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ViewCreateReq', @@ -39,7 +40,7 @@ export class GridsService { async gridViewUpdate(param: { viewId: string; grid: GridUpdateReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/GridUpdateReq', diff --git a/packages/nocodb/src/services/hooks.service.ts b/packages/nocodb/src/services/hooks.service.ts index ac39261bc2..bdd0625e4f 100644 --- a/packages/nocodb/src/services/hooks.service.ts +++ b/packages/nocodb/src/services/hooks.service.ts @@ -10,6 +10,7 @@ import { } from '~/helpers/populateSamplePayload'; import { invokeWebhook } from '~/helpers/webhookHelpers'; import { Hook, HookLog, Model } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class HooksService { @@ -37,7 +38,7 @@ export class HooksService { return await HookLog.list({ fk_hook_id: param.hookId }, param.query); } - async hookCreate(param: { tableId: string; hook: HookReqType; req: any }) { + async hookCreate(param: { tableId: string; hook: HookReqType; req: NcRequest }) { validatePayload('swagger.json#/components/schemas/HookReq', param.hook); this.validateHookPayload(param.hook.notification); @@ -55,7 +56,7 @@ export class HooksService { return hook; } - async hookDelete(param: { hookId: string; req: any }) { + async hookDelete(param: { hookId: string; req: NcRequest }) { const hook = await Hook.get(param.hookId); if (!hook) { @@ -70,7 +71,7 @@ export class HooksService { return true; } - async hookUpdate(param: { hookId: string; hook: HookReqType; req: any }) { + async hookUpdate(param: { hookId: string; hook: HookReqType; req: NcRequest }) { validatePayload('swagger.json#/components/schemas/HookReq', param.hook); const hook = await Hook.get(param.hookId); @@ -97,7 +98,7 @@ export class HooksService { async hookTest(param: { tableId: string; hookTest: HookTestReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/HookTestReq', diff --git a/packages/nocodb/src/services/kanbans.service.ts b/packages/nocodb/src/services/kanbans.service.ts index 9ffba866df..645cf8bebe 100644 --- a/packages/nocodb/src/services/kanbans.service.ts +++ b/packages/nocodb/src/services/kanbans.service.ts @@ -9,6 +9,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { KanbanView, View } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class KanbansService { @@ -22,7 +23,7 @@ export class KanbansService { tableId: string; kanban: ViewCreateReqType; user: UserType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ViewCreateReq', @@ -50,7 +51,7 @@ export class KanbansService { async kanbanViewUpdate(param: { kanbanViewId: string; kanban: KanbanUpdateReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/KanbanUpdateReq', diff --git a/packages/nocodb/src/services/maps.service.ts b/packages/nocodb/src/services/maps.service.ts index 8feafc1c5c..15d5d775c1 100644 --- a/packages/nocodb/src/services/maps.service.ts +++ b/packages/nocodb/src/services/maps.service.ts @@ -5,6 +5,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { MapView, View } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class MapsService { @@ -18,7 +19,7 @@ export class MapsService { tableId: string; map: ViewCreateReqType; user: UserType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ViewCreateReq', @@ -44,7 +45,7 @@ export class MapsService { async mapViewUpdate(param: { mapViewId: string; map: MapUpdateReqType; - req: any; + req: NcRequest; }) { validatePayload('swagger.json#/components/schemas/MapUpdateReq', param.map); diff --git a/packages/nocodb/src/services/model-visibilities.service.ts b/packages/nocodb/src/services/model-visibilities.service.ts index 63dba190cb..ef316f2417 100644 --- a/packages/nocodb/src/services/model-visibilities.service.ts +++ b/packages/nocodb/src/services/model-visibilities.service.ts @@ -5,6 +5,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { Base, Model, ModelRoleVisibility, View } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class ModelVisibilitiesService { @@ -13,7 +14,7 @@ export class ModelVisibilitiesService { async xcVisibilityMetaSetAll(param: { visibilityRule: VisibilityRuleReqType; baseId: string; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/VisibilityRuleReq', diff --git a/packages/nocodb/src/services/notifications.service.ts b/packages/nocodb/src/services/notifications.service.ts index 97e8791416..f50101dc12 100644 --- a/packages/nocodb/src/services/notifications.service.ts +++ b/packages/nocodb/src/services/notifications.service.ts @@ -10,6 +10,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { NcError } from '~/helpers/catchError'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { Notification } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class NotificationsService implements OnModuleInit, OnModuleDestroy { @@ -17,7 +18,7 @@ export class NotificationsService implements OnModuleInit, OnModuleDestroy { protected async insertNotification( insertData: Partial, - req: any, + req: NcRequest, ) { this.appHooks.emit('notification' as any, { ...insertData, req } as any); diff --git a/packages/nocodb/src/services/org-tokens.service.ts b/packages/nocodb/src/services/org-tokens.service.ts index 4cfe2369e9..399a61367b 100644 --- a/packages/nocodb/src/services/org-tokens.service.ts +++ b/packages/nocodb/src/services/org-tokens.service.ts @@ -7,6 +7,7 @@ import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { ApiToken } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class OrgTokensService { @@ -38,7 +39,7 @@ export class OrgTokensService { async apiTokenCreate(param: { user: User; apiToken: ApiTokenReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ApiTokenReq', @@ -60,7 +61,7 @@ export class OrgTokensService { return apiToken; } - async apiTokenDelete(param: { user: User; token: string; req: any }) { + async apiTokenDelete(param: { user: User; token: string; req: NcRequest }) { const fk_user_id = param.user.id; const apiToken = await ApiToken.getByToken(param.token); if ( diff --git a/packages/nocodb/src/services/org-users.service.ts b/packages/nocodb/src/services/org-users.service.ts index 97eb709664..d5dd80ab53 100644 --- a/packages/nocodb/src/services/org-users.service.ts +++ b/packages/nocodb/src/services/org-users.service.ts @@ -19,6 +19,7 @@ import { BaseUser, Store, SyncSource, User } from '~/models'; import Noco from '~/Noco'; import { MetaTable } from '~/utils/globals'; +import {NcRequest} from "~/interface/config"; @Injectable() export class OrgUsersService { @@ -91,7 +92,7 @@ export class OrgUsersService { async userAdd(param: { user: UserType; // todo: refactor - req: any; + req: NcRequest; }) { validatePayload('swagger.json#/components/schemas/OrgUserReq', param.user); @@ -193,7 +194,7 @@ export class OrgUsersService { NcError.notImplemented(); } - async userInviteResend(param: { userId: string; req: any }): Promise { + async userInviteResend(param: { userId: string; req: NcRequest }): Promise { const user = await User.get(param.userId); if (!user) { diff --git a/packages/nocodb/src/services/plugins.service.ts b/packages/nocodb/src/services/plugins.service.ts index c80f932496..8dd1fac0ea 100644 --- a/packages/nocodb/src/services/plugins.service.ts +++ b/packages/nocodb/src/services/plugins.service.ts @@ -5,6 +5,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2'; import { Plugin } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class PluginsService { @@ -14,7 +15,7 @@ export class PluginsService { return await Plugin.list(); } - async pluginTest(param: { body: PluginTestReqType; req: any }) { + async pluginTest(param: { body: PluginTestReqType; req: NcRequest }) { validatePayload( 'swagger.json#/components/schemas/PluginTestReq', param.body, @@ -33,7 +34,7 @@ export class PluginsService { async pluginUpdate(param: { pluginId: string; plugin: PluginType; - req: any; + req: NcRequest; }) { validatePayload('swagger.json#/components/schemas/PluginReq', param.plugin); diff --git a/packages/nocodb/src/services/shared-bases.service.ts b/packages/nocodb/src/services/shared-bases.service.ts index 33e24d377d..894bb4b2e1 100644 --- a/packages/nocodb/src/services/shared-bases.service.ts +++ b/packages/nocodb/src/services/shared-bases.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import { v4 as uuidv4 } from 'uuid'; import { ConfigService } from '@nestjs/config'; -import type { AppConfig } from '~/interface/config'; +import type {AppConfig, NcRequest} from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; @@ -26,7 +26,7 @@ export class SharedBasesService { password: string; siteUrl: string; - req: any; + req: NcRequest; }): Promise { validatePayload('swagger.json#/components/schemas/SharedBaseReq', param); @@ -74,7 +74,7 @@ export class SharedBasesService { roles: string; password: string; siteUrl: string; - req: any; + req: NcRequest; }): Promise { validatePayload('swagger.json#/components/schemas/SharedBaseReq', param); @@ -132,7 +132,7 @@ export class SharedBasesService { async disableSharedBaseLink(param: { baseId: string; - req: any; + req: NcRequest; }): Promise { const base = await Base.get(param.baseId); diff --git a/packages/nocodb/src/services/sorts.service.ts b/packages/nocodb/src/services/sorts.service.ts index cdcae1a714..df0bff9dff 100644 --- a/packages/nocodb/src/services/sorts.service.ts +++ b/packages/nocodb/src/services/sorts.service.ts @@ -5,6 +5,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { Sort } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class SortsService { @@ -14,7 +15,7 @@ export class SortsService { return Sort.get(param.sortId); } - async sortDelete(param: { sortId: string; req: any }) { + async sortDelete(param: { sortId: string; req: NcRequest }) { const sort = await Sort.get(param.sortId); if (!sort) { @@ -30,7 +31,7 @@ export class SortsService { return true; } - async sortUpdate(param: { sortId: any; sort: SortReqType; req: any }) { + async sortUpdate(param: { sortId: any; sort: SortReqType; req: NcRequest }) { validatePayload('swagger.json#/components/schemas/SortReq', param.sort); const sort = await Sort.get(param.sortId); @@ -50,7 +51,7 @@ export class SortsService { return res; } - async sortCreate(param: { viewId: any; sort: SortReqType; req: any }) { + async sortCreate(param: { viewId: any; sort: SortReqType; req: NcRequest }) { validatePayload('swagger.json#/components/schemas/SortReq', param.sort); const sort = await Sort.insert({ diff --git a/packages/nocodb/src/services/sources.service.ts b/packages/nocodb/src/services/sources.service.ts index e808e63ffb..387866b7a6 100644 --- a/packages/nocodb/src/services/sources.service.ts +++ b/packages/nocodb/src/services/sources.service.ts @@ -7,6 +7,7 @@ import { populateRollupColumnAndHideLTAR } from '~/helpers/populateMeta'; import { syncBaseMigration } from '~/helpers/syncMigration'; import { Base, Source } from '~/models'; import { NcError } from '~/helpers/catchError'; +import {NcRequest} from "~/interface/config"; @Injectable() export class SourcesService { @@ -24,7 +25,7 @@ export class SourcesService { sourceId: string; source: BaseReqType; baseId: string; - req: any; + req: NcRequest; }) { validatePayload('swagger.json#/components/schemas/BaseReq', param.source); @@ -53,7 +54,7 @@ export class SourcesService { return sources; } - async baseDelete(param: { sourceId: string; req: any }) { + async baseDelete(param: { sourceId: string; req: NcRequest }) { try { const source = await Source.get(param.sourceId, true); await source.delete(); @@ -81,7 +82,7 @@ export class SourcesService { baseId: string; source: BaseReqType; logger?: (message: string) => void; - req: any; + req: NcRequest; }) { validatePayload('swagger.json#/components/schemas/BaseReq', param.source); diff --git a/packages/nocodb/src/services/sync.service.ts b/packages/nocodb/src/services/sync.service.ts index cba066407e..5524216195 100644 --- a/packages/nocodb/src/services/sync.service.ts +++ b/packages/nocodb/src/services/sync.service.ts @@ -4,6 +4,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { NcError } from '~/helpers/catchError'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { Base, SyncSource } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class SyncService { @@ -20,7 +21,7 @@ export class SyncService { sourceId?: string; userId: string; syncPayload: Partial; - req: any; + req: NcRequest; }) { const base = await Base.getWithInfo(param.baseId); @@ -39,7 +40,7 @@ export class SyncService { return sync; } - async syncDelete(param: { syncId: string; req: any }) { + async syncDelete(param: { syncId: string; req: NcRequest }) { const syncSource = await SyncSource.get(param.syncId); if (!syncSource) { @@ -58,7 +59,7 @@ export class SyncService { async syncUpdate(param: { syncId: string; syncPayload: Partial; - req: any; + req: NcRequest; }) { const syncSource = await SyncSource.get(param.syncId); diff --git a/packages/nocodb/src/services/tables.service.ts b/packages/nocodb/src/services/tables.service.ts index 2a8f6ec661..8d21d0873c 100644 --- a/packages/nocodb/src/services/tables.service.ts +++ b/packages/nocodb/src/services/tables.service.ts @@ -29,6 +29,7 @@ import { Base, Column, Model, ModelRoleVisibility } from '~/models'; import Noco from '~/Noco'; import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; import { sanitizeColumnName, validatePayload } from '~/helpers'; +import {NcRequest} from "~/interface/config"; @Injectable() export class TablesService { @@ -43,7 +44,7 @@ export class TablesService { table: TableReqType & { base_id?: string }; baseId?: string; user: UserType; - req: any; + req: NcRequest; }) { const model = await Model.get(param.tableId); diff --git a/packages/nocodb/src/services/users/users.service.ts b/packages/nocodb/src/services/users/users.service.ts index e6c782fc7a..4076b5be53 100644 --- a/packages/nocodb/src/services/users/users.service.ts +++ b/packages/nocodb/src/services/users/users.service.ts @@ -26,6 +26,7 @@ import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2'; import { NcError } from '~/helpers/catchError'; import { BasesService } from '~/services/bases.service'; import { extractProps } from '~/helpers/extractProps'; +import {NcRequest} from "~/interface/config"; @Injectable() export class UsersService { @@ -97,7 +98,7 @@ export class UsersService { salt: any; password; email_verification_token; - req: any; + req: NcRequest; }) { this.validateEmailPattern(email); @@ -149,7 +150,7 @@ export class UsersService { async passwordChange(param: { body: PasswordChangeReqType; user: UserType; - req: any; + req: NcRequest; }): Promise { validatePayload( 'swagger.json#/components/schemas/PasswordChangeReq', @@ -202,7 +203,7 @@ export class UsersService { async passwordForgot(param: { body: PasswordForgotReqType; siteUrl: string; - req: any; + req: NcRequest; }): Promise { validatePayload( 'swagger.json#/components/schemas/PasswordForgotReq', @@ -279,7 +280,7 @@ export class UsersService { async passwordReset(param: { body: PasswordResetReqType; token: string; - req: any; + req: NcRequest; }): Promise { validatePayload( 'swagger.json#/components/schemas/PasswordResetReq', @@ -332,7 +333,7 @@ export class UsersService { async emailVerification(param: { token: string; // todo: exclude - req: any; + req: NcRequest; }): Promise { const { token, req } = param; diff --git a/packages/nocodb/src/services/view-columns.service.ts b/packages/nocodb/src/services/view-columns.service.ts index 69fc81421f..09daf25abb 100644 --- a/packages/nocodb/src/services/view-columns.service.ts +++ b/packages/nocodb/src/services/view-columns.service.ts @@ -4,6 +4,7 @@ import type { ViewColumnReqType, ViewColumnUpdateReqType } from 'nocodb-sdk'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { View } from '~/models'; +import {NcRequest} from "~/interface/config"; @Injectable() export class ViewColumnsService { @@ -15,7 +16,7 @@ export class ViewColumnsService { async columnAdd(param: { viewId: string; column: ViewColumnReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ViewColumnReq', @@ -42,7 +43,7 @@ export class ViewColumnsService { viewId: string; columnId: string; column: ViewColumnUpdateReqType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ViewColumnUpdateReq', diff --git a/packages/nocodb/src/services/views.service.ts b/packages/nocodb/src/services/views.service.ts index ba0e5ce5b5..664c5e182d 100644 --- a/packages/nocodb/src/services/views.service.ts +++ b/packages/nocodb/src/services/views.service.ts @@ -9,6 +9,7 @@ import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { Model, ModelRoleVisibility, View } from '~/models'; +import {NcRequest} from "~/interface/config"; // todo: move async function xcVisibilityMetaGet(param: { @@ -69,8 +70,8 @@ export class ViewsService { async viewList(param: { tableId: string; user: { - roles: Record; - base_roles: Record; + roles?: Record | string, + base_roles?: Record; }; }) { const model = await Model.get(param.tableId); @@ -91,7 +92,7 @@ export class ViewsService { return filteredViewList; } - async shareView(param: { viewId: string; user: UserType; req: any }) { + async shareView(param: { viewId: string; user: UserType; req: NcRequest }) { const res = await View.share(param.viewId); const view = await View.get(param.viewId); @@ -113,7 +114,7 @@ export class ViewsService { viewId: string; view: ViewUpdateReqType; user: UserType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/ViewUpdateReq', @@ -140,7 +141,7 @@ export class ViewsService { return result; } - async viewDelete(param: { viewId: string; user: UserType; req: any }) { + async viewDelete(param: { viewId: string; user: UserType; req: NcRequest }) { const view = await View.get(param.viewId); if (!view) { @@ -162,7 +163,7 @@ export class ViewsService { viewId: string; sharedView: SharedViewReqType; user: UserType; - req: any; + req: NcRequest; }) { validatePayload( 'swagger.json#/components/schemas/SharedViewReq', @@ -186,7 +187,7 @@ export class ViewsService { return result; } - async shareViewDelete(param: { viewId: string; user: UserType; req: any }) { + async shareViewDelete(param: { viewId: string; user: UserType; req: NcRequest }) { const view = await View.get(param.viewId); if (!view) { diff --git a/packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts b/packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts index 6c0446a354..8010f172f0 100644 --- a/packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts +++ b/packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts @@ -4,11 +4,12 @@ import { extractRolesObj, ProjectRoles } from 'nocodb-sdk'; import { Strategy } from 'passport-custom'; import { ApiToken, BaseUser, User } from '~/models'; import { sanitiseUserObj } from '~/utils'; +import {Request} from 'express' @Injectable() export class AuthTokenStrategy extends PassportStrategy(Strategy, 'authtoken') { // eslint-disable-next-line @typescript-eslint/ban-types - async validate(req: any, callback: Function) { + async validate(req: Request, callback: Function) { try { let user; if (req.headers['xc-token']) { diff --git a/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts b/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts index 6f301465b4..4db70ccb27 100644 --- a/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts +++ b/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts @@ -3,11 +3,13 @@ import { PassportStrategy } from '@nestjs/passport'; import { Strategy } from 'passport-custom'; import { extractRolesObj } from 'nocodb-sdk'; import { Base } from '~/models'; +import {Request} from 'express' + @Injectable() export class BaseViewStrategy extends PassportStrategy(Strategy, 'base-view') { // eslint-disable-next-line @typescript-eslint/ban-types - async validate(req: any, callback: Function) { + async validate(req: Request, callback: Function) { try { let user; if (req.headers['xc-shared-base-id']) { diff --git a/packages/nocodb/src/strategies/google.strategy/google.strategy.ts b/packages/nocodb/src/strategies/google.strategy/google.strategy.ts index bf8d145d07..6d310d6491 100644 --- a/packages/nocodb/src/strategies/google.strategy/google.strategy.ts +++ b/packages/nocodb/src/strategies/google.strategy/google.strategy.ts @@ -9,6 +9,7 @@ import Noco from '~/Noco'; import { UsersService } from '~/services/users/users.service'; import { BaseUser, Plugin, User } from '~/models'; import { sanitiseUserObj } from '~/utils'; +import {Request} from 'express' @Injectable() export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { @@ -20,7 +21,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { } async validate( - req: any, + req: Request, accessToken: string, refreshToken: string, profile: any, @@ -72,7 +73,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { return params; } - async authenticate(req: any, options?: any): Promise { + async authenticate(req: Request, options?: any): Promise { const googlePlugin = await Plugin.getPluginByTitle('Google'); if (googlePlugin && googlePlugin.input) { diff --git a/packages/nocodb/src/types/express.d.ts b/packages/nocodb/src/types/express.d.ts index 10f041fa6f..c74cd6cca6 100644 --- a/packages/nocodb/src/types/express.d.ts +++ b/packages/nocodb/src/types/express.d.ts @@ -1,5 +1,7 @@ import * as express from 'express'; import { Express } from 'express-serve-static-core'; +import type { UserType } from 'nocodb-sdk'; +import { User } from '~/models'; // declare global { // namespace Express { @@ -20,7 +22,11 @@ declare module 'express-serve-static-core' { interface Request { ncWorkspaceId?: string; ncProjectId?: string; - user: any; + user: UserType & { + base_roles?: Record; + workspace_roles?: Record; + provider?: string; + }; ncSiteUrl: string; clientIp: string; } From 4e134468bf99de82a76e10cd61e64142ab820e8d Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 8 Nov 2023 04:37:20 +0000 Subject: [PATCH 4/5] fix: missing import statement and test config correction --- .../jobs/source-create/source-create.controller.ts | 1 + packages/nocodb/tests/unit/tsconfig.ee.json | 4 ++-- packages/nocodb/tests/unit/tsconfig.json | 10 +++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts b/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts index 7da4ec1787..9bf3eef21e 100644 --- a/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts @@ -8,6 +8,7 @@ import { Req, UseGuards, } from '@nestjs/common'; +import { Request } from 'express'; import { BaseReqType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware'; diff --git a/packages/nocodb/tests/unit/tsconfig.ee.json b/packages/nocodb/tests/unit/tsconfig.ee.json index 5fb5d10896..8263593f20 100644 --- a/packages/nocodb/tests/unit/tsconfig.ee.json +++ b/packages/nocodb/tests/unit/tsconfig.ee.json @@ -53,8 +53,8 @@ "mocha", "node" ], "typeRoots": [ - "node_modules/@types", - "src/types" + "../../src/types", + "../../node_modules/@types" ] }, "parserOptions": { diff --git a/packages/nocodb/tests/unit/tsconfig.json b/packages/nocodb/tests/unit/tsconfig.json index 0685f510ab..35ec0b3c1f 100644 --- a/packages/nocodb/tests/unit/tsconfig.json +++ b/packages/nocodb/tests/unit/tsconfig.json @@ -52,16 +52,12 @@ "types": [ "mocha", "node" ], + "typeRoots": [ - "node_modules/@types", - "src/types" + "../../src/types", + "../../node_modules/@types" ] }, - "parserOptions": { - "sourceType": "module", - "tsconfigRootDir": "./", - "project": "./tsconfig.json" - }, "include": [ "./tests/**/**/**.ts", "./tests/**/**.ts" From def91b99f357ca91bfd1162a84d08eec372d5191 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 8 Nov 2023 04:37:20 +0000 Subject: [PATCH 5/5] chore: lint --- .../attachments-secure.controller.ts | 8 +++---- .../src/controllers/attachments.controller.ts | 15 +++---------- .../src/controllers/auth/auth.controller.ts | 14 ++++++------ .../controllers/form-columns.controller.ts | 9 +------- .../controllers/notifications.controller.ts | 6 ++--- .../src/controllers/org-tokens.controller.ts | 4 ++-- .../controllers/shared-bases.controller.ts | 6 ++--- .../src/controllers/views.controller.ts | 6 ++--- .../nocodb/src/guards/global/global.guard.ts | 2 +- packages/nocodb/src/helpers/catchError.ts | 2 +- packages/nocodb/src/interface/config.ts | 4 ++-- .../src/modules/jobs/jobs.controller.ts | 5 +++-- .../jobs/jobs/export-import/import.service.ts | 2 +- .../jobs/meta-sync/meta-sync.processor.ts | 2 +- .../nocodb/src/services/api-tokens.service.ts | 2 +- .../src/services/attachments.service.ts | 2 +- .../services/base-users/base-users.service.ts | 2 +- packages/nocodb/src/services/bases.service.ts | 4 ++-- .../nocodb/src/services/columns.service.ts | 2 +- .../nocodb/src/services/filters.service.ts | 2 +- .../src/services/form-columns.service.ts | 2 +- packages/nocodb/src/services/forms.service.ts | 2 +- .../nocodb/src/services/galleries.service.ts | 2 +- .../src/services/grid-columns.service.ts | 2 +- packages/nocodb/src/services/grids.service.ts | 2 +- packages/nocodb/src/services/hooks.service.ts | 14 +++++++++--- .../nocodb/src/services/kanbans.service.ts | 2 +- packages/nocodb/src/services/maps.service.ts | 2 +- .../services/model-visibilities.service.ts | 2 +- .../src/services/notifications.service.ts | 2 +- .../nocodb/src/services/org-tokens.service.ts | 2 +- .../nocodb/src/services/org-users.service.ts | 7 ++++-- .../nocodb/src/services/plugins.service.ts | 2 +- .../src/services/shared-bases.service.ts | 2 +- packages/nocodb/src/services/sorts.service.ts | 2 +- .../nocodb/src/services/sources.service.ts | 2 +- packages/nocodb/src/services/sync.service.ts | 2 +- .../nocodb/src/services/tables.service.ts | 2 +- .../src/services/users/users.service.ts | 2 +- .../src/services/view-columns.service.ts | 2 +- packages/nocodb/src/services/views.service.ts | 10 ++++++--- .../authtoken.strategy/authtoken.strategy.ts | 2 +- .../base-view.strategy/base-view.strategy.ts | 3 +-- .../google.strategy/google.strategy.ts | 2 +- packages/nocodb/src/types/express.d.ts | 19 ---------------- packages/nocodb/tests/unit/test_meta.db | Bin 777901 -> 774144 bytes packages/nocodb/tests/unit/tsconfig.ee.json | 3 ++- packages/nocodb/tests/unit/tsconfig.json | 4 ++-- packages/nocodb/tsconfig.json | 21 +++++++++++++----- 49 files changed, 105 insertions(+), 115 deletions(-) diff --git a/packages/nocodb/src/controllers/attachments-secure.controller.ts b/packages/nocodb/src/controllers/attachments-secure.controller.ts index 9a41df56e1..e19b300077 100644 --- a/packages/nocodb/src/controllers/attachments-secure.controller.ts +++ b/packages/nocodb/src/controllers/attachments-secure.controller.ts @@ -15,7 +15,8 @@ import { import hash from 'object-hash'; import moment from 'moment'; import { AnyFilesInterceptor } from '@nestjs/platform-express'; -import { Request, Response } from 'express'; +import { Response } from 'express'; +import type { Request } from 'express'; import type { AttachmentReqType, FileType } from 'nocodb-sdk'; import { GlobalGuard } from '~/guards/global/global.guard'; import { AttachmentsService } from '~/services/attachments.service'; @@ -66,10 +67,7 @@ export class AttachmentsSecureController { } @Get('/dltemp/:param(*)') - async fileReadv3( - @Param('param') param: string, - @Res() res: Response, - ) { + async fileReadv3(@Param('param') param: string, @Res() res: Response) { try { const fpath = await PresignedUrl.getPath(`dltemp/${param}`); diff --git a/packages/nocodb/src/controllers/attachments.controller.ts b/packages/nocodb/src/controllers/attachments.controller.ts index 3ec0c2da82..00a471e1e5 100644 --- a/packages/nocodb/src/controllers/attachments.controller.ts +++ b/packages/nocodb/src/controllers/attachments.controller.ts @@ -30,10 +30,7 @@ export class AttachmentsController { @Post(['/api/v1/db/storage/upload', '/api/v2/storage/upload']) @HttpCode(200) @UseInterceptors(UploadAllowedInterceptor, AnyFilesInterceptor()) - async upload( - @UploadedFiles() files: Array, - @Req() req: Request, - ) { + async upload(@UploadedFiles() files: Array, @Req() req: Request) { const attachments = await this.attachmentsService.upload({ files: files, path: req.query?.path?.toString(), @@ -65,10 +62,7 @@ export class AttachmentsController { // , getCacheMiddleware(), catchError(fileRead)); @Get('/download/:filename(*)') // This route will match any URL that starts with - async fileRead( - @Param('filename') filename: string, - @Res() res: Response, - ) { + async fileRead(@Param('filename') filename: string, @Res() res: Response) { try { const file = await this.attachmentsService.getFile({ path: path.join('nc', 'uploads', filename), @@ -107,10 +101,7 @@ export class AttachmentsController { } @Get('/dltemp/:param(*)') - async fileReadv3( - @Param('param') param: string, - @Res() res: Response, - ) { + async fileReadv3(@Param('param') param: string, @Res() res: Response) { try { const fpath = await PresignedUrl.getPath(`dltemp/${param}`); diff --git a/packages/nocodb/src/controllers/auth/auth.controller.ts b/packages/nocodb/src/controllers/auth/auth.controller.ts index d21fe8efe7..70a7a7d269 100644 --- a/packages/nocodb/src/controllers/auth/auth.controller.ts +++ b/packages/nocodb/src/controllers/auth/auth.controller.ts @@ -42,7 +42,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) - async signup(@Req() req: Request, @Res() res:Response): Promise { + async signup(@Req() req: Request, @Res() res: Response): Promise { if (this.config.get('auth', { infer: true }).disableEmailAuth) { NcError.forbidden('Email authentication is disabled'); } @@ -62,7 +62,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) - async refreshToken(@Req() req: Request, @Res() res:Response): Promise { + async refreshToken(@Req() req: Request, @Res() res: Response): Promise { res.json( await this.usersService.refreshToken({ body: req.body, @@ -79,7 +79,7 @@ export class AuthController { ]) @UseGuards(PublicApiLimiterGuard, AuthGuard('local')) @HttpCode(200) - async signin(@Req() req:Request, @Res() res:Response) { + async signin(@Req() req: Request, @Res() res: Response) { if (this.config.get('auth', { infer: true }).disableEmailAuth) { NcError.forbidden('Email authentication is disabled'); } @@ -90,7 +90,7 @@ export class AuthController { @UseGuards(GlobalGuard) @Post('/api/v1/auth/user/signout') @HttpCode(200) - async signOut(@Req() req:Request, @Res() res:Response): Promise { + async signOut(@Req() req: Request, @Res() res: Response): Promise { if (!(req as any).isAuthenticated()) { NcError.forbidden('Not allowed'); } @@ -105,7 +105,7 @@ export class AuthController { @Post(`/auth/google/genTokenByCode`) @HttpCode(200) @UseGuards(PublicApiLimiterGuard, AuthGuard('google')) - async googleSignin(@Req() req:Request, @Res() res:Response) { + async googleSignin(@Req() req: Request, @Res() res: Response) { await this.setRefreshToken({ req, res }); res.json(await this.usersService.login(req.user, req)); } @@ -118,7 +118,7 @@ export class AuthController { @Get(['/auth/user/me', '/api/v1/db/auth/user/me', '/api/v1/auth/user/me']) @UseGuards(MetaApiLimiterGuard, GlobalGuard) - async me(@Req() req:Request) { + async me(@Req() req: Request) { const user = { ...req.user, roles: extractRolesObj(req.user.roles), @@ -229,7 +229,7 @@ export class AuthController { @UseGuards(PublicApiLimiterGuard) async renderPasswordReset( @Req() req: Request, - @Res() res:Response, + @Res() res: Response, @Param('tokenId') tokenId: string, ): Promise { try { diff --git a/packages/nocodb/src/controllers/form-columns.controller.ts b/packages/nocodb/src/controllers/form-columns.controller.ts index 8d412c86cf..865ddf765e 100644 --- a/packages/nocodb/src/controllers/form-columns.controller.ts +++ b/packages/nocodb/src/controllers/form-columns.controller.ts @@ -1,11 +1,4 @@ -import { - Body, - Controller, - Param, - Patch, - Req, - UseGuards, -} from '@nestjs/common'; +import { Body, Controller, Param, Patch, Req, UseGuards } from '@nestjs/common'; import { Request } from 'express'; import { GlobalGuard } from '~/guards/global/global.guard'; import { FormColumnsService } from '~/services/form-columns.service'; diff --git a/packages/nocodb/src/controllers/notifications.controller.ts b/packages/nocodb/src/controllers/notifications.controller.ts index 24c1d5addb..73247a217f 100644 --- a/packages/nocodb/src/controllers/notifications.controller.ts +++ b/packages/nocodb/src/controllers/notifications.controller.ts @@ -37,7 +37,7 @@ export class NotificationsController { async notificationUpdate( @Param('notificationId') notificationId, @Body() body, - @Req() req:Request, + @Req() req: Request, ) { return this.notificationsService.notificationUpdate({ notificationId, @@ -48,7 +48,7 @@ export class NotificationsController { @Post('/api/v1/notifications/mark-all-read') @HttpCode(200) - async markAllRead(@Req() req:Request) { + async markAllRead(@Req() req: Request) { return this.notificationsService.markAllRead({ user: req.user, }); @@ -58,7 +58,7 @@ export class NotificationsController { // @Acl('notificationDelete') async notificationDelete( @Param('notificationId') notificationId, - @Req() req:Request, + @Req() req: Request, ) { return this.notificationsService.notificationUpdate({ notificationId, diff --git a/packages/nocodb/src/controllers/org-tokens.controller.ts b/packages/nocodb/src/controllers/org-tokens.controller.ts index 6654de192a..49540aef0c 100644 --- a/packages/nocodb/src/controllers/org-tokens.controller.ts +++ b/packages/nocodb/src/controllers/org-tokens.controller.ts @@ -47,7 +47,7 @@ export class OrgTokensController { scope: 'org', blockApiTokenAccess: true, }) - async apiTokenCreate(@Req() req:Request, @Body() body: ApiTokenReqType) { + async apiTokenCreate(@Req() req: Request, @Body() body: ApiTokenReqType) { return await this.orgTokensService.apiTokenCreate({ apiToken: body, user: req['user'], @@ -61,7 +61,7 @@ export class OrgTokensController { // allowedRoles: [OrgUserRoles.SUPER], blockApiTokenAccess: true, }) - async apiTokenDelete(@Req() req:Request, @Param('token') token: string) { + async apiTokenDelete(@Req() req: Request, @Param('token') token: string) { await this.orgTokensService.apiTokenDelete({ token, user: req['user'], diff --git a/packages/nocodb/src/controllers/shared-bases.controller.ts b/packages/nocodb/src/controllers/shared-bases.controller.ts index 5d8f73b377..0466974170 100644 --- a/packages/nocodb/src/controllers/shared-bases.controller.ts +++ b/packages/nocodb/src/controllers/shared-bases.controller.ts @@ -28,7 +28,7 @@ export class SharedBasesController { @HttpCode(200) @Acl('createSharedBaseLink') async createSharedBaseLink( - @Req() req:Request, + @Req() req: Request, @Body() body: any, @Param('baseId') baseId: string, ): Promise { @@ -49,7 +49,7 @@ export class SharedBasesController { ]) @Acl('updateSharedBaseLink') async updateSharedBaseLink( - @Req() req:Request, + @Req() req: Request, @Body() body: any, @Param('baseId') baseId: string, ): Promise { @@ -87,7 +87,7 @@ export class SharedBasesController { ]) @Acl('getSharedBaseLink') async getSharedBaseLink( - @Req() req:Request, + @Req() req: Request, @Param('baseId') baseId: string, ): Promise { const sharedBase = await this.sharedBasesService.getSharedBaseLink({ diff --git a/packages/nocodb/src/controllers/views.controller.ts b/packages/nocodb/src/controllers/views.controller.ts index 3f5213ef7c..d7d4d7a112 100644 --- a/packages/nocodb/src/controllers/views.controller.ts +++ b/packages/nocodb/src/controllers/views.controller.ts @@ -102,7 +102,7 @@ export class ViewsController { ]) @HttpCode(200) @Acl('shareView') - async shareView(@Param('viewId') viewId: string, @Req() req:Request) { + async shareView(@Param('viewId') viewId: string, @Req() req: Request) { return await this.viewsService.shareView({ viewId, user: req.user, req }); } @@ -127,7 +127,7 @@ export class ViewsController { async shareViewUpdate( @Param('viewId') viewId: string, @Body() body: ViewUpdateReqType, - @Req() req:Request, + @Req() req: Request, ) { return await this.viewsService.shareViewUpdate({ viewId, @@ -142,7 +142,7 @@ export class ViewsController { '/api/v2/meta/views/:viewId/share', ]) @Acl('shareViewDelete') - async shareViewDelete(@Param('viewId') viewId: string, @Req() req:Request) { + async shareViewDelete(@Param('viewId') viewId: string, @Req() req: Request) { return await this.viewsService.shareViewDelete({ viewId, user: req.user, diff --git a/packages/nocodb/src/guards/global/global.guard.ts b/packages/nocodb/src/guards/global/global.guard.ts index f0ccf8874d..8a4a93365c 100644 --- a/packages/nocodb/src/guards/global/global.guard.ts +++ b/packages/nocodb/src/guards/global/global.guard.ts @@ -2,9 +2,9 @@ import { Injectable } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; import { lastValueFrom, Observable } from 'rxjs'; import { extractRolesObj } from 'nocodb-sdk'; +import type { Request } from 'express'; import type { ExecutionContext } from '@nestjs/common'; import { JwtStrategy } from '~/strategies/jwt.strategy'; -import {Request} from 'express' @Injectable() export class GlobalGuard extends AuthGuard(['jwt']) { diff --git a/packages/nocodb/src/helpers/catchError.ts b/packages/nocodb/src/helpers/catchError.ts index ce6ab3d288..0cb8109447 100644 --- a/packages/nocodb/src/helpers/catchError.ts +++ b/packages/nocodb/src/helpers/catchError.ts @@ -1,5 +1,5 @@ +import type { NextFunction, Request, Response } from 'express'; import type { ErrorObject } from 'ajv'; -import {NextFunction,Request,Response} from "express"; export enum DBError { TABLE_EXIST = 'TABLE_EXIST', diff --git a/packages/nocodb/src/interface/config.ts b/packages/nocodb/src/interface/config.ts index 9fffdcc59e..57498647a5 100644 --- a/packages/nocodb/src/interface/config.ts +++ b/packages/nocodb/src/interface/config.ts @@ -1,9 +1,9 @@ +import type { UserType } from 'nocodb-sdk'; import type { ReqId } from 'pino-http'; import type { Handler } from 'express'; import type * as e from 'express'; import type { Knex } from 'knex'; -import {UserType} from "nocodb-sdk"; -import {User} from "~/models"; +import type { User } from '~/models'; export interface Route { path: string; diff --git a/packages/nocodb/src/modules/jobs/jobs.controller.ts b/packages/nocodb/src/modules/jobs/jobs.controller.ts index 8fc4992d3c..7d371f9821 100644 --- a/packages/nocodb/src/modules/jobs/jobs.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs.controller.ts @@ -8,11 +8,12 @@ import { Res, UseGuards, } from '@nestjs/common'; -import { Request, Response } from 'express'; +import { Request } from 'express'; import { OnEvent } from '@nestjs/event-emitter'; import { customAlphabet } from 'nanoid'; import { ModuleRef } from '@nestjs/core'; import { JobsRedisService } from './redis/jobs-redis.service'; +import type { Response } from 'express'; import type { OnModuleInit } from '@nestjs/common'; import { JobStatus } from '~/interface/Jobs'; import { JobEvents } from '~/interface/Jobs'; @@ -47,7 +48,7 @@ export class JobsController implements OnModuleInit { @Post('/jobs/listen') @HttpCode(200) async listen( - @Res() res:Response &{resId?:string}, + @Res() res: Response & { resId?: string }, @Req() req: Request, @Body() body: { _mid: number; data: { id: string } }, ) { diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts index a9b58627e2..4a21f4ea66 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts @@ -7,6 +7,7 @@ import { elapsedTime, initTime } from '../../helpers'; import type { Readable } from 'stream'; import type { UserType, ViewCreateReqType } from 'nocodb-sdk'; import type { LinkToAnotherRecordColumn, User, View } from '~/models'; +import type { NcRequest } from '~/interface/config'; import { findWithIdentifier, generateUniqueName, @@ -35,7 +36,6 @@ import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2'; import { BulkDataAliasService } from '~/services/bulk-data-alias.service'; import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; import { sanitizeColumnName } from '~/helpers'; -import {NcRequest} from "~/interface/config"; @Injectable() export class ImportService { diff --git a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.processor.ts b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.processor.ts index 0b236c67b9..df403e1c00 100644 --- a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.processor.ts +++ b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.processor.ts @@ -1,9 +1,9 @@ import debug from 'debug'; import { Process, Processor } from '@nestjs/bull'; import { Job } from 'bull'; +import type { NcRequest } from '~/interface/config'; import { JOBS_QUEUE, JobTypes } from '~/interface/Jobs'; import { MetaDiffsService } from '~/services/meta-diffs.service'; -import {NcRequest} from "~/interface/config"; @Processor(JOBS_QUEUE) export class MetaSyncProcessor { diff --git a/packages/nocodb/src/services/api-tokens.service.ts b/packages/nocodb/src/services/api-tokens.service.ts index bcd669e57c..caed7622a7 100644 --- a/packages/nocodb/src/services/api-tokens.service.ts +++ b/packages/nocodb/src/services/api-tokens.service.ts @@ -2,11 +2,11 @@ import { Injectable } from '@nestjs/common'; import { AppEvents, extractRolesObj, OrgUserRoles } from 'nocodb-sdk'; import type { User } from '~/models'; import type { ApiTokenReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { NcError } from '~/helpers/catchError'; import { validatePayload } from '~/helpers'; import { ApiToken } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class ApiTokensService { diff --git a/packages/nocodb/src/services/attachments.service.ts b/packages/nocodb/src/services/attachments.service.ts index 7c7e965442..ead5f4c4bb 100644 --- a/packages/nocodb/src/services/attachments.service.ts +++ b/packages/nocodb/src/services/attachments.service.ts @@ -4,13 +4,13 @@ import { Injectable } from '@nestjs/common'; import { nanoid } from 'nanoid'; import slash from 'slash'; import type { AttachmentReqType, FileType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2'; import Local from '~/plugins/storage/Local'; import mimetypes, { mimeIcons } from '~/utils/mimeTypes'; import { PresignedUrl } from '~/models'; import { utf8ify } from '~/helpers/stringHelpers'; -import {NcRequest} from "~/interface/config"; @Injectable() export class AttachmentsService { diff --git a/packages/nocodb/src/services/base-users/base-users.service.ts b/packages/nocodb/src/services/base-users/base-users.service.ts index 6f466cc1bd..b7d7899523 100644 --- a/packages/nocodb/src/services/base-users/base-users.service.ts +++ b/packages/nocodb/src/services/base-users/base-users.service.ts @@ -10,6 +10,7 @@ import { v4 as uuidv4 } from 'uuid'; import * as ejs from 'ejs'; import validator from 'validator'; import type { ProjectUserReqType, UserType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import NocoCache from '~/cache/NocoCache'; import { validatePayload } from '~/helpers'; import Noco from '~/Noco'; @@ -23,7 +24,6 @@ import { Base, BaseUser, User } from '~/models'; import { CacheGetType, CacheScope, MetaTable } from '~/utils/globals'; import { extractProps } from '~/helpers/extractProps'; import { getProjectRolePower } from '~/utils/roleHelper'; -import {NcRequest} from "~/interface/config"; @Injectable() export class BaseUsersService { diff --git a/packages/nocodb/src/services/bases.service.ts b/packages/nocodb/src/services/bases.service.ts index 8a179bb385..a9cadcb7ee 100644 --- a/packages/nocodb/src/services/bases.service.ts +++ b/packages/nocodb/src/services/bases.service.ts @@ -13,6 +13,7 @@ import type { ProjectUpdateReqType, UserType, } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { populateMeta, validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; @@ -24,7 +25,6 @@ import { getToolDir } from '~/utils/nc-config'; import { MetaService } from '~/meta/meta.service'; import { MetaTable } from '~/utils/globals'; import { TablesService } from '~/services/tables.service'; -import {NcRequest} from "~/interface/config"; const nanoid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz_', 4); @@ -37,7 +37,7 @@ export class BasesService { ) {} async baseList(param: { - user: { id: string; roles?: string | Record}; + user: { id: string; roles?: string | Record }; query?: any; }) { const bases = extractRolesObj(param.user?.roles)[OrgUserRoles.SUPER_ADMIN] diff --git a/packages/nocodb/src/services/columns.service.ts b/packages/nocodb/src/services/columns.service.ts index db3126b8d4..18bacbd890 100644 --- a/packages/nocodb/src/services/columns.service.ts +++ b/packages/nocodb/src/services/columns.service.ts @@ -21,6 +21,7 @@ import type { import type CustomKnex from '~/db/CustomKnex'; import type SqlClient from '~/db/sql-client/lib/SqlClient'; import type { BaseModelSqlv2 } from '~/db/BaseModelSqlv2'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import formulaQueryBuilderv2 from '~/db/formulav2/formulaQueryBuilderv2'; import ProjectMgrv2 from '~/db/sql-mgr/v2/ProjectMgrv2'; @@ -47,7 +48,6 @@ import Noco from '~/Noco'; import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; import { MetaTable } from '~/utils/globals'; import { MetaService } from '~/meta/meta.service'; -import {NcRequest} from "~/interface/config"; // todo: move export enum Altered { diff --git a/packages/nocodb/src/services/filters.service.ts b/packages/nocodb/src/services/filters.service.ts index 23e7e9295b..168bcfa7a7 100644 --- a/packages/nocodb/src/services/filters.service.ts +++ b/packages/nocodb/src/services/filters.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import type { FilterReqType, UserType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { Filter, Hook, View } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class FiltersService { diff --git a/packages/nocodb/src/services/form-columns.service.ts b/packages/nocodb/src/services/form-columns.service.ts index cddf40b133..0811314b3d 100644 --- a/packages/nocodb/src/services/form-columns.service.ts +++ b/packages/nocodb/src/services/form-columns.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { FormViewColumn } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class FormColumnsService { diff --git a/packages/nocodb/src/services/forms.service.ts b/packages/nocodb/src/services/forms.service.ts index be76e6f051..31cdb7ec21 100644 --- a/packages/nocodb/src/services/forms.service.ts +++ b/packages/nocodb/src/services/forms.service.ts @@ -5,11 +5,11 @@ import type { UserType, ViewCreateReqType, } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { FormView, View } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class FormsService { diff --git a/packages/nocodb/src/services/galleries.service.ts b/packages/nocodb/src/services/galleries.service.ts index 7f20af63ea..32406ca4c4 100644 --- a/packages/nocodb/src/services/galleries.service.ts +++ b/packages/nocodb/src/services/galleries.service.ts @@ -5,11 +5,11 @@ import type { UserType, ViewCreateReqType, } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { GalleryView, View } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class GalleriesService { diff --git a/packages/nocodb/src/services/grid-columns.service.ts b/packages/nocodb/src/services/grid-columns.service.ts index 6cf59a14e0..e72f23472c 100644 --- a/packages/nocodb/src/services/grid-columns.service.ts +++ b/packages/nocodb/src/services/grid-columns.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import type { GridColumnReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { GridViewColumn } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class GridColumnsService { diff --git a/packages/nocodb/src/services/grids.service.ts b/packages/nocodb/src/services/grids.service.ts index 31fd69d7b1..9c616e209d 100644 --- a/packages/nocodb/src/services/grids.service.ts +++ b/packages/nocodb/src/services/grids.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; import { AppEvents, ViewTypes } from 'nocodb-sdk'; import type { GridUpdateReqType, ViewCreateReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { GridView, View } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class GridsService { diff --git a/packages/nocodb/src/services/hooks.service.ts b/packages/nocodb/src/services/hooks.service.ts index bdd0625e4f..cca803a0ae 100644 --- a/packages/nocodb/src/services/hooks.service.ts +++ b/packages/nocodb/src/services/hooks.service.ts @@ -1,6 +1,7 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import type { HookReqType, HookTestReqType, HookType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; @@ -10,7 +11,6 @@ import { } from '~/helpers/populateSamplePayload'; import { invokeWebhook } from '~/helpers/webhookHelpers'; import { Hook, HookLog, Model } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class HooksService { @@ -38,7 +38,11 @@ export class HooksService { return await HookLog.list({ fk_hook_id: param.hookId }, param.query); } - async hookCreate(param: { tableId: string; hook: HookReqType; req: NcRequest }) { + async hookCreate(param: { + tableId: string; + hook: HookReqType; + req: NcRequest; + }) { validatePayload('swagger.json#/components/schemas/HookReq', param.hook); this.validateHookPayload(param.hook.notification); @@ -71,7 +75,11 @@ export class HooksService { return true; } - async hookUpdate(param: { hookId: string; hook: HookReqType; req: NcRequest }) { + async hookUpdate(param: { + hookId: string; + hook: HookReqType; + req: NcRequest; + }) { validatePayload('swagger.json#/components/schemas/HookReq', param.hook); const hook = await Hook.get(param.hookId); diff --git a/packages/nocodb/src/services/kanbans.service.ts b/packages/nocodb/src/services/kanbans.service.ts index 645cf8bebe..c21880792d 100644 --- a/packages/nocodb/src/services/kanbans.service.ts +++ b/packages/nocodb/src/services/kanbans.service.ts @@ -5,11 +5,11 @@ import type { UserType, ViewCreateReqType, } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { KanbanView, View } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class KanbansService { diff --git a/packages/nocodb/src/services/maps.service.ts b/packages/nocodb/src/services/maps.service.ts index 15d5d775c1..1ea51a41f3 100644 --- a/packages/nocodb/src/services/maps.service.ts +++ b/packages/nocodb/src/services/maps.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; import { AppEvents, ViewTypes } from 'nocodb-sdk'; import type { MapUpdateReqType, UserType, ViewCreateReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { MapView, View } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class MapsService { diff --git a/packages/nocodb/src/services/model-visibilities.service.ts b/packages/nocodb/src/services/model-visibilities.service.ts index ef316f2417..71db96f994 100644 --- a/packages/nocodb/src/services/model-visibilities.service.ts +++ b/packages/nocodb/src/services/model-visibilities.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import type { VisibilityRuleReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { Base, Model, ModelRoleVisibility, View } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class ModelVisibilitiesService { diff --git a/packages/nocodb/src/services/notifications.service.ts b/packages/nocodb/src/services/notifications.service.ts index f50101dc12..864d7481df 100644 --- a/packages/nocodb/src/services/notifications.service.ts +++ b/packages/nocodb/src/services/notifications.service.ts @@ -6,11 +6,11 @@ import type { } from '~/services/app-hooks/interfaces'; import type { OnModuleDestroy, OnModuleInit } from '@nestjs/common'; import type { UserType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { NcError } from '~/helpers/catchError'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { Notification } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class NotificationsService implements OnModuleInit, OnModuleDestroy { diff --git a/packages/nocodb/src/services/org-tokens.service.ts b/packages/nocodb/src/services/org-tokens.service.ts index 399a61367b..a0d499220b 100644 --- a/packages/nocodb/src/services/org-tokens.service.ts +++ b/packages/nocodb/src/services/org-tokens.service.ts @@ -2,12 +2,12 @@ import { Injectable } from '@nestjs/common'; import { AppEvents, extractRolesObj, OrgUserRoles } from 'nocodb-sdk'; import type { User } from '~/models'; import type { ApiTokenReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { ApiToken } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class OrgTokensService { diff --git a/packages/nocodb/src/services/org-users.service.ts b/packages/nocodb/src/services/org-users.service.ts index d5dd80ab53..bfa8f694fe 100644 --- a/packages/nocodb/src/services/org-users.service.ts +++ b/packages/nocodb/src/services/org-users.service.ts @@ -8,6 +8,7 @@ import { import { v4 as uuidv4 } from 'uuid'; import validator from 'validator'; import type { UserType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { BaseUsersService } from '~/services/base-users/base-users.service'; import { NC_APP_SETTINGS } from '~/constants'; @@ -19,7 +20,6 @@ import { BaseUser, Store, SyncSource, User } from '~/models'; import Noco from '~/Noco'; import { MetaTable } from '~/utils/globals'; -import {NcRequest} from "~/interface/config"; @Injectable() export class OrgUsersService { @@ -194,7 +194,10 @@ export class OrgUsersService { NcError.notImplemented(); } - async userInviteResend(param: { userId: string; req: NcRequest }): Promise { + async userInviteResend(param: { + userId: string; + req: NcRequest; + }): Promise { const user = await User.get(param.userId); if (!user) { diff --git a/packages/nocodb/src/services/plugins.service.ts b/packages/nocodb/src/services/plugins.service.ts index 8dd1fac0ea..9ee7e7d17e 100644 --- a/packages/nocodb/src/services/plugins.service.ts +++ b/packages/nocodb/src/services/plugins.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import type { PluginTestReqType, PluginType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2'; import { Plugin } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class PluginsService { diff --git a/packages/nocodb/src/services/shared-bases.service.ts b/packages/nocodb/src/services/shared-bases.service.ts index 894bb4b2e1..057f1992dd 100644 --- a/packages/nocodb/src/services/shared-bases.service.ts +++ b/packages/nocodb/src/services/shared-bases.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import { v4 as uuidv4 } from 'uuid'; import { ConfigService } from '@nestjs/config'; -import type {AppConfig, NcRequest} from '~/interface/config'; +import type { AppConfig, NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; diff --git a/packages/nocodb/src/services/sorts.service.ts b/packages/nocodb/src/services/sorts.service.ts index df0bff9dff..1443dc4826 100644 --- a/packages/nocodb/src/services/sorts.service.ts +++ b/packages/nocodb/src/services/sorts.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import type { SortReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { Sort } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class SortsService { diff --git a/packages/nocodb/src/services/sources.service.ts b/packages/nocodb/src/services/sources.service.ts index 387866b7a6..9c96d25c3b 100644 --- a/packages/nocodb/src/services/sources.service.ts +++ b/packages/nocodb/src/services/sources.service.ts @@ -1,13 +1,13 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import type { BaseReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { populateMeta, validatePayload } from '~/helpers'; import { populateRollupColumnAndHideLTAR } from '~/helpers/populateMeta'; import { syncBaseMigration } from '~/helpers/syncMigration'; import { Base, Source } from '~/models'; import { NcError } from '~/helpers/catchError'; -import {NcRequest} from "~/interface/config"; @Injectable() export class SourcesService { diff --git a/packages/nocodb/src/services/sync.service.ts b/packages/nocodb/src/services/sync.service.ts index 5524216195..19ce24a740 100644 --- a/packages/nocodb/src/services/sync.service.ts +++ b/packages/nocodb/src/services/sync.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { NcError } from '~/helpers/catchError'; import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { Base, SyncSource } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class SyncService { diff --git a/packages/nocodb/src/services/tables.service.ts b/packages/nocodb/src/services/tables.service.ts index 8d21d0873c..3ccd278b0d 100644 --- a/packages/nocodb/src/services/tables.service.ts +++ b/packages/nocodb/src/services/tables.service.ts @@ -18,6 +18,7 @@ import type { TableReqType, UserType, } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import ProjectMgrv2 from '~/db/sql-mgr/v2/ProjectMgrv2'; import { NcError } from '~/helpers/catchError'; @@ -29,7 +30,6 @@ import { Base, Column, Model, ModelRoleVisibility } from '~/models'; import Noco from '~/Noco'; import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; import { sanitizeColumnName, validatePayload } from '~/helpers'; -import {NcRequest} from "~/interface/config"; @Injectable() export class TablesService { diff --git a/packages/nocodb/src/services/users/users.service.ts b/packages/nocodb/src/services/users/users.service.ts index 4076b5be53..a87d3f595f 100644 --- a/packages/nocodb/src/services/users/users.service.ts +++ b/packages/nocodb/src/services/users/users.service.ts @@ -13,6 +13,7 @@ import type { SignUpReqType, UserType, } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { genJwt, setTokenCookie } from '~/services/users/helpers'; import { NC_APP_SETTINGS } from '~/constants'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; @@ -26,7 +27,6 @@ import NcPluginMgrv2 from '~/helpers/NcPluginMgrv2'; import { NcError } from '~/helpers/catchError'; import { BasesService } from '~/services/bases.service'; import { extractProps } from '~/helpers/extractProps'; -import {NcRequest} from "~/interface/config"; @Injectable() export class UsersService { diff --git a/packages/nocodb/src/services/view-columns.service.ts b/packages/nocodb/src/services/view-columns.service.ts index 09daf25abb..333ebfbba5 100644 --- a/packages/nocodb/src/services/view-columns.service.ts +++ b/packages/nocodb/src/services/view-columns.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@nestjs/common'; import { AppEvents } from 'nocodb-sdk'; import type { ViewColumnReqType, ViewColumnUpdateReqType } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { View } from '~/models'; -import {NcRequest} from "~/interface/config"; @Injectable() export class ViewColumnsService { diff --git a/packages/nocodb/src/services/views.service.ts b/packages/nocodb/src/services/views.service.ts index 664c5e182d..7cb0ab0a21 100644 --- a/packages/nocodb/src/services/views.service.ts +++ b/packages/nocodb/src/services/views.service.ts @@ -5,11 +5,11 @@ import type { UserType, ViewUpdateReqType, } from 'nocodb-sdk'; +import type { NcRequest } from '~/interface/config'; import { AppHooksService } from '~/services/app-hooks/app-hooks.service'; import { validatePayload } from '~/helpers'; import { NcError } from '~/helpers/catchError'; import { Model, ModelRoleVisibility, View } from '~/models'; -import {NcRequest} from "~/interface/config"; // todo: move async function xcVisibilityMetaGet(param: { @@ -70,7 +70,7 @@ export class ViewsService { async viewList(param: { tableId: string; user: { - roles?: Record | string, + roles?: Record | string; base_roles?: Record; }; }) { @@ -187,7 +187,11 @@ export class ViewsService { return result; } - async shareViewDelete(param: { viewId: string; user: UserType; req: NcRequest }) { + async shareViewDelete(param: { + viewId: string; + user: UserType; + req: NcRequest; + }) { const view = await View.get(param.viewId); if (!view) { diff --git a/packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts b/packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts index 8010f172f0..26327d8887 100644 --- a/packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts +++ b/packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts @@ -2,9 +2,9 @@ import { Injectable } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { extractRolesObj, ProjectRoles } from 'nocodb-sdk'; import { Strategy } from 'passport-custom'; +import type { Request } from 'express'; import { ApiToken, BaseUser, User } from '~/models'; import { sanitiseUserObj } from '~/utils'; -import {Request} from 'express' @Injectable() export class AuthTokenStrategy extends PassportStrategy(Strategy, 'authtoken') { diff --git a/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts b/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts index 4db70ccb27..022fc3b67b 100644 --- a/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts +++ b/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts @@ -2,9 +2,8 @@ import { Injectable, UnauthorizedException } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { Strategy } from 'passport-custom'; import { extractRolesObj } from 'nocodb-sdk'; +import type { Request } from 'express'; import { Base } from '~/models'; -import {Request} from 'express' - @Injectable() export class BaseViewStrategy extends PassportStrategy(Strategy, 'base-view') { diff --git a/packages/nocodb/src/strategies/google.strategy/google.strategy.ts b/packages/nocodb/src/strategies/google.strategy/google.strategy.ts index 6d310d6491..f7eaea5b73 100644 --- a/packages/nocodb/src/strategies/google.strategy/google.strategy.ts +++ b/packages/nocodb/src/strategies/google.strategy/google.strategy.ts @@ -3,13 +3,13 @@ import { Injectable, Optional } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { Strategy } from 'passport-google-oauth20'; import bcrypt from 'bcryptjs'; +import type { Request } from 'express'; import type { VerifyCallback } from 'passport-google-oauth20'; import type { FactoryProvider } from '@nestjs/common/interfaces/modules/provider.interface'; import Noco from '~/Noco'; import { UsersService } from '~/services/users/users.service'; import { BaseUser, Plugin, User } from '~/models'; import { sanitiseUserObj } from '~/utils'; -import {Request} from 'express' @Injectable() export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { diff --git a/packages/nocodb/src/types/express.d.ts b/packages/nocodb/src/types/express.d.ts index c74cd6cca6..dc68aac2cc 100644 --- a/packages/nocodb/src/types/express.d.ts +++ b/packages/nocodb/src/types/express.d.ts @@ -1,23 +1,4 @@ -import * as express from 'express'; -import { Express } from 'express-serve-static-core'; import type { UserType } from 'nocodb-sdk'; -import { User } from '~/models'; - -// declare global { -// namespace Express { -// interface Request { -// id?: string; -// ncWorkspaceId?: string; -// ncProjectId?: string; -// user?: any; -// } -// } -// } -// -// interface TokenData { -// userId: string; -// iat: string; -// } declare module 'express-serve-static-core' { interface Request { ncWorkspaceId?: string; diff --git a/packages/nocodb/tests/unit/test_meta.db b/packages/nocodb/tests/unit/test_meta.db index 767c6c59c5a022200585cbdb1ddd37828938fef9..f348c5026bea9263c38b8dc0b2f722bacf06d973 100644 GIT binary patch delta 24280 zcmeHv33waT)#%J<8O@BOvEw9)<2Y8FIGZC!i?wCJ*}-IwlR!wo(K3={t(N391Z8B$ zS=a&wZYcXtAS_Koa9R~wN+`5+V@dlL+Om|t{R^}N3Y47y@63#3TZ$cG%6s4c-uL8B z^31t&?>+b4v)yyfog-!F&-}jX zPq+6yPAus=t-6xhO_L&cUqAO*542=ZN>BBFbb1DK8ujY&l#k55kXOBmC^;`?eI7O?U`nPr)4ghRv}5!FIB1*cq%``$z3VFbmgf`)Vqt zkyjqE&T!14`!1`PrVy@eeOFaX7O!gij#pHQS2caFRZJJJ41GoVX({2kIVB1OR!%9} z0$lqVSD3>E;N%kd0B~bxOah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u$m}kxa diff --git a/packages/nocodb/tests/unit/tsconfig.ee.json b/packages/nocodb/tests/unit/tsconfig.ee.json index 8263593f20..adf6aeec5e 100644 --- a/packages/nocodb/tests/unit/tsconfig.ee.json +++ b/packages/nocodb/tests/unit/tsconfig.ee.json @@ -50,7 +50,8 @@ "dom" ], "types": [ - "mocha", "node" + "mocha", + "node" ], "typeRoots": [ "../../src/types", diff --git a/packages/nocodb/tests/unit/tsconfig.json b/packages/nocodb/tests/unit/tsconfig.json index 35ec0b3c1f..377a5d6e71 100644 --- a/packages/nocodb/tests/unit/tsconfig.json +++ b/packages/nocodb/tests/unit/tsconfig.json @@ -50,9 +50,9 @@ "dom" ], "types": [ - "mocha", "node" + "mocha", + "node" ], - "typeRoots": [ "../../src/types", "../../node_modules/@types" diff --git a/packages/nocodb/tsconfig.json b/packages/nocodb/tsconfig.json index 7e2cd8aa22..a9f79b3ffb 100644 --- a/packages/nocodb/tsconfig.json +++ b/packages/nocodb/tsconfig.json @@ -1,6 +1,8 @@ { "ts-node": { - "require": ["tsconfig-paths/register"] + "require": [ + "tsconfig-paths/register" + ] }, "compilerOptions": { "module": "commonjs", @@ -23,10 +25,19 @@ "resolveJsonModule": true, "esModuleInterop": true, "paths": { - "src/*": ["./src/*"], - "~/*": ["./src/*"], - "@/*": ["./src/*"] + "src/*": [ + "./src/*" + ], + "~/*": [ + "./src/*" + ], + "@/*": [ + "./src/*" + ] }, - "typeRoots": ["./src/types","./node_modules/@types", ] + "typeRoots": [ + "./src/types", + "./node_modules/@types" + ] } }