@94ai/softphone 6.0.10 → 6.0.12

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/lib/index.d.ts CHANGED
@@ -5101,6 +5101,74 @@ declare class SimpleUser {
5101
5101
  message(destination: string, message: string): Promise<void>;
5102
5102
  }
5103
5103
 
5104
+ /**
5105
+ * 默认连接配置
5106
+ */
5107
+ declare const userAgentDefault: Partial<UserAgentOptions$1>;
5108
+ declare const userAgentStatus: UserAgentStatus;
5109
+ declare enum AutoAnswer {
5110
+ NO = "0",
5111
+ YES = "1"
5112
+ }
5113
+ declare enum PopWindow {
5114
+ NO = "0",
5115
+ YES = "1"
5116
+ }
5117
+ /** 外呼类型 */
5118
+ declare enum VoiceType {
5119
+ /**
5120
+ * AI外呼 "111-"
5121
+ */
5122
+ MULTI_AI = "1",
5123
+ /**
5124
+ * 语音通知
5125
+ */
5126
+ MULTI_VOICE_NOTIFY = "2",
5127
+ /**
5128
+ * 预测式外呼 "333-"
5129
+ */
5130
+ MULTI_PRETEST = "3",
5131
+ /**
5132
+ * 坐席人工外呼(快速外呼) "444-"
5133
+ */
5134
+ LABOUR = "4",
5135
+ /**
5136
+ * 坐席AI外呼 "555-"
5137
+ */
5138
+ AI = "5",
5139
+ /**
5140
+ * 新语音通知
5141
+ */
5142
+ NEW_VOICE_NOTIFY = "6",
5143
+ /**
5144
+ * 语音测试 "666-"
5145
+ */
5146
+ VOICE_TEST = "7",
5147
+ /**
5148
+ * 呼入转接AI
5149
+ */
5150
+ CALL_IN_AI = "8",
5151
+ /**
5152
+ * 呼入转接人工 "777-"
5153
+ */
5154
+ CALL_IN_LABOUR = "9",
5155
+ /**
5156
+ * 视频外呼
5157
+ */
5158
+ MOVIE_CALL = "10",
5159
+ /**
5160
+ * 线路呼叫测试
5161
+ */
5162
+ GATEWAY_TEST_CALL = "11"
5163
+ }
5164
+ /** 接听类型 */
5165
+ declare enum AfterTransferLabour {
5166
+ /** 直接接听 */
5167
+ DIRECT_ANSWER = "1",
5168
+ /** 先监听后手动接听 */
5169
+ LISTEN_FIRST_AND_THEN_ANSWER_MANUALLY = "2"
5170
+ }
5171
+
5104
5172
  type InviterInviteOptionsExtend = InviterInviteOptions & {
5105
5173
  extraHeaders?: string[];
5106
5174
  };
@@ -5316,6 +5384,7 @@ interface UserAgentOptionsSDK {
5316
5384
  */
5317
5385
  sipHeaders?: Array<string>;
5318
5386
  appKey?: string;
5387
+ companyId?: string;
5319
5388
  appSecret?: string;
5320
5389
  agentTag?: string;
5321
5390
  agentId?: number;
@@ -5353,7 +5422,42 @@ type ajaxOption = {
5353
5422
  url: string;
5354
5423
  data: Record<string, any>;
5355
5424
  contentType: string;
5356
- };
5425
+ };
5426
+ /** 软电话业务属性 */
5427
+ type BusinessAttribute = Partial<{
5428
+ /** sip签入头 */
5429
+ sipRegisterMessage: Record<string, any>;
5430
+ /** callid */
5431
+ cid: string;
5432
+ /** 当前通话唯一标识 */
5433
+ callId: string;
5434
+ /** 外呼号码编号 */
5435
+ numberId: string;
5436
+ /** 任务Id */
5437
+ taskId: string;
5438
+ /** 用户明文手机号 */
5439
+ userPhone: string;
5440
+ /** 来电号码 */
5441
+ phoneNumber: string;
5442
+ /** 话术名称 */
5443
+ templateTitle: string;
5444
+ /** 最新节点名称 */
5445
+ nodeTitle: string;
5446
+ /** 任务名称 */
5447
+ taskName: string;
5448
+ /** 整理中 */
5449
+ processTime: string;
5450
+ /** 外呼类型 */
5451
+ voiceType: VoiceType;
5452
+ /** 自动接听 */
5453
+ autoAnswer: AutoAnswer;
5454
+ /** 来电弹屏 **/
5455
+ popWindow: PopWindow;
5456
+ /** 转接后人工类型 (1:直接接听 2:先监听后手动接听) */
5457
+ afterTransferLabour: AfterTransferLabour;
5458
+ tag: string;
5459
+ numberTag: string;
5460
+ }>;
5357
5461
 
5358
5462
  /**
5359
5463
  * 代理实例类
@@ -5391,10 +5495,29 @@ declare class UserAgentManager {
5391
5495
  authorizedMicrophonePermissions: boolean;
5392
5496
  authorizedNotificationPermissions: boolean;
5393
5497
  get appKey(): string;
5498
+ get companyId(): string;
5394
5499
  get agentTag(): string;
5395
5500
  get agentExtension(): string;
5396
5501
  get agentId(): number;
5397
- get businessAttribute(): Record<string, any>;
5502
+ get businessAttribute(): Partial<Partial<{
5503
+ sipRegisterMessage: Record<string, any>;
5504
+ cid: string;
5505
+ callId: string;
5506
+ numberId: string;
5507
+ taskId: string;
5508
+ userPhone: string;
5509
+ phoneNumber: string;
5510
+ templateTitle: string;
5511
+ nodeTitle: string;
5512
+ taskName: string;
5513
+ processTime: string;
5514
+ voiceType: VoiceType;
5515
+ autoAnswer: AutoAnswer;
5516
+ popWindow: PopWindow;
5517
+ afterTransferLabour: AfterTransferLabour;
5518
+ tag: string;
5519
+ numberTag: string;
5520
+ }>>;
5398
5521
  /**
5399
5522
  * 每次来电是否自动接听
5400
5523
  */
@@ -5565,12 +5688,6 @@ declare class UserAgentManager {
5565
5688
  }, options?: InviterInviteOptionsExtend): Promise<Inviter>;
5566
5689
  }
5567
5690
 
5568
- /**
5569
- * 默认连接配置
5570
- */
5571
- declare const userAgentDefault: Partial<UserAgentOptions$1>;
5572
- declare const userAgentStatus: UserAgentStatus;
5573
-
5574
5691
  /**
5575
5692
  * 获取音频标签
5576
5693
  * @param id Element id
@@ -5676,4 +5793,4 @@ declare class UserAgentFactory {
5676
5793
  static dispose(): void;
5677
5794
  }
5678
5795
 
5679
- export { AliArms, CallbackAggregator, HandUpInviteOption, IncomingResponse, Invitation, InvitationAcceptOptions, InvitationRejectOptions, Inviter, InviterInviteOptionsExtend as InviterInviteOptions, OutgoingRequest, PrepareUserAgentOptions, RegisterOptions, Registerer, RegistererOptions, RegistererRegisterOptions, RegistererUnregisterOptions, SessionByeOptions, SessionDescriptionHandler, SessionInfoOptionsExtend as SessionInfoOptions, SessionState, SimpleUser, TransportOptions, URI, UserAgent, UserAgentDelegate, UserAgentDelegateKey, UserAgentFactory, UserAgentManager, UserAgentOptions, UserAgentStatus, UserAgentStatusKey, accumulateSec, accumulationTimer, cleanupMedia, getBeijingTime, getDevicePermission, getMedia, getTimes, getZeorTime, pauseMedia, playMedia, requestMicroPhonePermission, stopStreamTracks, userAgentDefault, userAgentStatus };
5796
+ export { AfterTransferLabour, AliArms, BusinessAttribute, CallbackAggregator, HandUpInviteOption, IncomingResponse, Invitation, InvitationAcceptOptions, InvitationRejectOptions, Inviter, InviterInviteOptionsExtend as InviterInviteOptions, OutgoingRequest, PopWindow, PrepareUserAgentOptions, RegisterOptions, Registerer, RegistererOptions, RegistererRegisterOptions, RegistererUnregisterOptions, SessionByeOptions, SessionDescriptionHandler, SessionInfoOptionsExtend as SessionInfoOptions, SessionState, SimpleUser, TransportOptions, URI, UserAgent, UserAgentDelegate, UserAgentDelegateKey, UserAgentFactory, UserAgentManager, UserAgentOptions, UserAgentStatus, UserAgentStatusKey, VoiceType, accumulateSec, accumulationTimer, cleanupMedia, getBeijingTime, getDevicePermission, getMedia, getTimes, getZeorTime, pauseMedia, playMedia, requestMicroPhonePermission, stopStreamTracks, userAgentDefault, userAgentStatus };