Fix FRE-5402: Add missing @shieldai/removebrokers dependency and fix compilation blockers
- Add @shieldai/removebrokers workspace dependency to API package.json - Fix misleading error message: 'Admin access required' -> 'Support access required' - Export RemovalRequest, InfoBroker, BrokerListing types from @shieldai/db - Export RemovalStatus, RemovalMethod, BrokerCategory enums from @shieldai/db - Fix BrokerAlertPipeline: correlationPipeline -> correlationService.ingestGenericAlert - Add @shieldai/correlation dependency to removebrokers package - Fix removalUrl null vs undefined type mismatch in RemoveBrokersService - Fix shared-billing package.json typo: @shieldsai -> @shieldai for shared-notifications
This commit is contained in:
@@ -9,23 +9,28 @@
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"lint": "eslint src/"
|
||||
},
|
||||
"dependencies": {
|
||||
"dependencies": {
|
||||
"@fastify/cors": "^10.0.1",
|
||||
"@fastify/helmet": "^13.0.1",
|
||||
"@fastify/multipart": "^7.7.3",
|
||||
"@fastify/rate-limit": "^9.0.0",
|
||||
"@fastify/sensible": "^6.0.1",
|
||||
"fastify-raw-body": "^5.0.0",
|
||||
"@fastify/swagger": "^9.4.0",
|
||||
"@fastify/swagger-ui": "^5.2.0",
|
||||
"@shieldai/correlation": "workspace:*",
|
||||
"@shieldai/darkwatch": "workspace:*",
|
||||
"@shieldai/db": "workspace:*",
|
||||
"@shieldai/monitoring": "workspace:*",
|
||||
"@shieldai/removebrokers": "workspace:*",
|
||||
"@shieldai/report": "workspace:*",
|
||||
"@shieldsai/shared-auth": "workspace:*",
|
||||
"@shieldai/shared-notifications": "workspace:*",
|
||||
"@shieldai/types": "workspace:*",
|
||||
"@shieldai/voiceprint": "workspace:*",
|
||||
"bullmq": "^5.24.0",
|
||||
"fastify": "^5.2.0",
|
||||
"ioredis": "^5.4.0"
|
||||
"ioredis": "^5.4.0",
|
||||
"jsonwebtoken": "^9.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitest/coverage-v8": "^4.1.5",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify';
|
||||
import { prisma } from '@shieldai/db';
|
||||
import { RemovalStatus, Severity, AlertCategory, EntityTypes } from '@shieldai/types';
|
||||
import type { RemovalStatus as PrismaRemovalStatus } from '@shieldai/db';
|
||||
import {
|
||||
removeBrokersService,
|
||||
removeBrokersScheduler,
|
||||
@@ -313,7 +314,7 @@ export async function removebrokersRoutes(fastify: FastifyInstance) {
|
||||
|
||||
await prisma.removalRequest.update({
|
||||
where: { id },
|
||||
data: { status: RemovalStatus.CANCELLED },
|
||||
data: { status: RemovalStatus.CANCELLED as PrismaRemovalStatus },
|
||||
});
|
||||
|
||||
return reply.send({
|
||||
@@ -336,7 +337,7 @@ export async function removebrokersRoutes(fastify: FastifyInstance) {
|
||||
}
|
||||
|
||||
if (authReq.user.role !== 'support') {
|
||||
return reply.code(403).send({ error: 'Admin access required' });
|
||||
return reply.code(403).send({ error: 'Support access required' });
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user