npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@supsis/supsis-js

v1.2.2

Published

Supsis API SDK - Browser ve Node.js için omnichannel messaging, chatbot, automation, task, ticket ve voice agent entegrasyonu

Readme

Supsis JS SDK

Supsis API'sine browser ve Node.js ortamlarından erişim sağlayan JavaScript SDK.

Özellikler

  • 🌐 Çoklu Platform: Browser (UMD) ve Node.js (CommonJS/ESM) desteği
  • 📝 TypeScript Desteği: Tam TypeScript declaration dosyaları
  • 🔒 Güvenli: Token tabanlı authentication
  • 🔄 Otomatik Retry: Başarısız isteklerde otomatik yeniden deneme
  • 📦 Modüler: Sadece ihtiyacınız olan modülleri kullanın
  • 🤖 LLM-Friendly: Detaylı JSDoc açıklamaları

Kurulum

npm

npm install @supsis/supsis-js

CDN

<!-- Latest -->
<script src="https://static.supsis.live/supsis-js/latest/supsis.min.js"></script>

<!-- Specific version -->
<script src="https://static.supsis.live/supsis-js/1.0.0/supsis.min.js"></script>

Hızlı Başlangıç

Browser

<script src="https://static.supsis.live/supsis-js/latest/supsis.min.js"></script>
<script>
  const supsis = new SupsisJS({
    email: '[email protected]',
    password: 'secret',
    siteId: 'site123'
  });
  
  supsis.connect().then(async () => {
    const chats = await supsis.chat.list({ status: 'active' });
    console.log(chats);
  });
</script>

Node.js (CommonJS)

const { SupsisJS } = require('@supsis/supsis-js');

const supsis = new SupsisJS({
  email: '[email protected]',
  password: 'secret',
  siteId: 'site123'
});

await supsis.connect();

const chat = await supsis.chat.get('chatId');
const contacts = await supsis.contact.list({ limit: 10 });

Node.js (ESM)

import { SupsisJS } from '@supsis/supsis-js';

const supsis = new SupsisJS({
  email: '[email protected]',
  password: 'secret',
  siteId: 'site123'
});

await supsis.connect();

Konfigürasyon

const supsis = new SupsisJS({
  // Zorunlu
  email: '[email protected]',
  password: 'secret',
  siteId: 'site123',
  
  // Opsiyonel
  env: 'production',        // 'production' | 'stage' | 'local' (default: 'production')
  baseApiAddress: null,     // OnPrem için custom API URL
  timeout: 30000,           // HTTP timeout (ms)
  retryCount: 3             // Başarısız isteklerde retry sayısı
});

Ortamlar

| env | API URL | |-----|---------| | production | https://api.supsis.live | | stage | https://beta-api.supsis.live | | local | https://tablet-api-local.supsis.live |

OnPrem Kullanımı

const supsis = new SupsisJS({
  email: '[email protected]',
  password: 'secret',
  siteId: 'site123',
  baseApiAddress: 'https://api.company-supsis.com'
});

Modüller

Chat (Conversation)

// Chat getir
const chat = await supsis.chat.get('chatId');

// Chat listele
const chats = await supsis.chat.list({
  status: 'active',
  startDate: '2024-01-01',
  limit: 20
});

// Chat mesajlarını getir
const messages = await supsis.chat.getMessages('chatId', { limit: 100 });

// Chat'e not ekle
await supsis.chat.addNote('chatId', 'Müşteri geri aranacak');

// Chat etiketlerini güncelle
await supsis.chat.updateTags('chatId', ['tagId1', 'tagId2']);

Contact (Visitor)

// Contact getir
const contact = await supsis.contact.get('contactId');

// Contact ara
const results = await supsis.contact.search({ email: '[email protected]' });

// Contact oluştur
const newContact = await supsis.contact.create({
  fullname: 'John Doe',
  email: '[email protected]',
  phone: '+905551234567'
});

// Contact güncelle
await supsis.contact.update('contactId', { fullname: 'Jane Doe' });

// Etiket ekle/kaldır
await supsis.contact.addTag('contactId', 'tagId');
await supsis.contact.removeTag('contactId', 'tagId');

Message

// Mesaj getir
const message = await supsis.message.get('messageId');

// Sohbetteki mesajları listele
const messages = await supsis.message.list('conversationId', { limit: 50 });

// Mesajlarda ara
const results = await supsis.message.search({
  query: 'sipariş numarası',
  startDate: '2024-01-01'
});

Task

// Görev oluştur
const task = await supsis.task.create({
  title: 'Müşteriyi ara',
  workflowId: 'workflowId',
  pipelineId: 'pipelineId',
  assignee: 'userId',
  dueDate: '2024-12-31'
});

// Görevleri listele
const tasks = await supsis.task.list('workflowId');

// Görevi taşı
await supsis.task.move('taskId', 'newPipelineId');

// Görevi tamamla
await supsis.task.complete('taskId');

// İş akışlarını listele
const workflows = await supsis.task.listWorkflows();

AI Call (Voice Agent)

// Arama başlat
const call = await supsis.aicall.makeCall({
  agentId: 'agentId',
  toNumber: '+905551234567',
  fromNumber: '+908501234567',
  variables: {
    customerName: 'John Doe'
  }
});

// Arama detayını getir
const callDetails = await supsis.aicall.getCall('callId');

// Aramaları listele
const calls = await supsis.aicall.listCalls({
  agentId: 'agentId',
  status: 'ended'
});

Table (CustomerTable)

// Tabloları listele
const tables = await supsis.table.list();

// Kayıtları listele
const records = await supsis.table.listRecords('tableId', {
  filters: { status: 'active' },
  limit: 50
});

// Kayıt oluştur
const record = await supsis.table.createRecord('tableId', {
  name: 'John Doe',
  email: '[email protected]'
});

Module (Dynamic Modules)

// Modülleri listele
const modules = await supsis.module.list();

// Modül kayıtlarını listele
const leads = await supsis.module.listRecords('Leads', {
  filters: { status: 'new' }
});

// Kayıt oluştur
const lead = await supsis.module.createRecord('Leads', {
  name: 'John Doe',
  company: 'ACME Corp'
});

Cache

// Cache yaz
await supsis.cache.write('user:123', { name: 'John' }, {
  expiresIn: { value: 1, unit: 'hours' }
});

// Cache oku
const data = await supsis.cache.read('user:123');

// Cache sil
await supsis.cache.delete('cacheId');

User

// Mevcut kullanıcı
const me = await supsis.user.me();

// Kullanıcıları listele
const users = await supsis.user.list();

// Logout
await supsis.user.logout();

Tag

// Etiketleri listele
const tags = await supsis.tag.list();

// Etiket oluştur
const tag = await supsis.tag.create({
  name: 'VIP',
  color: '#FF0000',
  type: 'visitor'
});

Site

// Özellikleri getir
const features = await supsis.site.getFeatures();

// Cüzdan bilgisi
const wallet = await supsis.site.getWallet();

Module API (Developer Token)

Panelden alınan developer token ile kısıtlı API erişimi:

const { SupsisModuleAPI } = require('@supsis/supsis-js');

const api = new SupsisModuleAPI({
  accessToken: 'dev_token_xxx',
  siteId: 'site123'
});

const records = await api.module.listRecords('Leads');
const tables = await api.table.list();

Hata Yönetimi

const { SupsisJS, SupsisAPIError } = require('@supsis/supsis-js');

try {
  const chat = await supsis.chat.get('invalidId');
} catch (error) {
  if (error instanceof SupsisAPIError) {
    console.error('API Error:', error.message);
    console.error('Status:', error.statusCode);
    console.error('Response:', error.response);
  } else {
    throw error;
  }
}

TypeScript

import { SupsisJS, ChatResponse, ContactResponse } from '@supsis/supsis-js';

const supsis = new SupsisJS({
  email: '[email protected]',
  password: 'secret',
  siteId: 'site123'
});

await supsis.connect();

const chat: ChatResponse = await supsis.chat.get('chatId');
const contacts: ContactResponse[] = (await supsis.contact.list()).data;

Lisans

MIT