Source: lib/TcccDefines.js

/**
 * TCCC 关键类型定义<br>
 * @description 登录、通话结束原因等枚举和常量值的定义
 */

/**
 * 登录模式,<br>
 * - Sip: sip模式 <br>
 * - Agent: 坐席模式,推荐用该模式 <br>
 * - NoDomainModel:特殊模式(为企点提供),外部客户不需要使用该类型 <br>
 * @enum {Number}
 */
const TCCCLoginType_HACK_JSDOC = {
  /**
   * sip模式
   */
  Sip : 0,
  /**
   * 坐席模式
   */
  Agent : 1,
  /**
   * 特殊模式(为企点提供),外部客户不需要使用该类型
   */
  NoDomainModel : 2,
};
export var TCCCLoginType;
(function (TCCCLoginType) {
  TCCCLoginType[TCCCLoginType["Sip"] = 0] = "Sip";
  TCCCLoginType[TCCCLoginType["Agent"] = 1] = "Agent";
  TCCCLoginType[TCCCLoginType["NoDomainModel"] = 2] = "NoDomainModel";
})(TCCCLoginType || (TCCCLoginType = {}));

/**
 * 通话结束原因
 * @enum {Number}
 */
const TCCCEndReason_HACK_JSDOC = {
  /**
   * 系统错误
   */
  Error:0,
  /**
   * 超时
   */
  Timeout:1,
  
  /**
   * ended due to being replaced
   */
  Replaced:2,
  /**
   * 主叫挂断
   */
  LocalBye:3,
  /**
   * 对端挂断
   */
  RemoteBye:4,
  /**
   * 主叫取消拨打
   */
  LocalCancel:5,
  
  /**
   * 对端取消拨打
   */
  RemoteCancel:6,
  
  /**
   * 对端拒绝
   */
  Rejected:7,  // Only as UAS, UAC has distinct onFailure callback
  /**
   * 被转接而结束
   */
  Referred:8  //! slg! - This is really Redirected - not sure why it is called Referred.  Only gets used when we send a
            //! redirect (ie: 302).
};
export var TCCCEndReason;
(function (TCCCEndReason) {
  TCCCEndReason[TCCCEndReason["Error"] = 0] = "Error";
  TCCCEndReason[TCCCEndReason["Timeout"] = 1] = "Timeout";
  TCCCEndReason[TCCCEndReason["Replaced"] = 2] = "Replaced";
  TCCCEndReason[TCCCEndReason["LocalBye"] = 3] = "LocalBye";
  TCCCEndReason[TCCCEndReason["RemoteBye"] = 4] = "RemoteBye";
  TCCCEndReason[TCCCEndReason["LocalCancel"] = 5] = "LocalCancel";
  TCCCEndReason[TCCCEndReason["RemoteCancel"] = 6] = "RemoteCancel";
  TCCCEndReason[TCCCEndReason["Rejected"] = 7] = "Rejected";
  TCCCEndReason[TCCCEndReason["Referred"] = 8] = "Referred";

})(TCCCEndReason || (TCCCEndReason = {}));


/**
 * 登录参数
 * @param {Number}       sdkAppId      - 【字段含义】应用标识(必填),腾讯视频云基于 sdkAppId 完成计费统计。<br>
 *                                       推荐取值】在 [呼叫中心控制台](https://console.cloud.tencent.com/cccc/) 创建应用后可以在账号信息页面中得到该 ID。<br>
 * @param {String}       userId        - 【字段含义】用户标识(必填)。当前用户的 userId,相当于用户名,UTF-8编码。<br>
 *                                       【推荐取值】格式 <scheme> : <user> @<host>。如sip:3013@1400xxxx.tccc.qcloud.com,其中3013为分机号,1400xxxx为你的tccc应用ID。 <br>
 * @param {String}       token         - 【字段含义】。<br>
 *                                       【推荐取值】。<br>
 * @param {String}       password      - 【字段含义】密码。<br>
 *                                       【推荐取值】。<br>
 * @param {TCCCLoginType}type          - 【字段含义】登录类型。<br>
 *                                       【推荐取值】。<br>
 * 
 */
export class TCCCLoginParams {
  constructor(sdkAppId, userId, token, password, type){
    this.userId = userId;
    this.sdkAppId = sdkAppId;
    this.token = token;
    this.password = password;
    this.type = type;
  }
}

/**
 * 会话信息 <br>
 * - CallIn: 呼入 <br>
 * - CallOut: 呼出 <br>
 *
 * @enum {Number}
 */
const TCCCSessionDirection_HACK_JSDOC = {
  /**
   * 呼入
   */
  CallIn : 0,
  
  /**
   * 呼出
   */
  CallOut : 1,
};
export var TCCCSessionDirection;
(function (TCCCSessionDirection) {
  TCCCSessionDirection[TCCCSessionDirection["CallIn"] = 0] = "CallIn";
  TCCCSessionDirection[TCCCSessionDirection["CallOut"] = 1] = "CallOut";
})(TCCCSessionDirection || (TCCCSessionDirection = {}));


/**
 * 音频路由(即声音的播放模式) <br>
 * - Speakerphone:使用扬声器播放(即“免提”),扬声器位于手机底部,声音偏大,适合外放音乐。<br>
 * - Earpiece:使用听筒播放,听筒位于手机顶部,声音偏小,适合需要保护隐私的通话场景。<br>
 *
 * @enum {Number}
 */
const TCCCAudioRoute_HACK_JSDOC = {
  /**
   * Speakerphone:使用扬声器播放(即“免提”),扬声器位于手机底部,声音偏大,适合外放音乐。
   */
  Speakerphone : 0,

  /**
   * Earpiece:使用听筒播放,听筒位于手机顶部,声音偏小,适合需要保护隐私的通话场景。
   */
  Earpiece : 1,
};
export var TCCCAudioRoute;
(function (TCCCAudioRoute) {
  TCCCAudioRoute[TCCCAudioRoute["Speakerphone"] = 0] = "Speakerphone";
  TCCCAudioRoute[TCCCAudioRoute["Earpiece"] = 1] = "Earpiece";
})(TCCCAudioRoute || (TCCCAudioRoute = {}));