feat: SolaceNet gateway rails, IRU marketplace hardening, and docs
- Gateway adapter registry, rails routes, optional SOLACENET_GATEWAY_RAILS_ENFORCE; HTTP integration tests. - IRU marketplace: rate limits, public routes, notifications/SMTP env docs; marketplace UI constants and flows. - Quantum proxy legacy protocol types; debank/tezos/GSDS touch-ups; .env.example operator notes. - SolaceNet doc set (gaps, runbooks, telecom schema example). Tests: npm run test:iru-marketplace, npm run test:gateway (pass). Note: full-repo tsc still reports unrelated legacy errors outside this change set. Made-with: Cursor
This commit is contained in:
@@ -9,7 +9,7 @@ async function main() {
|
||||
name: 'DBIS Gateway Microservices',
|
||||
version: '1.0.0',
|
||||
description:
|
||||
'Regulated-grade integration fabric for SWIFT, DTC/DTCC, and extensible financial rails',
|
||||
'SolaceNet-maintained gateway rail adapters and HTTP surface; many connectors are scaffolds until production APIs (see marketplace copy + PROTOCOL_GAPS_CHECKLIST). Governance: docs/solacenet/RAIL_AND_PROTOCOL_GOVERNANCE.md',
|
||||
defaultState: 'enabled' as any,
|
||||
dependencies: ['ledger', 'iso20022', 'reconciliation'].filter(Boolean),
|
||||
});
|
||||
|
||||
63
scripts/seed-solacenet-gateway-provider.ts
Normal file
63
scripts/seed-solacenet-gateway-provider.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Upsert solacenet_provider_connector for the gateway rail plane (PG-SN-002).
|
||||
* Run: npx ts-node -r tsconfig-paths/register scripts/seed-solacenet-gateway-provider.ts
|
||||
* Requires DATABASE_URL and prisma client.
|
||||
*/
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import type { Prisma } from '@prisma/client';
|
||||
import prisma from '@/shared/database/prisma';
|
||||
import { logger } from '@/infrastructure/monitoring/logger';
|
||||
|
||||
const CONNECTOR_ID = 'dbis-gateway-rail-plane';
|
||||
|
||||
async function main() {
|
||||
const metadata: Prisma.InputJsonValue = {
|
||||
capabilityId: 'gateway-microservices',
|
||||
governanceDoc: 'docs/solacenet/RAIL_AND_PROTOCOL_GOVERNANCE.md',
|
||||
note: 'Logical provider for SolaceNet-maintained gateway rail adapters; bindings use solacenet_capability_binding.',
|
||||
};
|
||||
|
||||
const existing = await prisma.solacenet_provider_connector.findUnique({
|
||||
where: { connectorId: CONNECTOR_ID },
|
||||
});
|
||||
|
||||
if (existing) {
|
||||
await prisma.solacenet_provider_connector.update({
|
||||
where: { connectorId: CONNECTOR_ID },
|
||||
data: {
|
||||
name: 'DBIS Gateway Rail Plane (SolaceNet)',
|
||||
providerType: 'gateway-rail',
|
||||
status: 'active',
|
||||
metadata,
|
||||
},
|
||||
});
|
||||
logger.info('Updated solacenet_provider_connector', { connectorId: CONNECTOR_ID });
|
||||
return;
|
||||
}
|
||||
|
||||
await prisma.solacenet_provider_connector.create({
|
||||
data: {
|
||||
id: uuidv4(),
|
||||
connectorId: CONNECTOR_ID,
|
||||
name: 'DBIS Gateway Rail Plane (SolaceNet)',
|
||||
providerType: 'gateway-rail',
|
||||
status: 'active',
|
||||
metadata,
|
||||
},
|
||||
});
|
||||
logger.info('Created solacenet_provider_connector', { connectorId: CONNECTOR_ID });
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
main()
|
||||
.catch((e) => {
|
||||
logger.error('seed-solacenet-gateway-provider failed', {
|
||||
error: e instanceof Error ? e.message : e,
|
||||
});
|
||||
process.exitCode = 1;
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect();
|
||||
});
|
||||
}
|
||||
19
scripts/sql/fix-iru-inquiry-offering-fk.sql
Normal file
19
scripts/sql/fix-iru-inquiry-offering-fk.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Repair IruInquiry.offeringId when it incorrectly stores IruOffering.offeringId (business code)
|
||||
-- instead of IruOffering.id (UUID). FK: IruInquiry.offeringId -> IruOffering.id
|
||||
--
|
||||
-- Review affected rows first:
|
||||
-- SELECT i."inquiryId", i."offeringId" AS broken_fk, o.id AS correct_uuid, o."offeringId" AS business_id
|
||||
-- FROM "IruInquiry" i
|
||||
-- INNER JOIN "IruOffering" o ON o."offeringId" = i."offeringId"
|
||||
-- WHERE i."offeringId" <> o.id;
|
||||
--
|
||||
-- Apply (transaction recommended):
|
||||
-- BEGIN;
|
||||
-- \i scripts/sql/fix-iru-inquiry-offering-fk.sql
|
||||
-- COMMIT;
|
||||
|
||||
UPDATE "IruInquiry" AS i
|
||||
SET "offeringId" = o.id
|
||||
FROM "IruOffering" AS o
|
||||
WHERE o."offeringId" = i."offeringId"
|
||||
AND i."offeringId" IS DISTINCT FROM o.id;
|
||||
Reference in New Issue
Block a user