Licence
MIT
Version
0.3.0
Deps
0
Size
595 kB
Vulns
0
Weekly
65
@proyecta-ai/sdk
The official TypeScript SDK for the Proyecta platform API. Provides fully typed access to Commerce, AI, Analytics, Content, Email, Files, Domains, Push Notifications, and Connectors.
Installation
npm install @proyecta-ai/sdkQuick start
import Proyecta from '@proyecta-ai/sdk';
const proyecta = new Proyecta({
apiKey: process.env.PROYECTA_API_KEY,
});
// List products
const { data } = await proyecta.commerce.products.list();
// Create an AI chat completion
const { data: completion } = await proyecta.ai.chat.completions.create({
body: {
model: 'claude-sonnet-4-20250514',
messages: [{ role: 'user', content: 'Hello' }],
},
});
// Track an analytics event
await proyecta.analytics.track({
body: {
event: 'page_view',
properties: { page: '/pricing' },
},
});
// Send a transactional email
await proyecta.email.send({
body: {
to: 'user@example.com',
subject: 'Welcome',
html: '<h1>Welcome aboard</h1>',
},
});Configuration
const proyecta = new Proyecta({
apiKey: 'pk_live_...', // Required. Your Proyecta API key.
baseUrl: 'https://...', // Optional. Defaults to https://cloud.proyecta.dev
apiVersion: '2025-12-09', // Optional. Sent as the Proyecta-Version header.
});API surface
| Namespace | Description |
|---|---|
proyecta.commerce |
Products, variants, customers, coupons, features, subscriptions, checkout, entitlement checks |
proyecta.ai |
Chat completions and model listing |
proyecta.analytics |
Event tracking and batch ingestion |
proyecta.content |
CMS collections, entries, assets, locales, releases |
proyecta.email |
Send transactional email, manage sender identities |
proyecta.files |
Two-step signed upload, file metadata |
proyecta.domains |
Published domain listing |
proyecta.pushNotifications |
Subscribe devices, send notifications, manage topics |
proyecta.connectors |
Browse connector catalog, list connections, execute actions |