@qnsp/tenant-sdk
v0.1.1
Published
TypeScript SDK client for the QNSP tenant-service API. Provides tenant lifecycle and subscription management.
Readme
@qnsp/tenant-sdk
TypeScript client for the QNSP Tenant service. Manages tenant lifecycle (create, update, suspend), domains, compliance tags, metadata, and PQC security envelopes.
Installation
pnpm add @qnsp/tenant-sdkAuthentication
Provide a tenant-scoped service token via apiKey. Requests require PQC security envelopes and
signatures generated by the control plane; the SDK forwards your payloads but does not sign them.
import { TenantClient } from "@qnsp/tenant-sdk";
const tenants = new TenantClient({
baseUrl: "https://tenant.qnsp.cuilabs.io",
apiKey: process.env.QNSP_SERVICE_TOKEN!,
});Tier requirements
Tenant management APIs are available on every tier. Higher tiers add more tenant seats or compliance features, but there are no SDK-side restrictions.
Usage example
import { TenantClient } from "@qnsp/tenant-sdk";
const tenants = new TenantClient({
baseUrl: "https://tenant.qnsp.cuilabs.io",
apiKey: process.env.QNSP_SERVICE_TOKEN!,
});
const created = await tenants.createTenant({
name: "CUI Labs",
slug: "cui-labs",
plan: "dev-pro",
region: "global",
security: {
controlPlaneTokenSha256: "...",
pqcSignatures: [],
hardwareProvider: null,
attestationStatus: null,
attestationProof: null,
},
});
const list = await tenants.listTenants({ limit: 25 });Telemetry
Set telemetry (or pass config to createTenantClientTelemetry) to emit OTLP metrics for every API
call—latency, HTTP code, retries—powering the tenant dashboards described in
docs/observability/portal-dashboards.md.
Related documentation
License
Licensed under the Apache License, Version 2.0. See LICENSE.
© 2025 QNSP - CUI LABS, Singapore
