@@ -27,7 +27,6 @@ import { SentryInterceptor } from '../../interceptors/index.js';
2727import { SuccessResponse } from '../../microservices/saas-microservice/data-structures/common-responce.ds.js' ;
2828import { AmplitudeService } from '../amplitude/amplitude.service.js' ;
2929import { FoundGroupResponseDto } from '../group/dto/found-group-response.dto.js' ;
30- import { IComplexPermission } from '../permission/permission.interface.js' ;
3130import { FindUserDs } from '../user/application/data-structures/find-user.ds.js' ;
3231import { FoundUserDto } from '../user/dto/found-user.dto.js' ;
3332import { CreateConnectionDs } from './application/data-structures/create-connection.ds.js' ;
@@ -291,7 +290,7 @@ export class ConnectionController {
291290 @UserId ( ) userId : string ,
292291 @MasterPassword ( ) masterPwd : string ,
293292 ) : Promise < UpdatedConnectionResponseDTO > {
294- const errors = [ ] ;
293+ const errors : string [ ] = [ ] ;
295294 if ( updateConnectionDto . masterEncryption && ! masterPwd ) {
296295 errors . push ( Messages . MASTER_PASSWORD_REQUIRED ) ;
297296 }
@@ -457,7 +456,7 @@ export class ConnectionController {
457456 @QueryUuid ( 'groupId' ) groupId : string ,
458457 @UserId ( ) userId : string ,
459458 @MasterPassword ( ) masterPwd : string ,
460- ) : Promise < IComplexPermission > {
459+ ) : Promise < FoundPermissionsInConnectionDs > {
461460 if ( ! connectionId || ! groupId ) {
462461 throw new BadRequestException ( Messages . PARAMETER_MISSING ) ;
463462 }
@@ -481,7 +480,7 @@ export class ConnectionController {
481480 @QueryUuid ( 'groupId' ) groupId : string ,
482481 @UserId ( ) userId : string ,
483482 @MasterPassword ( ) masterPwd : string ,
484- ) : Promise < IComplexPermission > {
483+ ) : Promise < FoundPermissionsInConnectionDs > {
485484 if ( ! connectionId || ! groupId ) {
486485 throw new BadRequestException ( Messages . PARAMETER_MISSING ) ;
487486 }
@@ -537,10 +536,11 @@ export class ConnectionController {
537536 } ;
538537 try {
539538 await validateCreateConnectionData ( inputData ) ;
540- } catch ( e ) {
539+ } catch ( e : unknown ) {
540+ const err = e as { response ?: { message ?: string } ; message ?: string } ;
541541 return {
542542 result : false ,
543- message : e ?. response ?. message || e ?. message || Messages . CONNECTION_TYPE_INVALID ,
543+ message : err ?. response ?. message || err ?. message || Messages . CONNECTION_TYPE_INVALID ,
544544 } ;
545545 }
546546 const result = await this . testConnectionUseCase . execute ( inputData , InTransactionEnum . OFF ) ;
0 commit comments