@meetgradient/mspc-sdk
v0.3.0-alpha.6
Published
Lightweight JavaScript/TypeScript SDK for integrating with the MSPCentric platform
Readme
MSPC SDK
Lightweight JavaScript/TypeScript SDK for integrating with the MSPC platform.
Installation
npm install @meetgradient/mspc-sdkFeatures
- Real-time updates via Server-Sent Events (SSE)
- Simplified reconcile and alerting API
Quick Start
import { MspcSdk } from '@meetgradient/mspc-sdk';
// Initialize the SDK
const sdk = new MspcSdk({
apiKey: 'your-api-key',
apiSecret: 'your-api-secret',
baseUrl: 'https://cybersoft.mspcentric.app.com',
stream: true,
fallbackToPolling: true,
});
// Subscribe to events
sdk.on('mspc.sdk.connected', () => {
console.log('Connected to MSPC');
});
sdk.on('mspc.alerts.status_update', (event) => {
console.log('Alert status update:', event);
});
// Connect to MSPC
await sdk.connect();
// Submit an alert
const correlationId = await sdk.alerts.createAlert({
organizationOemToken: 'token',
integrationId: 'integration-id',
title: 'Critical Alert',
summary: 'System detected critical issue',
alertType: 'malware-blocked',
accountId: 'account-123',
productGroup: 'Security',
incidentStatus: 'open',
});
console.log('Alert submitted:', correlationId);Documentation
Full documentation will be available at [docs link].
Requirements
- Node.js 18 or higher
- TypeScript 5.0+ (for TypeScript projects)
License
MIT
