JavaScript SDK
The Launchverse JavaScript SDK provides a typed client for the Launchverse API.
Installation
npm install @launchverse/sdk
Usage
import { LaunchverseClient } from '@launchverse/sdk';
const client = new LaunchverseClient({
token: 'lvse_...',
});
// List projects
const projects = await client.projects.list();
// Get a deployment
const deployment = await client.deployments.get('deployment_id');
TypeScript
The SDK includes full TypeScript definitions. All API responses are typed based on the OpenAPI specification.
Error Handling
try {
await client.projects.get('nonexistent');
} catch (error) {
if (error.code === 'NOT_FOUND') {
// Handle not found
}
}