Commit 24e6d33f by zhangyunjie

1.2.2.3

parent 7e33fcb5
......@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'OffcnIMSDKiOS'
s.version = '1.2.2.1.2'
s.version = '1.2.2.3'
s.summary = 'OffcnIMSDKiOS.'
s.description = <<-DESC
......
......@@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy)NSString *version;
@property (nonatomic,copy)NSString *send_time;//发送时间
@property (nonatomic,assign)NSInteger msg_seq;//消息时序
@property (nonatomic,assign)NSInteger msg_scope;// 区分单聊:1以及群聊:2;私聊9
@property (nonatomic,assign)NSInteger msg_scope;//单聊:1;群聊:2;私聊: 9;客服: 10
@property (nonatomic,copy)NSString *msg_from;//发送消息的用户id
@property (nonatomic,copy)NSString *msg_to;//接受消息的用户id
@property (nonatomic,copy)NSString *to;//对方Id
......@@ -46,6 +46,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign)CGFloat cellH;//扩展字段
@property (nonatomic,copy)NSString *ext_custom;//开发者扩展字段
//客服使用
@property (nonatomic,copy)NSString *group_id;//客服组ID
@property (nonatomic,assign)BOOL is_agent;//是否教师身份登陆
//以下数据库使用
@property (nonatomic,assign)NSInteger isSentSuccess;//是否发送成功
@property (nonatomic,assign)NSInteger bymyself;//是否是我发送的
......@@ -58,6 +63,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign)NSInteger total_unread_number;//所有会话总未读数
@end
@class OffcnIMCSEvaluation_typeModel;
@interface OffcnIMMsgModel : NSObject
@property (nonatomic,copy)NSString *msg;//文本消息内容
......@@ -72,6 +79,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign)NSInteger w;//宽
@property (nonatomic,assign)NSInteger h;//高
@property (nonatomic,assign)NSInteger size;//文件大小
//客服使用
@property (nonatomic,copy)NSString *group_id;//客服组ID
@property (nonatomic,assign)NSInteger type;//评价类型:1满意;2解决
@property (nonatomic,strong)OffcnIMCSEvaluation_typeModel *reply;//评价按钮状态
@end
//发送消息Model
......@@ -107,6 +120,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy)NSString *to;//对方Id
@property (nonatomic,assign)NSInteger type;//类型
@property (nonatomic,assign)NSInteger unread_number;//数量
//客服使用
@property (nonatomic,copy)NSString *group_id;//客服组ID
@end
@interface OffcnIMLast_msgModel : NSObject
......@@ -123,6 +139,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy)NSString *msg_from;//发送消息的用户id
@property (nonatomic,copy)NSString *msg_to;//接受消息的用户id
@property (nonatomic,copy)NSString *to;//对方Id
@property (nonatomic,copy)NSString *tid;//本地发送消息tid
//客服使用
@property (nonatomic,copy)NSString *group_id;//客服组ID
@end
//获取会话历史消息列表Model
......@@ -188,8 +208,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *name_original;//原始名字
@property (nonatomic, copy) NSString *identity;//身份
@property (nonatomic, copy) NSString *ability;//能力,例如:老师答疑题型范围等
@property (nonatomic, copy) NSString *group_id;//客服组id
@property (nonatomic, copy) NSString *user_id;//用户ID
@property (nonatomic, copy) NSString *user_id;//对方ID
@property (nonatomic, copy) NSString *expand;//拓展字段
......@@ -255,7 +277,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy)NSString *auto_reply_default;
@property (nonatomic,strong)NSMutableArray *list;
@property (nonatomic,assign)NSInteger online_status;
@property (nonatomic,assign)NSInteger online_status;//在线状态
@property (nonatomic,assign)BOOL isSure;
@end
......@@ -272,4 +294,18 @@ NS_ASSUME_NONNULL_BEGIN
@end
@interface OffcnIMCSEvaluationModel : NSObject
@property (nonatomic,assign)NSInteger type;//1-满意;2-解决
@end
//评价按钮状态
@interface OffcnIMCSEvaluation_typeModel : NSObject
@property (nonatomic,copy)NSString *accid;
@property (nonatomic,copy)NSString *create_at;
@property (nonatomic,assign)NSInteger value;//1-满意;2-不满意
@end
NS_ASSUME_NONNULL_END
......@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
#import "OffcnIMModel.h"
static const NSString *OffcnIMSDKiOSVersion = @"1.2.2.1.2";
static const NSString *OffcnIMSDKiOSVersion = @"1.2.2.3";
//聊天详情头像点击事件通知
#define kOffcnIMChatInfoHeadIconClickNotification @"kOffcnIMChatInfoHeadIconClickNotification"
......@@ -17,6 +17,7 @@ static const NSString *OffcnIMSDKiOSVersion = @"1.2.2.1.2";
typedef NS_ENUM(NSUInteger, OffcnIMChatInfoType) {
OffcnIMChatInfoType_imChat = 1, //im聊天
OffcnIMChatInfoType_privateChat, //私聊
OffcnIMChatInfoType_csChat, //客服
};
typedef NS_ENUM(NSUInteger, OffcnIMSDKReachabilityStatus) {
......@@ -203,4 +204,54 @@ typedef void(^OffcnIMChatInfoHeadIconClickCallBack)(OffcnIMChatInfoType event,NS
//清除本地关于下载文件的缓存
- (void)clearLocalCache;
//********************************************客服接口********************************************
/// 客服-发送消息
/// @param msg_fromID 发送人ID
/// @param msg_toID 接收人ID
/// @param group_id 客服组ID
/// @param is_agent 是否教师身份登陆
/// @param msg_type 发送消息类型
/// @param text 文本
/// @param filePath 图片/音频(语音消息格式,只能是aac格式)/视频/文件,沙盒路径
/// @param ext 开发者扩展字段
/// @param extIndex 开发者扩展字段
/// @param repeatSend_tid 重新发送的tid
/// @param finished 结果回调,最大限制为500字,超过500字报错回调信息:超过500字
/// @param progressPercent 进度回调
/// @param tidStrFinished 发送消息本地tid回调
-(void)cs_sendMsgWithMsg_fromID:(NSString *)msg_fromID msg_toID:(NSString *)msg_toID group_id:(NSString *)group_id is_agent:(BOOL)is_agent msg_type:(OffcnSDKMsgType)msg_type text:(NSString *)text filePath:(NSString *)filePath ext:(NSString *)ext extIndex:(NSString *)extIndex repeatSend_tid:(NSString *)repeatSend_tid Finished:(void(^)(NSString *extIndex,BOOL success,OffcnIMBodyModel *sendMsgModel,NSString *errorMessage))finished ProgressPercent:(void(^)(NSString *extIndex, NSString *filePath, float percent))progressPercent tidStrFinished:(void(^)(NSString *extIndex,NSString *tidString))tidStrFinished;
/// 客服-获取用户最近会话记录
/// @param accid 被获取用户id
/// @param finished 结果回调
-(void)cs_getRecentSessionsWithAccid:(NSString *)accid Finished:(void(^)(BOOL success,OffcnIMHistoryMsgModel *historyMsgModel,NSString *errorMessage))finished;
/// 客服-用户信息标记已读
/// @param accid 教师ID
/// @param customer_id 学生ID
/// @param group_id 客户组ID
/// @param finished 结果回调
-(void)cs_markMsgReadWithAccid:(NSString *)accid customer_id:(NSString *)customer_id group_id:(NSString *)group_id Finished:(void(^)(BOOL success,id response,NSString *errorMessage))finished;
/// 客服-获取在线状态数据
/// @param accid 登陆用户ID
/// @param finished 结果回调
-(void)cs_getAgent_statusWithAccid:(NSString *)accid Finished:(void(^)(BOOL success,OffcnIMCSAutoreplyModel *statusModel,NSString *errorMessage))finished;
/// 客服-获取会话历史消息
/// @param fromID 发送人ID
/// @param toID 接收人ID
/// @param is_agent 是否客服登陆
/// @param group_id 客服组ID
/// @param msg_seq 消息时序
/// @param finished 结果回调
-(void)cs_getSessionHistoryMsgWithFromID:(NSString *)fromID toID:(NSString *)toID is_agent:(BOOL)is_agent group_id:(NSString *)group_id msg_seq:(NSString *)msg_seq Finished:(void(^)(BOOL success,OffcnIMHistoryMsgModel *historyMsgModel,NSString *errorMessage))finished;
/// 客服-获取用户未读消息总数
/// @param accid 登陆用户ID
/// @param finished 结果回调
-(void)cs_getUserAllUnreadNumberWithAccid:(NSString *)accid Finished:(void(^)(BOOL success,NSInteger total_unread_number,NSString *errorMessage))finished;
@end
......@@ -59,6 +59,7 @@ typedef void(^OffcnIMReceiveConnectStatus)(OffcnIMConnectStatus status,NSString
@property (nonatomic, weak) id<OffcnIMSocketDelegate> delegate;
@property (nonatomic, assign) BOOL is_agent;//是否教师身份登陆
@property (nonatomic, copy) NSString *avatar;//发送消息的用户头像
@property (nonatomic, copy) NSString *msg_fromId;//发送消息的用户id
@property (nonatomic, copy) NSString *token;//发送消息的用户token
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment