1.0.5 • Published 2 years ago

intelli-chat-sdk2 v1.0.5

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

Intellicon chat sdk for accessing Intellicon Chat (for NodeJS supported environments only)

Install

npm install intelli-chat-sdk2 | yarn add intelli-chat-sdk2

then import into your file

const sdk = require('intelli-chat-sdk2')

Following actions are available to interact with Intellicon chat with their arguments and details

  1. Connect with Intellicon Server using

    sdk.connect(user, token, callback);
    
    user = An object having (unique) id and name of customer 
    token = token string   (can get using provided API)
    callback = function with two arguments `event` and `data` that will called whenever any defined event occured
  2. To get user interactions

    sdk.getUserInteractions(offset);
    
    offset = how many conversations you want to skip or already loaded  
  3. Create a new to Intellicon chat

    sdk.newInteraction(message, type);
    
    - if `message` is simple text than `type` is text
    - if `message` is (publically accessible) media URL than `type` can be 'image'|'audio'|'document'|'video'
  4. Send a message to Intellicon chat

     sdk.sendMessage(interactionId, message, type);
    
    - interactionId = _id in interaction object
    - if `message` is simple text than `type` is text
    - if `message` is (publically accessible) media URL than `type` can be 'image'|'audio'|'document'|'video'
  5. Get messages of an interaction

     sdk.getMessages(interactionId, offset);
    
    - interactionId = _id in interaction object
    - offset = how many messages you want to skip or already loaded
  6. Close an interaction

     sdk.closeInteraction(interactionId);
    
    - interactionId = _id in interaction object
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago