react-native-udesk-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

rn-udesk

GitHub license npm

此项目由rn-udesk fork 而来

Getting started

$ npm install react-native-udesk-sdk --save

Mostly automatic installation

$ react-native link react-native-udesk-sdk

Usage

import ReactNativeUdesk from 'react-native-udesk-sdk'

// 以下是ReactNativeUdesk可使用的方法

/**
 * 用户信息,用于传入这些用户信息,供客服查看
 */
export interface IUserInfo {
  nickname?: string;
  email?: string;
  phone?: string;
  description?: string;
  domain: string;
  appKey: string;
  appId: string;
  sdkToken: string; //是客户的唯一标识,用来识别身份,可以传userId
}

/**
 * 开始聊天
 * @param {IUserInfo} userInfo 用户信息
 */
 ReactNativeUdesk.startChat(userInfo)

/**
 * 发送咨询信息,例如商品订单
 */

export interface IItemInfo {
  title: string;
  subTitle: string;
  img: string;
  url: string;
}
 ReactNativeUdesk.sendCommodityMessage(userInfo, itemInfo);

Package Sidebar

Install

npm i react-native-udesk-sdk

Weekly Downloads

5

Version

1.1.0

License

MIT

Unpacked Size

31.9 kB

Total Files

15

Last publish

Collaborators

  • lvnini