@empireaiorg/econnect
v1.3.0
Published
Official Node.js SDK for eConnect — one API for messaging, music, AI, productivity, payments, and Google services.
Maintainers
Readme
@empireaiorg/econnect
Official Node.js SDK for eConnect — one consistent API for messaging, music, AI, productivity, payments, and Google services.
Install
npm install @empireaiorg/econnectQuick start
const EConnect = require('@empireaiorg/econnect');
const eConnect = new EConnect(
'https://your-econnect-url.up.railway.app',
process.env.ECONNECT_API_KEY
);Messaging
await eConnect.messaging.sendText('telegram', chatId, 'Hello!');
await eConnect.messaging.sendEmail(userId, 'gmail', to, subject, text, html);
await eConnect.messaging.addComment(userId, 'owner/repo', 3, 'Nice work!');
await eConnect.messaging.createNotionPage(userId, databaseId, properties);AI
await eConnect.ai.openaiChat(userId, 'Summarize this in one sentence: ...');
await eConnect.ai.claudeChat(userId, 'Same, but for Claude');
await eConnect.ai.textToSpeech(userId, voiceId, 'Hello world');Productivity
await eConnect.productivity.createTrelloCard(userId, listId, 'New task', 'Details here');
await eConnect.productivity.createLinearIssue(userId, teamId, 'Bug: X is broken');
await eConnect.productivity.createAirtableRecord(userId, baseId, tableName, { Name: 'Ada' });Payments (your own Paystack account)
await eConnect.payments.initializePaystackTransaction(userId, '[email protected]', 500000); // amount in koboGoogle (Gmail, Calendar, Contacts, YouTube, Sheets — one connection covers all)
await eConnect.google.calendar.createEvent(userId, { summary: 'Sync', start, end });
await eConnect.google.contacts.list(userId);
await eConnect.google.youtube.getMyChannel(userId);
await eConnect.google.sheets.appendRow(userId, spreadsheetId, 'Sheet1!A:C', ['Ada', '[email protected]', 'New']);Music
await eConnect.music.play(userId, 'spotify:track:...', 'spotify');
await eConnect.music.getDevices(userId, 'spotify');Two identities in every call
- You (the developer) — authenticated by your Empire ID key, passed to the constructor above.
- Your end-user — identified by whatever
user_id/chatIdstring you pass to each method. Connected accounts (Spotify, Google) live in eConnect's vault — your key never touches their personal tokens.
Full docs
See econnect.empireunion.xyz/docs.
License
MIT
