JavaScript SDK
Official Nevuto JavaScript/TypeScript SDK for Node.js and browsers.
The official Nevuto SDK for JavaScript and TypeScript. Works with Node.js 18+ and modern browsers.
Installation
npm install @nevuto/sdk
Usage
import { Nevuto } from '@nevuto/sdk'
const client = new Nevuto({
apiKey: 'nv_live_your_api_key'
})
// List all stores
const stores = await client.stores.list()
// Create a product
const product = await client.products.create({
storeId: 'store_abc123',
name: 'New Product',
price: 1999
})
TypeScript Support
The SDK is written in TypeScript and includes full type definitions out of the box.
import type { Store, Product, Order } from '@nevuto/sdk'
Error Handling
import { NevutoError } from '@nevuto/sdk'
try {
await client.stores.get('invalid_id')
} catch (err) {
if (err instanceof NevutoError) {
console.log(err.status) // 404
console.log(err.code) // "not_found"
console.log(err.message) // "Store not found"
}
}