Skip to main content

📦 Client SDK

The Noxivo Engine provides a type-safe client for Node.js/TypeScript environments.

Installation

npm install @noxivo/messaging-client

Usage

Importing the Client

import { MessagingSessionService } from '@noxivo/messaging-client';

// The client is designed to work with the Engine's proxy
const engineBaseUrl = 'https://api-workflow-engine.noxivo.app/api/v1';
const engineApiKey = 'your-engine-api-key';

// Example: Sending a message using the proxy
async function sendMessage(sessionName: string, chatId: string, text: string) {
const response = await fetch(`${engineBaseUrl}/sendText`, {
method: 'POST',
headers: {
'API-Key': engineApiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
session: sessionName,
chatId: chatId,
text: text
})
});

return response.json();
}

Shared Contracts

You can also use our shared Zod schemas and TypeScript types:

npm install @noxivo/contracts
import { SendMessageSchema } from '@noxivo/contracts';