QNSI

Build Pattern · TypeScript

Build a FOIA-Aligned Public Records System

Source-linked public-records pattern for evaluating access, audit, and retention contracts.

Evaluate public-records workflows against source-linked Access, Audit, and Vault contracts. FOIA alignment, immutability, retention enforcement, agency isolation, and end-to-end runtime behavior are NOT VERIFIED.

Verification boundary: The pattern is not evidence of FOIA compliance, authorization enforcement, audit completeness, immutable retention, isolation, or deployment behavior; all remain NOT VERIFIED.

NOT VERIFIEDDeployment timing
TypeScriptPrimary SDK
3Source surfaces

QNSI services used

Stack

Code

Published SDK calls

Snippets show source-linked SDK call shapes. Route reachability and deployment behavior remain NOT VERIFIED.

FOIA-style request: gate access via RBAC + audittypescript
import { QnsiClient } from "@heossihq/qnsi";

const qnsp = new QnsiClient({ apiKey: process.env.QNSI_API_KEY! });

// Check access via QNSI access-control-service
const allowed = await qnsp.access.check({
  principal: requesterId,
  resource: `record:${recordId}`,
  action: "read",
});

if (!allowed.granted) {
  await qnsp.audit.logEvent({
    eventType: "foia.access.denied",
    payload: { requesterId, recordId, reason: allowed.reason },
  });
  return { error: "ACCESS_DENIED" };
}

// Source-linked Audit call; ordering and evidence ingestion are NOT VERIFIED
await qnsp.audit.logEvent({
  eventType: "foia.access.granted",
  payload: { requesterId, recordId, foiaRequestId },
});

const record = await qnsp.vault.getSecret(`record:${recordId}`);
return { payload: record.payloadB64 };

Evaluate

Inspect the source-linked integration surface