0.2.0 • Published 2 years ago

@botsquad/inbox-sdk v0.2.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Inbox SDK

Typescript SDK for the DialoX Inbox.

Usage

import { InboxSDK } from '@botsquad/inbox-sdk'

const options = {
  iframeParent: document.getElementById('inbox-container'),
  onIframeCreate: iframe => {
    iframe.className = '...'
  },
  // Example languages: 'en', 'es', 'de', 'nl'
  languageCode: 'en',
}

InboxSDK.authenticate(token, options).then(inbox => {
  inbox.mine({
    onSync(conversations) {
      // Render conversations
    },
  })

  inbox.operatorPresence.onSync(() => {
    // Presence of fellow operators.
    const operators = inbox.operatorPresence.list()
  })
})
0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago