Files
smom-dbis-138/packages/integration-foundation/dist/hybx/openapi-placeholder-contract.test.js
defiQUG d717b504a6
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m12s
CI/CD Pipeline / Security Scanning (push) Successful in 2m21s
CI/CD Pipeline / Lint and Format (push) Failing after 36s
CI/CD Pipeline / Terraform Validation (push) Failing after 22s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 25s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 23s
Validation / validate-genesis (push) Successful in 26s
Validation / validate-terraform (push) Failing after 21s
Validation / validate-kubernetes (push) Failing after 9s
Validation / validate-smart-contracts (push) Failing after 8s
Validation / validate-security (push) Failing after 1m15s
Validation / validate-documentation (push) Failing after 15s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 26s
Verify Deployment / Verify Deployment (push) Failing after 56s
feat(omnl): settlement terminal, compliance gates, and HYBX integration foundation
Add operator settlement terminal UI/API, swift-listener service, compliance
idempotency gates, GRU reserve dashboards, and @dbis/integration-foundation
for typed HYBX/ISO adapter contracts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 21:51:32 -07:00

50 lines
2.3 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const node_test_1 = require("node:test");
const strict_1 = __importDefault(require("node:assert/strict"));
const node_fs_1 = require("node:fs");
const node_path_1 = require("node:path");
/** Paths used by HttpHybxClient (must match placeholder OpenAPI). */
const HTTP_CLIENT_PATHS = [
{ method: 'POST', path: '/v1/payments' },
{ method: 'GET', pathPrefix: '/v1/payments/' },
{ method: 'GET', path: '/v1/settlement-events' },
];
function repoRootFromTestDir() {
// dist/hybx → proxmox root (5 levels up)
return (0, node_path_1.resolve)(__dirname, '../../../../..');
}
function loadPlaceholderOpenApi() {
const openApiPath = (0, node_path_1.resolve)(repoRootFromTestDir(), 'docs/api/openapi-hybx-integration-placeholder.yaml');
strict_1.default.ok((0, node_fs_1.existsSync)(openApiPath), `placeholder OpenAPI missing: ${openApiPath}`);
return (0, node_fs_1.readFileSync)(openApiPath, 'utf8');
}
(0, node_test_1.describe)('HYBX placeholder OpenAPI contract', () => {
(0, node_test_1.it)('declares HttpHybxClient payment and settlement paths', () => {
const spec = loadPlaceholderOpenApi();
for (const entry of HTTP_CLIENT_PATHS) {
if (entry.path) {
strict_1.default.match(spec, new RegExp(`^\\s+${entry.path.replace(/\//g, '\\/')}:\\s*$`, 'm'));
}
if (entry.pathPrefix) {
strict_1.default.match(spec, /\/v1\/payments\/\{paymentId\}:/);
}
}
});
(0, node_test_1.it)('defines initiatePayment and getPaymentStatus operationIds', () => {
const spec = loadPlaceholderOpenApi();
strict_1.default.match(spec, /operationId:\s*initiatePayment/);
strict_1.default.match(spec, /operationId:\s*getPaymentStatus/);
strict_1.default.match(spec, /operationId:\s*listSettlementEvents/);
});
(0, node_test_1.it)('requires HybxPaymentRequest core fields', () => {
const spec = loadPlaceholderOpenApi();
for (const field of ['idempotencyKey', 'entityId', 'tenantId', 'amount', 'currency']) {
strict_1.default.match(spec, new RegExp(`${field}:\\s*\\{`));
}
});
});