Registry / auth-security / topaz-node

topaz-node

JSON →
library0.0.10jsnpmunverified

The official Node.js SDK for Topaz, a modern authorization service. Version 0.0.10 provides early-stage client bindings for managing users, roles, and permissions via the Topaz API. It ships with TypeScript definitions and supports both ESM and CommonJS. As a very early release (pre-1.0), the API is subject to rapid change. Key differentiators include native TypeScript support and a promise-based interface, but users should be cautious about stability and expect breaking changes between minor versions.

npm install topaz-node
INSTALL
IMPORT
SIG · TOPAZ-NODE
T
topaz-node
auth-securityjavascriptv0.0.10
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import Topaz from 'topaz-node'
✗ const Topaz = require('topaz-node')
Default export only; CJS users can use Topaz = require('topaz-node').default
Topaz
✓ import { Topaz } from 'topaz-node'
✗ import Topaz from 'topaz-node'
Named export Topaz is available; default export is same object.
User
✓ import { User } from 'topaz-node'
✗ import User from 'topaz-node'
User is a named type/class export.
TopazClient
✓ import { TopazClient } from 'topaz-node'
TypeScript type for the client instance.

Initializes the Topaz client with environment variables and fetches a user by ID.

import Topaz, { User } from 'topaz-node'; import 'dotenv/config'; const client = new Topaz({ apiKey: process.env.TOPAZ_API_KEY ?? '', baseUrl: process.env.TOPAZ_BASE_URL ?? 'https://api.topaz.sh' }); async function main() { const user = await client.users.get('user123'); console.log(user.name); } main().catch(console.error);
Debug
Known issues
breakingThe SDK is pre-1.0 (v0.0.10) – expect frequent breaking changes between minor versions.
fix
Pin to exact version and review changelog before upgrading.
affects: >=0.0.1 <1.0.0
deprecatedThe `createUser` method signature changed in v0.0.9; old signature with positional arguments is deprecated.
fix
Use object parameter: client.users.create({ name: '...', email: '...' })
affects: <0.0.9
gotchaESM-only environments (like Deno) require explicit import of 'topaz-node' due to missing CJS compat in some build outputs.
fix
Use dynamic import or bundler that handles ESM.
affects: >=0.0.1
gotchaThe SDK uses `node-fetch` under the hood, which may cause issues in browser environments.
fix
Do not use in browser; intended for Node.js only.
affects: >=0.0.1
Errors
Common errors & fixes
Cannot find module 'topaz-node'
Package not installed or import path incorrect.
fix
Run 'npm install topaz-node@0.0.10' and verify node_modules.
Topaz is not a constructor
Using default import in CJS without .default.
fix
Use: const Topaz = require('topaz-node').default;
TypeError: client.users.get is not a function
Using older version before method was renamed.
fix
Upgrade to v0.0.10: npm install topaz-node@0.0.10
Error: API key is required
Missing or empty TOPAZ_API_KEY environment variable.
fix
Set environment variable or pass apiKey option in constructor.
Upgrade
Version history
0.0.10latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
topaz-node — npm install topaz-node · libregistry