A TypeScript Node.js SDK for interacting with the Watchtower API. This SDK provides a simple and type-safe way to manage API keys, generate connection strings, and interact with various Watchtower services.
npm install watchtower-node-sdk
import { WatchtowerSDK } from 'watchtower-node-sdk';
// Initialize the SDK
const sdk = new WatchtowerSDK();
// Roll an API key
const rolledKey = await sdk.apikey.rollAPIKey({
current_apikey: 'your_current_key',
type: 'organization' // or 'app' or 'tenant'
});
// Generate a connection string
const connectionString = await sdk.connectionstring.generateConnectionString({
organization_apikey: 'your_org_key',
app_apikey: 'your_app_key',
tenant_apikey: 'your_tenant_key', // optional
expires_in: 3600 // optional: expiration in seconds
});
// Parse a connection string
const parsedString = await sdk.connectionstring.parseConnectionString(
'your_connection_string'
);
For detailed API documentation, including all available endpoints, request/response types, and examples, please refer to DOCS.md.
- TypeScript support with full type definitions
- Simple and intuitive API
- Built on top of Axios
- API Key Management
- Roll API keys for organizations, apps, and tenants
- Connection String Management
- Generate encrypted, time-limited connection strings
- Parse and validate connection strings
- Additional Endpoints
- Health checks
- Logs
- Metrics
- Items
- Intelligence
- Analysis
- App management
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Run linter
npm run lint
MIT