Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 980 Bytes

File metadata and controls

39 lines (30 loc) · 980 Bytes

@heytea/react-native-udesk

GitHub license npm

Getting started

$ npm install @heytea/react-native-udesk --save

Mostly automatic installation

$ react-native link @heytea/react-native-udeskk

Usage

import ReactNativeUdesk from '@heytea/react-native-udesk';

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

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

/**
 * 开始聊天
 * @param {IUserInfo} userInfo 用户信息
 */
export function startChat(userInfo?: IUserInfo): Promise<boolean>