@tactfulai/livechat-client
v3.0.13
Published
Core API SDK for Tactful.ai platform
Readme
Livechat SDK
This SDK includes commands for livechat services (agents, conversations, messages and queues)
HOW TO USE THE SDK
- Install livechat sdk :
npm install @tactfulai/livechat-client
Initialize SDK :
CRUD SDK:
`import { Configuration , initializeLivechatServer } from '@tactfulai/livechat-client';` `const livechatServerConfig = new Configuration({ basePath: LIVECHAT_HOST_URL, apiKey: `Bearer ${accessToken}`, options: { mode: 'cors', } });` `const livechatServerSDK = initializeLivechatServer(livechatServerConfig);`- Call crud operation as example agentsGet :
livechatServerSDK.agents.agentsGet();
- Call crud operation as example agentsGet :
Command SDK:
`import { Configuration , initializeLiveCommands } from '@tactfulai/livechat-client';` `const livechatServerConfig = new Configuration({ basePath: LIVECHAT_HOST_URL, apiKey: `Bearer ${accessToken}`, options: { mode: 'cors', } });` `const commands = initializeLiveCommands(livechatServerConfig).commands;`- Call commands as example getAgent :
- SDK takes 2 params :
- 1st : object that you patch or set , or id of item you'll get
- 2nd : name of command
const agent = commands.AgentCommand({ agentId, profileId }, "getAgent" );
- SDK takes 2 params :
- Call commands as example getAgent :
ALL LIVECHAT COMMANDS :
- AgentCommands :
https://bitbucket.org/slickblox/livechatserver/src/develop/src/agents/readme.md - ConversationCommands :
https://bitbucket.org/slickblox/livechatserver/src/develop/src/conversations/readme.md - MessageCommands :
https://bitbucket.org/slickblox/livechatserver/src/develop/src/messages/readme.md - QueueCommands :
https://bitbucket.org/slickblox/livechatserver/src/develop/src/queues/readme.md - SettingsCommands :
TO BE ADDED
