@optare/management
v0.1.2
Published
Node.js Management SDK for Optare ID - Server-side user, organization, and license management
Maintainers
Readme
Management SDK
Server-side SDK for Optare ID administration. See documentation for full API reference.
Installation
npm install @optare/managementQuick Start
import { ManagementClient } from '@optare/management';
const client = new ManagementClient({
apiKey: process.env.OPTARE_API_KEY!,
});
// List users
const users = await client.users.list();
// Create a subscription
await client.subscriptions.create({
organizationId: 'org-123',
productId: 'product-456',
totalSeats: 10,
});Available Namespaces
users- User managementorganizations- Organization managementproducts- Product catalogsubscriptions- Subscription managementoauthClients- OAuth client managementapiKeys- API key managementwebhooks- Webhook managementbilling- Billing provider integration
Billing Integration
// Connect Stripe
await client.billing.connect({
provider: 'stripe',
secretKey: process.env.STRIPE_SECRET_KEY!,
webhookSecret: process.env.STRIPE_WEBHOOK_SECRET,
});
// List synced products
const products = await client.billing.listProducts();
// Create customer portal session
const { url } = await client.billing.portal.createSession('https://myapp.com/settings');