@94ai/softphone 6.0.6 → 6.0.8

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
@@ -3435,19 +3435,23 @@ declare enum SIPExtension {
3435
3435
  Supported = "Supported",
3436
3436
  Unsupported = "Unsupported"
3437
3437
  }
3438
+ type AutoIgnoreTraceInfo = {
3439
+ CALLID: string;
3440
+ INVITE: string;
3441
+ ENTRY: string;
3442
+ TIMESTAMP: string;
3443
+ CODE: string;
3444
+ ERR_MESSAGE: string;
3445
+ };
3446
+ type ApiAutoIgnoreTraceInfo = Omit<AutoIgnoreTraceInfo, "ENTRY"> & {
3447
+ ENTRY: string[];
3448
+ };
3438
3449
  /**
3439
3450
  * Options for {@link UserAgent} constructor.
3440
3451
  * @public
3441
3452
  */
3442
3453
  interface UserAgentOptions$1 {
3443
- errorCallback?: (info: {
3444
- CALLID: string;
3445
- INVITE: string;
3446
- ENTRY: string;
3447
- TIMESTAMP: string;
3448
- CODE: string;
3449
- ERR_MESSAGE: string;
3450
- }) => void;
3454
+ errorCallback?: (info: AutoIgnoreTraceInfo) => void;
3451
3455
  /**
3452
3456
  * If `true`, the user agent will accept out of dialog NOTIFY.
3453
3457
  * @remarks
@@ -5334,12 +5338,15 @@ interface UserAgentOptionsSDK {
5334
5338
  refreshSpeekVolumn?: Function;
5335
5339
  refreshRequirementCheck?: Function;
5336
5340
  refreshChat?: Function;
5341
+ errorCallback?: Function;
5337
5342
  enableChatInfoPush?: boolean;
5338
5343
  enableVolumnTrack?: boolean;
5344
+ armsReport?: boolean;
5339
5345
  clusterMode?: boolean;
5340
5346
  reClusterRegisterTimeout?: number;
5341
5347
  reClusterConnectTimeout?: number;
5342
5348
  }
5349
+ type ExposeAliArmsApi = `softphone-sdk-hangup` | `softphone-sdk-seats-status-change` | `softphone-sdk-accept` | `softphone-sdk-connect` | `softphone-sdk-ignore` | `softphone-sdk-manual-call` | 'softphone-sdk-send-star-dtmf';
5343
5350
  type UserAgentOptions = UserAgentOptions$1 & UserAgentOptionsSDK;
5344
5351
  type ajaxOption = {
5345
5352
  type: 'GET' | 'POST';
@@ -5354,10 +5361,20 @@ type ajaxOption = {
5354
5361
  declare class UserAgentManager {
5355
5362
  #private;
5356
5363
  token: string;
5364
+ get armsReportFlag(): boolean;
5357
5365
  /**
5358
5366
  * 坐席讲话音量
5359
5367
  */
5360
5368
  get volumeValue(): number;
5369
+ armsReport(info: {
5370
+ api: ExposeAliArmsApi;
5371
+ traceId: string;
5372
+ code: string;
5373
+ success: boolean;
5374
+ time: number;
5375
+ businessInfo: Record<string, any>;
5376
+ begin: number;
5377
+ }): void;
5361
5378
  networkSpeed: string;
5362
5379
  networkDelay: string;
5363
5380
  onLine: boolean;
@@ -5366,6 +5383,10 @@ declare class UserAgentManager {
5366
5383
  goodNetworkDelay: () => boolean;
5367
5384
  authorizedMicrophonePermissions: boolean;
5368
5385
  authorizedNotificationPermissions: boolean;
5386
+ get appKey(): string;
5387
+ get agentTag(): string;
5388
+ get agentExtension(): string;
5389
+ get agentId(): number;
5369
5390
  get businessAttribute(): Record<string, any>;
5370
5391
  /**
5371
5392
  * 每次来电是否自动接听
@@ -5595,7 +5616,36 @@ declare const accumulateSec: (date: Date) => Date;
5595
5616
  * @param { Function } refresh 回调
5596
5617
  * @return Function 销毁计时器
5597
5618
  */
5598
- declare function accumulationTimer(refresh: Function): () => void;
5619
+ declare function accumulationTimer(refresh: Function): () => void;
5620
+ declare function getBeijingTime(): string;
5621
+
5622
+ declare class CallbackAggregator {
5623
+ onAggregateCallback: (info: ApiAutoIgnoreTraceInfo) => void;
5624
+ debounceTime: number;
5625
+ pendingCalls: Map<string, {
5626
+ timer: ReturnType<typeof setTimeout> | undefined;
5627
+ data: ApiAutoIgnoreTraceInfo;
5628
+ count: number;
5629
+ }>;
5630
+ constructor(onAggregateCallback: (info: ApiAutoIgnoreTraceInfo) => void, debounceTime?: number);
5631
+ /**
5632
+ * 接收单次回调的方法
5633
+ * @param {Object} callbackData - 原始的回调参数
5634
+ */
5635
+ receive(callbackData: AutoIgnoreTraceInfo): Promise<void>;
5636
+ /**
5637
+ * 执行最终合并后的回调
5638
+ * @param {String} callId - 需要清理并执行的 callId
5639
+ */
5640
+ _flush(callId: string): Promise<void>;
5641
+ }
5642
+
5643
+ declare class AliArms {
5644
+ #private;
5645
+ static getAliArms(uid?: any): any;
5646
+ static getAliArmsList(): any[];
5647
+ static errReport(err: any, uid?: any): void;
5648
+ }
5599
5649
 
5600
5650
  /**
5601
5651
  * 代理实例工厂
@@ -5608,4 +5658,4 @@ declare class UserAgentFactory {
5608
5658
  static dispose(): void;
5609
5659
  }
5610
5660
 
5611
- export { 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, getDevicePermission, getMedia, getTimes, getZeorTime, pauseMedia, playMedia, requestMicroPhonePermission, stopStreamTracks, userAgentDefault, userAgentStatus };
5661
+ 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 };