SDK Configuration

SDK Configuration

Note — As of 2026-04-30, the per-service @heossi/qnsi-auth-sdk package is consolidated into the unified @heossi/qnsi SDK (one package per language). New integrations should use:

import { QnspClient } from "@heossi/qnsi";
const qnsp = new QnspClient({ apiKey: process.env.QNSP_API_KEY! });
await qnsp.auth./* method */(...);

See SDK overview for the consolidated package. The per-service shapes documented below remain accurate at the wire level (REST/gRPC) and are kept for reference.

SDK Configuration

Configure QNSI SDKs for your environment.

Configuration options

SDK configuration is per-service. QNSI publishes separate SDK packages (for example @heossi/qnsi-auth-sdk, @heossi/qnsi-vault-sdk, @heossi/qnsi-storage-sdk).

Most SDKs share these common options:

Option Required Description
baseUrl Yes Service base URL (for example https://api.qnsi.heossi.com)
apiKey No Bearer token used for Authorization: Bearer <token>
timeoutMs No Request timeout in ms

Some SDKs also require tenant context (for example @heossi/qnsi-storage-sdk sends x-tenant-id based on the configured tenantId).

Node.js configuration

import { AuthClient } from "@heossi/qnsi-auth-sdk";
import { VaultClient } from "@heossi/qnsi-vault-sdk";
import { StorageClient } from "@heossi/qnsi-storage-sdk";

const authClient = new AuthClient({
  baseUrl: "https://api.qnsi.heossi.com",
  apiKey: process.env.QNSP_API_KEY,
});

const vaultClient = new VaultClient({
  baseUrl: "https://api.qnsi.heossi.com/proxy/vault",
  apiKey: process.env.QNSP_API_KEY,
});

const storageClient = new StorageClient({
  baseUrl: "https://api.qnsi.heossi.com/proxy/storage",
  apiKey: process.env.QNSP_API_KEY,
  tenantId: process.env.QNSP_TENANT_ID,
});