@rongcloud/plugin-call-plus 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -914,6 +914,10 @@ interface ISyncCallLogCon {
914
914
  * 每页记录数 默认 30
915
915
  */
916
916
  count?: number;
917
+ /**
918
+ * 正序或倒序
919
+ */
920
+ order?: 0 | 1;
917
921
  }
918
922
  interface ISyncCallLogRes extends IBaseSingalCon {
919
923
  callType: RCCallPlusType;
@@ -970,6 +974,10 @@ interface ISyncCallLogResList {
970
974
  * 列表中最大时间戳
971
975
  */
972
976
  maxTime: number;
977
+ /**
978
+ * 通话记录列表中最小的时间戳
979
+ */
980
+ minTime: number;
973
981
  /**
974
982
  * 删除的列表
975
983
  */
@@ -1144,6 +1152,16 @@ interface ISysStatusUpOpts extends IBaseSingalCon {
1144
1152
  */
1145
1153
  forward: ForwardType;
1146
1154
  }
1155
+ interface IEndAbnormalCallOpts {
1156
+ /**
1157
+ * 0 当前端;1 所有端
1158
+ */
1159
+ allDevice: 0 | 1;
1160
+ /**
1161
+ * 异常的 callId 列表
1162
+ */
1163
+ callIds: string[];
1164
+ }
1147
1165
  interface IGetDelayTimeInfoRes {
1148
1166
  /**
1149
1167
  * 获取 CallServer 与用户本地时间的差值,用于矫正与 CallServer 的时间
@@ -1385,6 +1403,10 @@ interface IGetCallLogListOpts {
1385
1403
  * 获取数量
1386
1404
  */
1387
1405
  count?: number;
1406
+ /**
1407
+ * 正序或倒序
1408
+ */
1409
+ order?: 0 | 1;
1388
1410
  }
1389
1411
  interface IRCCallPlusGetCallRecordRes {
1390
1412
  /**
@@ -1396,9 +1418,9 @@ interface IRCCallPlusGetCallRecordRes {
1396
1418
  */
1397
1419
  list: IRCCallPlusCallRecord[];
1398
1420
  /**
1399
- * 列表中最大时间戳
1421
+ * hasMore 为 true 时,继续获取通话记录需传入的时间戳
1400
1422
  */
1401
- maxTime: number;
1423
+ syncTime: number;
1402
1424
  }
1403
1425
  interface IReqChangeMediaTypeOpts {
1404
1426
  /**
@@ -1979,6 +2001,12 @@ declare class SignalTransporter extends EventEmitter {
1979
2001
  upCallLogReaded(opts: IBaseSingalCon): Promise<{
1980
2002
  code: number;
1981
2003
  }>;
2004
+ /**
2005
+ * 清除用户正在呼叫中的通话会话(*非暴露接口,供调试酌情调用)
2006
+ */
2007
+ endUserAbnormalCalls(opts: IEndAbnormalCallOpts): Promise<{
2008
+ code: number;
2009
+ }>;
1982
2010
  /** ======私有方法============================================================================================= */
1983
2011
  private _onIMConnectionStateChange;
1984
2012
  /**
@@ -2337,6 +2365,14 @@ declare class RCCallEngine extends EventEmitter {
2337
2365
  * holdSession 升级为 mainSession
2338
2366
  */
2339
2367
  upgradeMainSession(holdCallId: string): void;
2368
+ /**
2369
+ * 清除异常结束的 call
2370
+ */
2371
+ endCurrentUserAbnormalCalls(opts: {
2372
+ allDevice: boolean;
2373
+ }): Promise<{
2374
+ code: number;
2375
+ }>;
2340
2376
  /** ======私有方法============================================================================================= */
2341
2377
  /**
2342
2378
  * IM 状态变更处理
@@ -2360,6 +2396,14 @@ declare class RCCallEngine extends EventEmitter {
2360
2396
  * 收到 通话邀请
2361
2397
  */
2362
2398
  private _onInvite;
2399
+ /**
2400
+ * 本端被邀请处理
2401
+ */
2402
+ private _selfIsInviteeHandle;
2403
+ /**
2404
+ * 其他人被邀请处理
2405
+ */
2406
+ private _othersIsInviteeHandle;
2363
2407
  /**
2364
2408
  * 收到 挂断(对方通话取消、通话拒绝)
2365
2409
  */
@@ -2395,10 +2439,7 @@ declare class RCCallEngine extends EventEmitter {
2395
2439
  /**
2396
2440
  * 通话结束
2397
2441
  */
2398
- sessionClose(data: {
2399
- callId: string;
2400
- toDeviceId: string;
2401
- }, traceId: string, isSelfHangup: boolean): void;
2442
+ private _onSessionClose;
2402
2443
  /**
2403
2444
  * 根据 callId 移除 session
2404
2445
  */
@@ -3315,13 +3356,19 @@ declare class RCCallPlusClient {
3315
3356
  }>;
3316
3357
  /**
3317
3358
  * 分页查找当前用户的全部通话记录
3318
- * @param startTimestamp 起始时间戳,返回大于此时间戳的通话记录
3359
+ * @param startTimestamp 起始时间戳,
3360
+ * 首次获取可传 -1,倒序时,返回最新的通话记录,正序时,返回最早的通话记录
3361
+ * order 为正序时,返回大于此时间戳的通话记录
3362
+ * order 为倒序时,返回小于此时间戳的通话记录
3319
3363
  * @param count 每次获取的数量
3364
+ * @param order 正序或倒序获取,默认为正序
3365
+ * 0 为正序,向开始时间戳之后查询
3366
+ * 1 为倒序,向开始时间戳之前查询
3320
3367
  * @returns result.hasMore 是否有更多通话记录
3321
3368
  * @returns result.list 通话记录列表,类型为 IRCCallPlusCallRecord[],可通过 apiDoc 查看具体包含字段
3322
- * @returns result.maxTime 列表中最大时间戳,如果 hasMore 为 true,继续获取时,传入此时间戳
3369
+ * @returns result.syncTime hasMore 为 true 时,继续获取通话记录需传入的时间戳
3323
3370
  */
3324
- getCallRecords(startTimestamp: number, count: number): Promise<{
3371
+ getCallRecords(startTimestamp: number, count: number, order?: 0 | 1): Promise<{
3325
3372
  code: number;
3326
3373
  result?: IRCCallPlusGetCallRecordRes;
3327
3374
  }>;