privabase
v1.0.0
Published
Official Node.js SDK for the PrivaBase privacy compliance API
Downloads
7
Maintainers
Readme
PrivaBase SDK
Official Node.js SDK for the PrivaBase privacy compliance API.
Install
npm install privabaseQuick Start
const { PrivaBase } = require('privabase');
const pb = new PrivaBase({ apiKey: 'your-api-key' });
// Run a compliance check
const result = await pb.compliance.check({
jurisdiction: 'GDPR',
dataCategories: ['personal'],
processingPurposes: ['marketing'],
dataSubjects: 1000
});
// Generate a privacy policy
const doc = await pb.documents.generate({
template_id: 'pp-gdpr-full',
variables: { company_name: 'Acme Inc', company_email: '[email protected]', company_website: 'https://acme.com', effective_date: '2026-01-01' }
});
// Detect PHI
const phi = await pb.hipaa.detectPhi('Patient John Smith SSN 123-45-6789');Auth
// JWT auth
const { data } = await pb.auth.login({ email: '[email protected]', password: 'secret' });
pb.setToken(data.token);
// API key auth
const pb2 = new PrivaBase({ apiKey: 'pk_live_...' });License
MIT
