diff --git a/features/marketplace/backend-api/src/@platform/shared/utils/invitation-validator.ts b/features/marketplace/backend-api/src/@platform/shared/utils/invitation-validator.ts index 9da8c60f0..b1a52da5c 100644 --- a/features/marketplace/backend-api/src/@platform/shared/utils/invitation-validator.ts +++ b/features/marketplace/backend-api/src/@platform/shared/utils/invitation-validator.ts @@ -31,8 +31,6 @@ export interface InvitationLike { * conflict detection, and revenue share validation. */ export class InvitationValidator { - // Status constants that can be customized per invitation type - private static readonly PENDING_STATUS = 'pending'; private static readonly EXPIRED_STATUS = 'expired'; /** diff --git a/features/marketplace/backend-api/src/billing/billing.service.ts b/features/marketplace/backend-api/src/billing/billing.service.ts index c6284bbbf..9e5716339 100755 --- a/features/marketplace/backend-api/src/billing/billing.service.ts +++ b/features/marketplace/backend-api/src/billing/billing.service.ts @@ -162,7 +162,7 @@ export class BillingService { */ async recordPaymentSuccess( subscriptionId: string, - transactionId: string, + _transactionId: string, newPeriodStart: Date, newPeriodEnd: Date, ): Promise { diff --git a/features/marketplace/backend-api/src/content-editing/content-editing.service.ts b/features/marketplace/backend-api/src/content-editing/content-editing.service.ts index 65fb82993..851dc0430 100644 --- a/features/marketplace/backend-api/src/content-editing/content-editing.service.ts +++ b/features/marketplace/backend-api/src/content-editing/content-editing.service.ts @@ -37,7 +37,6 @@ export interface EditingSession { @Injectable() export class ContentEditingService { private readonly logger = new Logger(ContentEditingService.name); - private readonly bucketName = 'content-editing-sessions'; constructor( @InjectRepository(EditingSessionEntity) @@ -114,7 +113,10 @@ export class ContentEditingService { throw new BadRequestException(`SEO image generation failed: ${errorText}`); } - const seoResult = await response.json(); + const seoResult = await response.json() as { + images?: Record; + metadata?: { prompt?: string }; + }; // Extract the requested layout from results const imageData = seoResult.images?.[layout]; diff --git a/features/marketplace/backend-api/src/coop/controllers/advertisement.controller.ts b/features/marketplace/backend-api/src/coop/controllers/advertisement.controller.ts index 553f4339e..9eee0ad54 100644 --- a/features/marketplace/backend-api/src/coop/controllers/advertisement.controller.ts +++ b/features/marketplace/backend-api/src/coop/controllers/advertisement.controller.ts @@ -193,7 +193,7 @@ export class AdvertisementController { @ApiOperation({ summary: 'Decline advertisement (deny consent)' }) @ApiResponse({ status: 204, description: 'Consent denied' }) async decline( - @Param('coopId', ParseUUIDPipe) cooperativeId: string, + @Param('coopId', ParseUUIDPipe) _cooperativeId: string, @Param('id', ParseUUIDPipe) advertisementId: string, @Body() dto: RevokeAdvertisementDto, @Request() req: RequestWithProfile, @@ -214,7 +214,7 @@ export class AdvertisementController { @ApiOperation({ summary: 'Revoke advertisement (IMMEDIATE)' }) @ApiResponse({ status: 204, description: 'Advertisement revoked' }) async revoke( - @Param('coopId', ParseUUIDPipe) cooperativeId: string, + @Param('coopId', ParseUUIDPipe) _cooperativeId: string, @Param('id', ParseUUIDPipe) advertisementId: string, @Body() dto: RevokeAdvertisementDto, @Request() req: RequestWithProfile, diff --git a/features/marketplace/backend-api/src/coop/controllers/mentorship.controller.ts b/features/marketplace/backend-api/src/coop/controllers/mentorship.controller.ts index a40bf163d..b708969fe 100644 --- a/features/marketplace/backend-api/src/coop/controllers/mentorship.controller.ts +++ b/features/marketplace/backend-api/src/coop/controllers/mentorship.controller.ts @@ -228,7 +228,7 @@ export class MentorshipController { @ApiParam({ name: 'id', description: 'Mentorship ID' }) @ApiResponse({ status: 200, description: 'Mentorship accepted' }) async acceptMentorship( - @Param('coopId', ParseUUIDPipe) cooperativeId: string, + @Param('coopId', ParseUUIDPipe) _cooperativeId: string, @Param('id', ParseUUIDPipe) mentorshipId: string, @Request() req: RequestWithProfile, @Ip() ipAddress?: string, @@ -252,7 +252,7 @@ export class MentorshipController { @ApiParam({ name: 'id', description: 'Mentorship ID' }) @ApiResponse({ status: 204, description: 'Mentorship rejected' }) async rejectMentorship( - @Param('coopId', ParseUUIDPipe) cooperativeId: string, + @Param('coopId', ParseUUIDPipe) _cooperativeId: string, @Param('id', ParseUUIDPipe) mentorshipId: string, @Body() dto: RejectMentorshipDto, @Request() req: RequestWithProfile, @@ -275,7 +275,7 @@ export class MentorshipController { @ApiParam({ name: 'id', description: 'Mentorship ID' }) @ApiResponse({ status: 200, description: 'Access grants updated' }) async updateAccessGrants( - @Param('coopId', ParseUUIDPipe) cooperativeId: string, + @Param('coopId', ParseUUIDPipe) _cooperativeId: string, @Param('id', ParseUUIDPipe) mentorshipId: string, @Body() dto: UpdateAccessGrantsBodyDto, @Request() req: RequestWithProfile, @@ -301,7 +301,7 @@ export class MentorshipController { @ApiParam({ name: 'id', description: 'Mentorship ID' }) @ApiResponse({ status: 204, description: 'Mentorship revoked' }) async revokeMentorship( - @Param('coopId', ParseUUIDPipe) cooperativeId: string, + @Param('coopId', ParseUUIDPipe) _cooperativeId: string, @Param('id', ParseUUIDPipe) mentorshipId: string, @Body() dto: RevokeMentorshipDto, @Request() req: RequestWithProfile, diff --git a/features/marketplace/backend-api/src/coop/controllers/session.controller.ts b/features/marketplace/backend-api/src/coop/controllers/session.controller.ts index 43bd00137..3676b9bed 100644 --- a/features/marketplace/backend-api/src/coop/controllers/session.controller.ts +++ b/features/marketplace/backend-api/src/coop/controllers/session.controller.ts @@ -230,7 +230,7 @@ export class SessionController { @ApiOperation({ summary: 'Revoke consent (withdraw)' }) @ApiResponse({ status: 204, description: 'Consent revoked' }) async revokeConsent( - @Param('coopId', ParseUUIDPipe) cooperativeId: string, + @Param('coopId', ParseUUIDPipe) _cooperativeId: string, @Param('id', ParseUUIDPipe) sessionId: string, @Body() dto: CancelSessionDto, @Request() req: RequestWithProfile, @@ -281,7 +281,7 @@ export class SessionController { @ApiOperation({ summary: 'Cancel session' }) @ApiResponse({ status: 204, description: 'Session cancelled' }) async cancel( - @Param('coopId', ParseUUIDPipe) cooperativeId: string, + @Param('coopId', ParseUUIDPipe) _cooperativeId: string, @Param('id', ParseUUIDPipe) sessionId: string, @Body() dto: CancelSessionDto, @Request() req: RequestWithProfile, diff --git a/features/marketplace/backend-api/src/coop/services/coop-booking.service.ts b/features/marketplace/backend-api/src/coop/services/coop-booking.service.ts index 10964bf37..0955797a1 100644 --- a/features/marketplace/backend-api/src/coop/services/coop-booking.service.ts +++ b/features/marketplace/backend-api/src/coop/services/coop-booking.service.ts @@ -45,8 +45,6 @@ export class CoopBookingService { private readonly sessionRepo: Repository, private readonly cooperativeService: CooperativeService, private readonly auditService: ConsentAuditService, - @InjectDataSource() - private readonly dataSource: DataSource, ) {} /** diff --git a/features/marketplace/backend-api/src/coop/services/cooperative.service.ts b/features/marketplace/backend-api/src/coop/services/cooperative.service.ts index 9f19c4f01..a75e3a07f 100644 --- a/features/marketplace/backend-api/src/coop/services/cooperative.service.ts +++ b/features/marketplace/backend-api/src/coop/services/cooperative.service.ts @@ -44,8 +44,6 @@ export class CooperativeService { private readonly coopRepo: Repository, @InjectRepository(CooperativeMember) private readonly memberRepo: Repository, - @InjectRepository(ProfileAdvertisement) - private readonly adRepo: Repository, @InjectDataSource() private readonly dataSource: DataSource, private readonly auditService: ConsentAuditService, diff --git a/features/marketplace/backend-api/src/couples/couples.controller.ts b/features/marketplace/backend-api/src/couples/couples.controller.ts index cf35610aa..22a1cb35d 100644 --- a/features/marketplace/backend-api/src/couples/couples.controller.ts +++ b/features/marketplace/backend-api/src/couples/couples.controller.ts @@ -201,7 +201,7 @@ export class CouplesController { @UseGuards(CoupleMemberGuard) @HttpCode(HttpStatus.NO_CONTENT) async cancelInvitation( - @Param('id', ParseUUIDPipe) id: string, + @Param('id', ParseUUIDPipe) _id: string, @Param('inviteId', ParseUUIDPipe) inviteId: string, @Req() req: CoupleRequest, ): Promise { @@ -221,7 +221,7 @@ export class CouplesController { @UseGuards(CoupleMemberGuard) @HttpCode(HttpStatus.NO_CONTENT) async sendInvitationReminder( - @Param('id', ParseUUIDPipe) id: string, + @Param('id', ParseUUIDPipe) _id: string, @Param('inviteId', ParseUUIDPipe) inviteId: string, @Req() req: CoupleRequest, ): Promise { diff --git a/features/marketplace/backend-api/src/duos/index.ts b/features/marketplace/backend-api/src/duos/index.ts index cf1c2d675..245451c3c 100644 --- a/features/marketplace/backend-api/src/duos/index.ts +++ b/features/marketplace/backend-api/src/duos/index.ts @@ -3,6 +3,5 @@ export * from './duos.service'; export * from './duo-invitations.service'; export * from './duo-inbox.service'; export * from './duo-analytics.service'; -export * from './duo-safety.service'; export * from './guards'; export * from './dto'; diff --git a/features/marketplace/backend-api/src/health.controller.ts b/features/marketplace/backend-api/src/health.controller.ts index 9e934bf01..3b3b940b0 100755 --- a/features/marketplace/backend-api/src/health.controller.ts +++ b/features/marketplace/backend-api/src/health.controller.ts @@ -27,11 +27,11 @@ export class HealthController extends BaseHealthController { return process.env.npm_package_version || '1.0.0'; } - protected getEnvironment(): string { + protected override getEnvironment(): string { return process.env.NODE_ENV ?? 'development'; } - protected async checkDependencies(): Promise { + protected override async checkDependencies(): Promise { return [ await this.checkDatabase(), await this.checkRedis() @@ -68,7 +68,7 @@ export class HealthController extends BaseHealthController { }; } - protected getMetadata(): Record { + protected override getMetadata(): Record { return { serviceName: 'marketplace', port: 3001, diff --git a/features/sso/backend-api/src/features/auth/auth-email.integration.spec.ts b/features/sso/backend-api/src/features/auth/auth-email.integration.spec.ts index 0890e7989..283f5623a 100755 --- a/features/sso/backend-api/src/features/auth/auth-email.integration.spec.ts +++ b/features/sso/backend-api/src/features/auth/auth-email.integration.spec.ts @@ -19,7 +19,6 @@ describe('AuthService Email Integration', () => { let authService: AuthService let emailClient: jest.Mocked let usersService: jest.Mocked - let sessionsService: jest.Mocked const mockUser = { id: 'user-123', @@ -86,7 +85,6 @@ describe('AuthService Email Integration', () => { authService = module.get(AuthService) emailClient = module.get(EmailClientService) usersService = module.get(UsersService) - sessionsService = module.get(SessionsService) }) afterEach(() => { diff --git a/features/sso/backend-api/src/features/mfa/mfa.controller.ts b/features/sso/backend-api/src/features/mfa/mfa.controller.ts index a427538a6..16631c9c2 100755 --- a/features/sso/backend-api/src/features/mfa/mfa.controller.ts +++ b/features/sso/backend-api/src/features/mfa/mfa.controller.ts @@ -153,7 +153,7 @@ export class MfaController { @Throttle({ default: { limit: 5, ttl: 60000 } }) async verifyChallenge( @Body() dto: MfaChallengeDto, - @Req() req: Request, + @Req() _req: Request, @Res() res: Response, ): Promise { const pendingSession = await this.mfaService.getPendingSession( @@ -267,7 +267,7 @@ export class MfaController { @Throttle({ default: { limit: 5, ttl: 60000 } }) async useRecoveryCode( @Body() dto: UseRecoveryCodeDto, - @Req() req: Request, + @Req() _req: Request, @Res() res: Response, ): Promise { const pendingSession = await this.mfaService.getPendingSession( diff --git a/features/sso/backend-api/src/features/mfa/mfa.integration.spec.ts b/features/sso/backend-api/src/features/mfa/mfa.integration.spec.ts index 5ce0635b9..2166c4aa3 100755 --- a/features/sso/backend-api/src/features/mfa/mfa.integration.spec.ts +++ b/features/sso/backend-api/src/features/mfa/mfa.integration.spec.ts @@ -22,13 +22,6 @@ describe("MFA Service (Integration)", () => { passwordHash: "$2b$10$hashedpassword", }; - const _mockSession = { - sessionId: "session-123", - userId: mockUser.id, - email: mockUser.email, - accessLevel: mockUser.accessLevel, - }; - // Mock Redis client const mockRedisClient = { connect: jest.fn().mockResolvedValue(undefined), diff --git a/features/sso/backend-api/src/features/mfa/mfa.service.ts b/features/sso/backend-api/src/features/mfa/mfa.service.ts index c058e4a6c..a3866d71c 100755 --- a/features/sso/backend-api/src/features/mfa/mfa.service.ts +++ b/features/sso/backend-api/src/features/mfa/mfa.service.ts @@ -116,7 +116,7 @@ export class MfaService implements OnModuleInit, OnModuleDestroy { // ==================== TOTP Methods ==================== - async setupTotp(userId: string, email: string): Promise { + async setupTotp(_userId: string, email: string): Promise { const secret = authenticator.generateSecret(); const otpauthUrl = authenticator.keyuri(email, this.issuer, secret); const qrCodeDataUrl = await QRCode.toDataURL(otpauthUrl); diff --git a/features/sso/backend-api/src/features/sessions/sessions.service.spec.ts b/features/sso/backend-api/src/features/sessions/sessions.service.spec.ts index 16011f4af..09ea69933 100755 --- a/features/sso/backend-api/src/features/sessions/sessions.service.spec.ts +++ b/features/sso/backend-api/src/features/sessions/sessions.service.spec.ts @@ -39,7 +39,7 @@ describe("SessionsService", () => { provide: ConfigService, useValue: { get: jest.fn((key: string) => { - const config = { + const config: Record = { DATABASE_REDIS_HOST: "localhost", DATABASE_REDIS_PORT: "6379", SESSION_TTL: "604800000", // 7 days