tencentcloud-sdk-nodejs-intl-en
Version:
1,651 lines (1,391 loc) • 239 kB
JavaScript
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* DescribeExtension request structure.
* @class
*/
class DescribeExtensionRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Extension.
* @type {string || null}
*/
this.ExtensionId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.ExtensionId = 'ExtensionId' in params ? params.ExtensionId : null;
}
}
/**
* StopAutoCalloutTask request structure.
* @class
*/
class StopAutoCalloutTaskRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Task id.
* @type {number || null}
*/
this.TaskId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.TaskId = 'TaskId' in params ? params.TaskId : null;
}
}
/**
* CreateIVRSession request structure.
* @class
*/
class CreateIVRSessionRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Called.
* @type {string || null}
*/
this.Callee = null;
/**
* Specified ivr id. currently, it supports inbound and automatic outbound types.
* @type {number || null}
*/
this.IVRId = null;
/**
* List of calling numbers.
* @type {Array.<string> || null}
*/
this.Callers = null;
/**
* Custom variable.
* @type {Array.<Variable> || null}
*/
this.Variables = null;
/**
* User data.
* @type {string || null}
*/
this.UUI = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.Callee = 'Callee' in params ? params.Callee : null;
this.IVRId = 'IVRId' in params ? params.IVRId : null;
this.Callers = 'Callers' in params ? params.Callers : null;
if (params.Variables) {
this.Variables = new Array();
for (let z in params.Variables) {
let obj = new Variable();
obj.deserialize(params.Variables[z]);
this.Variables.push(obj);
}
}
this.UUI = 'UUI' in params ? params.UUI : null;
}
}
/**
* HangUpCall request structure.
* @class
*/
class HangUpCallRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Session id.
* @type {string || null}
*/
this.SessionId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.SessionId = 'SessionId' in params ? params.SessionId : null;
}
}
/**
* CreateSDKLoginToken response structure.
* @class
*/
class CreateSDKLoginTokenResponse extends AbstractModel {
constructor(){
super();
/**
* SDK log-in token.
* @type {string || null}
*/
this.Token = null;
/**
* Expiry timestamp. unix timestamp.
* @type {number || null}
*/
this.ExpiredTime = null;
/**
* The path in which the sdk is loaded will change with its release.
* @type {string || null}
*/
this.SdkURL = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Token = 'Token' in params ? params.Token : null;
this.ExpiredTime = 'ExpiredTime' in params ? params.ExpiredTime : null;
this.SdkURL = 'SdkURL' in params ? params.SdkURL : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyStaff request structure.
* @class
*/
class ModifyStaffRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Agent account.
* @type {string || null}
*/
this.Email = null;
/**
* Agent name.
* @type {string || null}
*/
this.Name = null;
/**
* Agent phone number (preceded by 0086, example: 008618011111111).
* @type {string || null}
*/
this.Phone = null;
/**
* Agent nickname.
* @type {string || null}
*/
this.Nick = null;
/**
* Agent id.
* @type {string || null}
*/
this.StaffNo = null;
/**
* Bind skill group id list.
* @type {Array.<number> || null}
*/
this.SkillGroupIds = null;
/**
* Whether the cell phone outbound call switch is enabled or not.
* @type {boolean || null}
*/
this.UseMobileCallOut = null;
/**
* Cell phone answering pattern: 0 - off | 1 - only when offline | 2 - always.
* @type {number || null}
*/
this.UseMobileAccept = null;
/**
* Agent extension number (starting with 1 to 8, 4 - 6 digits).
* @type {string || null}
*/
this.ExtensionNumber = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.Email = 'Email' in params ? params.Email : null;
this.Name = 'Name' in params ? params.Name : null;
this.Phone = 'Phone' in params ? params.Phone : null;
this.Nick = 'Nick' in params ? params.Nick : null;
this.StaffNo = 'StaffNo' in params ? params.StaffNo : null;
this.SkillGroupIds = 'SkillGroupIds' in params ? params.SkillGroupIds : null;
this.UseMobileCallOut = 'UseMobileCallOut' in params ? params.UseMobileCallOut : null;
this.UseMobileAccept = 'UseMobileAccept' in params ? params.UseMobileAccept : null;
this.ExtensionNumber = 'ExtensionNumber' in params ? params.ExtensionNumber : null;
}
}
/**
* DescribeIvrAudioList response structure.
* @class
*/
class DescribeIvrAudioListResponse extends AbstractModel {
constructor(){
super();
/**
* Total quantity.
* @type {number || null}
*/
this.TotalCount = null;
/**
* File information.
* @type {Array.<AudioFileInfo> || null}
*/
this.FileInfo = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.FileInfo) {
this.FileInfo = new Array();
for (let z in params.FileInfo) {
let obj = new AudioFileInfo();
obj.deserialize(params.FileInfo[z]);
this.FileInfo.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* BindNumberCallOutSkillGroup response structure.
* @class
*/
class BindNumberCallOutSkillGroupResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ResetExtensionPassword request structure.
* @class
*/
class ResetExtensionPasswordRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Extension.
* @type {string || null}
*/
this.ExtensionId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.ExtensionId = 'ExtensionId' in params ? params.ExtensionId : null;
}
}
/**
* DisableCCCPhoneNumber response structure.
* @class
*/
class DisableCCCPhoneNumberResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeProtectedTelCdr response structure.
* @class
*/
class DescribeProtectedTelCdrResponse extends AbstractModel {
constructor(){
super();
/**
* Total number of call records.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Call record.
* @type {Array.<TelCdrInfo> || null}
*/
this.TelCdrs = null;
/**
* Call record.
* @type {Array.<TelCdrInfo> || null}
*/
this.TelCdrList = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.TelCdrs) {
this.TelCdrs = new Array();
for (let z in params.TelCdrs) {
let obj = new TelCdrInfo();
obj.deserialize(params.TelCdrs[z]);
this.TelCdrs.push(obj);
}
}
if (params.TelCdrList) {
this.TelCdrList = new Array();
for (let z in params.TelCdrList) {
let obj = new TelCdrInfo();
obj.deserialize(params.TelCdrList[z]);
this.TelCdrList.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeAutoCalloutTask request structure.
* @class
*/
class DescribeAutoCalloutTaskRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Task id.
* @type {number || null}
*/
this.TaskId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.TaskId = 'TaskId' in params ? params.TaskId : null;
}
}
/**
* CreateAICall request structure.
* @class
*/
class CreateAICallRequest extends AbstractModel {
constructor(){
super();
/**
* Application ID (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Called number.
* @type {string || null}
*/
this.Callee = null;
/**
* Model interface protocol types, currently compatible with three protocol types:
- OpenAI protocol (including GPT, DeepSeek, etc.):"openai"
- Azure protocol:"azure"
- Minimax protocol:"minimax"
* @type {string || null}
*/
this.LLMType = null;
/**
* Model API key, for authentication information, please refer to the respective model's official website
- OpenAI protocol: [GPT](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key), [DeepSeek](https://api-docs.deepseek.com/zh-cn/);
- Azure protocol: [Azure GPT](https://learn.microsoft.com/en-us/azure/ai-services/openai/chatgpt-quickstart?tabs=command-line%2Ctypescript%2Cpython-new&pivots=programming-language-studio#key-settings);
- Minimax:[Minimax](https://platform.minimaxi.com/document/Fast%20access?key=66701cf51d57f38758d581b2)
* @type {string || null}
*/
this.APIKey = null;
/**
* Model interface address
- OpenAI protocol
GPT:"https://api.openai.com/v1/"
Deepseek:"https://api.deepseek.com/v1"
- Azure protocol
"https://{your-resource-name}.openai.azure.com?api-version={api-version}"
- Minimax protocol
"https://api.minimax.chat/v1"
* @type {string || null}
*/
this.APIUrl = null;
/**
* ## Identity
You are Kate from the appointment department at Retell Health calling Cindy over the phone to prepare for the annual checkup coming up. You are a pleasant and friendly receptionist caring deeply for the user. You don't provide medical advice but would use the medical knowledge to understand user responses.
## Style Guardrails
Be Concise: Respond succinctly, addressing one topic at most.
Embrace Variety: Use diverse language and rephrasing to enhance clarity without repeating content.
Be Conversational: Use everyday language, making the chat feel like talking to a friend.
Be Proactive: Lead the conversation, often wrapping up with a question or next-step suggestion.
Avoid multiple questions in a single response.
Get clarity: If the user only partially answers a question, or if the answer is unclear, keep asking to get clarity.
Use a colloquial way of referring to the date (like Friday, January 14th, or Tuesday, January 12th, 2024 at 8am).
## Response Guideline
Adapt and Guess: Try to understand transcripts that may contain transcription errors. Avoid mentioning "transcription error" in the response.
Stay in Character: Keep conversations within your role's scope, guiding them back creatively without repeating.
Ensure Fluid Dialogue: Respond in a role-appropriate, direct manner to maintain a smooth conversation flow.
## Task
You will follow the steps below, do not skip steps, and only ask up to one question in response.
If at any time the user showed anger or wanted a human agent, call transfer_call to transfer to a human representative.
1. Begin with a self-introduction and verify if callee is Cindy.
- if callee is not Cindy, call end_call to hang up, say sorry for the confusion when hanging up.
- if Cindy is not available, call end_call politely to hang up, say you will call back later when hanging up.
2. Inform Cindy she has an annual body check coming up on April 4th, 2024 at 10am PDT. Check if Cindy is available.
- If not, tell Cindy to reschedule online and jump to step 5.
3. Ask Cindy if there's anything that the doctor should know before the annual checkup.
- Ask followup questions as needed to assess the severity of the issue, and understand how it has progressed.
4. Tell Cindy to not eat or drink that day before the checkup. Also tell Cindy to give you a callback if there's any changes in health condition.
5. Ask Cindy if she has any questions, and if so, answer them until there are no questions.
- If user asks something you do not know, let them know you don't have the answer. Ask them if they have any other questions.
- If user do not have any questions, call function end_call to hang up.
* @type {string || null}
*/
this.SystemPrompt = null;
/**
* Model name, such as
- OpenAI protocol
"gpt-4o-mini","gpt-4o","deepseek-chat";
- Azure protocol
"gpt-4o-mini", "gpt-4o";
- Minimax protocol
"deepseek-chat".
* @type {string || null}
*/
this.Model = null;
/**
* The following voice parameter values are available by default. If you wish to customize the voice type, please leave VoiceType blank and configure it in the CustomTTSConfig parameter.
Chinese:
ZhiMei: Zhimei, customer service female voice
ZhiXi: Zhixi, general female voice
ZhiQi: Zhiqi, customer service female voice
ZhiTian: Zhitian, female child voice
AiXiaoJing: Ai Xiaojing, dialogue female voice
English:
WeRose:English Female Voice
Monika:English Female Voice
Japanese:
Nanami
Korean:
SunHi
Indonesian (Indonesia):
Gadis
Malay (Malaysia):
Yasmin
Tamil (Malaysia):
Kani
Thai (Thailand):
Achara
Vietnamese (Vietnam):
HoaiMy
* @type {string || null}
*/
this.VoiceType = null;
/**
* Caller number list
* @type {Array.<string> || null}
*/
this.Callers = null;
/**
* Used to set the AI Agent Welcome Message.
* @type {string || null}
*/
this.WelcomeMessage = null;
/**
* 0: Use welcomeMessage (if empty, the callee speaks first; if not empty, the bot speaks first)
1: Use AI to automatically generate welcomeMessage and speak first based on the prompt
* @type {number || null}
*/
this.WelcomeType = null;
/**
* 0: interruptible by default, 1: high priority and not interruptible.
* @type {number || null}
*/
this.WelcomeMessagePriority = null;
/**
* Maximum Waiting Duration (milliseconds), default is 60 seconds, if the user does not speak within this time, the call is automatically terminated
* @type {number || null}
*/
this.MaxDuration = null;
/**
* ASR Supported Languages, default is "zh" Chinese,
Fill in the array with up to 4 languages, the first is the primary language for recognition, followed by optional languages,
Note: When the primary language is a Chinese dialect, optional languages are invalid
Currently, the supported languages are as follows. The English name of the language is on the left side of the equals sign, and the value to be filled in the Language field is on the right side, following ISO639:
1. Chinese = "zh" # Chinese
2. Chinese_TW = "zh-TW" # Taiwan (China)
3. Chinese_DIALECT = "zh-dialect" # Chinese Dialect
4. English = "en" # English
5. Vietnamese = "vi" # Vietnamese
6. Japanese = "ja" # Japanese
7. Korean = "ko" # Korean
8. Indonesia = "id" # Indonesian
9. Thai = "th" # Thai
10. Portuguese = "pt" # Portuguese
11. Turkish = "tr" # Turkish
12. Arabic = "ar" # Arabic
13. Spanish = "es" # Spanish
14. Hindi = "hi" # Hindi
15. French = "fr" # French
16. Malay = "ms" # Malay
17. Filipino = "fil" # Filipino
18. German = "de" # German
19. Italian = "it" # Italian
20. Russian = "ru" # Russian
* @type {Array.<string> || null}
*/
this.Languages = null;
/**
* Interrupt ai speaking mode. default is 0. 0 indicates automatic interruption and 1 indicates no interruption.
* @type {number || null}
*/
this.InterruptMode = null;
/**
* Used when InterruptMode is 0, unit in milliseconds, default is 500ms. It means that the server-side detects ongoing vocal input for the InterruptSpeechDuration milliseconds and then interrupts.
* @type {number || null}
*/
this.InterruptSpeechDuration = null;
/**
* Whether the model supports (or enables) call_end function calling
* @type {boolean || null}
*/
this.EndFunctionEnable = null;
/**
* Effective when EndFunctionEnable is true; the description of call_end function calling, default is "End the call when user has to leave (like says bye) or you are instructed to do so."
* @type {string || null}
*/
this.EndFunctionDesc = null;
/**
* Whether the model supports (or enables) transfer_to_human function calling.
* @type {boolean || null}
*/
this.TransferFunctionEnable = null;
/**
* Takes effect when transferfunctionenable is true: transfer to human configuration.
* @type {Array.<AITransferItem> || null}
*/
this.TransferItems = null;
/**
* The duration after which the user hasn't spoken to trigger a notification, minimum 10 seconds, default 10 seconds
* @type {number || null}
*/
this.NotifyDuration = null;
/**
* The AI prompt when NotifyDuration has passed without the user speaking, default is "Sorry, I didn't hear you clearly. Can you repeat that?"
* @type {string || null}
*/
this.NotifyMessage = null;
/**
* Maximum number of times to trigger ai prompt sound, unlimited by default.
* @type {number || null}
*/
this.NotifyMaxCount = null;
/**
* <p>And VoiceType field needs to select one, here is to use your own custom TTS, VoiceType is some built-in sound qualities</p>
<ul>
<li>Tencent TTS<br>
For configuration, please refer to <a href="https://intl.cloud.tencent.com/document/product/1073/92668?from_cn_redirect=1#55924b56-1a73-4663-a7a1-a8dd82d6e823" target="_blank">Tencent Cloud TTS documentation link</a></li>
</ul>
<div><div class="v-md-pre-wrapper copy-code-mode v-md-pre-wrapper- extra-class"><pre class="v-md-prism-"><code>{
"TTSType": "tencent", // String TTS type, currently supports "tencent" and "minixmax", other vendors support in progress
"AppId": "Your application ID", // String required
"SecretId": "Your Secret ID", // String Required
"SecretKey": "Your Secret Key", // String Required
"VoiceType": 101001, // Integer Required, Sound quality ID, includes standard and premium sound quality. Premium sound quality is more realistic and differently priced than standard sound quality. See TTS billing overview for details. For the full list of sound quality IDs, see the TTS sound quality list.
"Speed": 1.25, // Integer Optional, speech speed, range: [-2,6], corresponding to different speeds: -2: represents 0.6x -1: represents 0.8x 0: represents 1.0x (default) 1: represents 1.2x 2: represents 1.5x 6: represents 2.5x For more precise speed control, you can retain two decimal places, such as 0.5/1.25/2.81, etc. For parameter value to actual speed conversion, refer to Speed Conversion
"Volume": 5, // Integer Optional, Volume level, range: [0,10], corresponding to 11 levels of volume, default is 0, which represents normal volume.
"PrimaryLanguage": 1, // Integer Optional, Primary language 1- Chinese (default) 2- English 3- Japanese
"FastVoiceType": "xxxx" // Optional parameter, Fast VRS parameter
}
</code></pre>
</div></div><ul>
</div></div><ul>
<li>Azure TTS<br>
For configuration, refer to the<a href="https://docs.azure.cn/zh-cn/ai-services/speech-service/speech-synthesis-markup-voice" target="_blank">Azure TTS documentation</a></li>
</ul>
<div><div class="v-md-pre-wrapper copy-code-mode v-md-pre-wrapper- extra-class"><pre class="v-md-prism-"><code>{
"TTSType": "azure", // Required: String TTS type
"SubscriptionKey": "xxxxxxxx", // Required: String subscription key
"Region": "chinanorth3", // Required: String subscription region
"VoiceName": "zh-CN-XiaoxiaoNeural", // Required: String Timbre Name required
"Language": "zh-CN", // Required: String Language for synthesis
"Rate": 1 // Optional: float Playback Speed 0.5-2 default is 1
}
</code></pre>
</div></div><ul>
<li>Custom</li>
</ul>
<p>TTS<br>
Please refer to the specific protocol standards in the <a href="https://doc.weixin.qq.com/doc/w3_ANQAiAbdAFwHILbJBmtSqSbV1WZ3L?scode=AJEAIQdfAAo5a1xajYANQAiAbdAFw" target="_blank">Tencent documentation</a></p>
<div><div class="v-md-pre-wrapper copy-code-mode v-md-pre-wrapper- extra-class"><pre class="v-md-prism-"><code>{
"TTSType": "custom", // Required String
"APIKey": "ApiKey", // Required String for Authentication
"APIUrl": "http://0.0.0.0:8080/stream-audio" // Required String, TTS API URL
"AudioFormat": "wav", // String, optional, expected audio format, such as mp3, ogg_opus, pcm, wav, default is wav, currently only pcm and wav are supported,
"SampleRate": 16000, // Integer, optional, audio sample rate, default is 16000 (16k), recommended value is 16000
"AudioChannel": 1, // Integer, optional, number of audio channels, values: 1 or 2, default is 1
}
</code></pre>
</div></div>
* @type {string || null}
*/
this.CustomTTSConfig = null;
/**
* Prompt word variable.
* @type {Array.<Variable> || null}
*/
this.PromptVariables = null;
/**
* Automatic speech recognition vad time ranges from 240 to 2000, with a default of 1000, measured in milliseconds. smaller values will make automatic speech recognition segment faster.
* @type {number || null}
*/
this.VadSilenceTime = null;
/**
* Call content extraction configuration.
* @type {Array.<AICallExtractConfigElement> || null}
*/
this.ExtractConfig = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.Callee = 'Callee' in params ? params.Callee : null;
this.LLMType = 'LLMType' in params ? params.LLMType : null;
this.APIKey = 'APIKey' in params ? params.APIKey : null;
this.APIUrl = 'APIUrl' in params ? params.APIUrl : null;
this.SystemPrompt = 'SystemPrompt' in params ? params.SystemPrompt : null;
this.Model = 'Model' in params ? params.Model : null;
this.VoiceType = 'VoiceType' in params ? params.VoiceType : null;
this.Callers = 'Callers' in params ? params.Callers : null;
this.WelcomeMessage = 'WelcomeMessage' in params ? params.WelcomeMessage : null;
this.WelcomeType = 'WelcomeType' in params ? params.WelcomeType : null;
this.WelcomeMessagePriority = 'WelcomeMessagePriority' in params ? params.WelcomeMessagePriority : null;
this.MaxDuration = 'MaxDuration' in params ? params.MaxDuration : null;
this.Languages = 'Languages' in params ? params.Languages : null;
this.InterruptMode = 'InterruptMode' in params ? params.InterruptMode : null;
this.InterruptSpeechDuration = 'InterruptSpeechDuration' in params ? params.InterruptSpeechDuration : null;
this.EndFunctionEnable = 'EndFunctionEnable' in params ? params.EndFunctionEnable : null;
this.EndFunctionDesc = 'EndFunctionDesc' in params ? params.EndFunctionDesc : null;
this.TransferFunctionEnable = 'TransferFunctionEnable' in params ? params.TransferFunctionEnable : null;
if (params.TransferItems) {
this.TransferItems = new Array();
for (let z in params.TransferItems) {
let obj = new AITransferItem();
obj.deserialize(params.TransferItems[z]);
this.TransferItems.push(obj);
}
}
this.NotifyDuration = 'NotifyDuration' in params ? params.NotifyDuration : null;
this.NotifyMessage = 'NotifyMessage' in params ? params.NotifyMessage : null;
this.NotifyMaxCount = 'NotifyMaxCount' in params ? params.NotifyMaxCount : null;
this.CustomTTSConfig = 'CustomTTSConfig' in params ? params.CustomTTSConfig : null;
if (params.PromptVariables) {
this.PromptVariables = new Array();
for (let z in params.PromptVariables) {
let obj = new Variable();
obj.deserialize(params.PromptVariables[z]);
this.PromptVariables.push(obj);
}
}
this.VadSilenceTime = 'VadSilenceTime' in params ? params.VadSilenceTime : null;
if (params.ExtractConfig) {
this.ExtractConfig = new Array();
for (let z in params.ExtractConfig) {
let obj = new AICallExtractConfigElement();
obj.deserialize(params.ExtractConfig[z]);
this.ExtractConfig.push(obj);
}
}
}
}
/**
* CreateAdminURL response structure.
* @class
*/
class CreateAdminURLResponse extends AbstractModel {
constructor(){
super();
/**
* Log-In link.
* @type {string || null}
*/
this.URL = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.URL = 'URL' in params ? params.URL : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* PausePredictiveDialingCampaign request structure.
* @class
*/
class PausePredictiveDialingCampaignRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* Task id.
* @type {number || null}
*/
this.CampaignId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.CampaignId = 'CampaignId' in params ? params.CampaignId : null;
}
}
/**
* CreateCallOutSession response structure.
* @class
*/
class CreateCallOutSessionResponse extends AbstractModel {
constructor(){
super();
/**
* Newly created session id.
* @type {string || null}
*/
this.SessionId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SessionId = 'SessionId' in params ? params.SessionId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DisableCCCPhoneNumber request structure.
* @class
*/
class DisableCCCPhoneNumberRequest extends AbstractModel {
constructor(){
super();
/**
* Number list starting with 0086.
* @type {Array.<string> || null}
*/
this.PhoneNumbers = null;
/**
* Disable switch: 0 for enable, 1 for disable.
* @type {number || null}
*/
this.Disabled = null;
/**
* TCCC instance application id.
* @type {number || null}
*/
this.SdkAppId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.PhoneNumbers = 'PhoneNumbers' in params ? params.PhoneNumbers : null;
this.Disabled = 'Disabled' in params ? params.Disabled : null;
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
}
}
/**
* ModifyStaffPassword response structure.
* @class
*/
class ModifyStaffPasswordResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* CreatePredictiveDialingCampaign request structure.
* @class
*/
class CreatePredictiveDialingCampaignRequest extends AbstractModel {
constructor(){
super();
/**
* Application id (required) can be found at https://console.cloud.tencent.com/ccc.
* @type {number || null}
*/
this.SdkAppId = null;
/**
* <Task name>.
* @type {string || null}
*/
this.Name = null;
/**
* Called list supporting e.164 or number formats without country code.
* @type {Array.<string> || null}
*/
this.Callees = null;
/**
* Calling list using the number formats displayed on the management side.
* @type {Array.<string> || null}
*/
this.Callers = null;
/**
* Being called sequence: 0 for random 1 for in order.
* @type {number || null}
*/
this.CallOrder = null;
/**
* ID of the used skill group of agents.
* @type {number || null}
*/
this.SkillGroupId = null;
/**
* Running priority of multiple tasks in the same application, from high to low 1 - 5.
* @type {number || null}
*/
this.Priority = null;
/**
* Expected call drop rate, percentage, 5 - 50.
* @type {number || null}
*/
this.ExpectedAbandonRate = null;
/**
* Call retry interval, in seconds, [60 - 86,400].
* @type {number || null}
*/
this.RetryInterval = null;
/**
* Task start time. unix timestamp. the task will automatically start after this time.
* @type {number || null}
*/
this.StartTime = null;
/**
* Task termination time. unix timestamp. the task will automatically terminate after this time.
* @type {number || null}
*/
this.EndTime = null;
/**
* Specified ivr id.
* @type {number || null}
*/
this.IVRId = null;
/**
* Number of call retries, 0 - 2.
* @type {number || null}
*/
this.RetryTimes = null;
/**
* Custom variable.
* @type {Array.<Variable> || null}
*/
this.Variables = null;
/**
* UUI
* @type {string || null}
*/
this.UUI = null;
/**
* Property of the called.
* @type {Array.<CalleeAttribute> || null}
*/
this.CalleeAttributes = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SdkAppId = 'SdkAppId' in params ? params.SdkAppId : null;
this.Name = 'Name' in params ? params.Name : null;
this.Callees = 'Callees' in params ? params.Callees : null;
this.Callers = 'Callers' in params ? params.Callers : null;
this.CallOrder = 'CallOrder' in params ? params.CallOrder : null;
this.SkillGroupId = 'SkillGroupId' in params ? params.SkillGroupId : null;
this.Priority = 'Priority' in params ? params.Priority : null;
this.ExpectedAbandonRate = 'ExpectedAbandonRate' in params ? params.ExpectedAbandonRate : null;
this.RetryInterval = 'RetryInterval' in params ? params.RetryInterval : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.IVRId = 'IVRId' in params ? params.IVRId : null;
this.RetryTimes = 'RetryTimes' in params ? params.RetryTimes : null;
if (params.Variables) {
this.Variables = new Array();
for (let z in params.Variables) {
let obj = new Variable();
obj.deserialize(params.Variables[z]);
this.Variables.push(obj);
}
}
this.UUI = 'UUI' in params ? params.UUI : null;
if (params.CalleeAttributes) {
this.CalleeAttributes = new Array();
for (let z in params.CalleeAttributes) {
let obj = new CalleeAttribute();
obj.deserialize(params.CalleeAttributes[z]);
this.CalleeAttributes.push(obj);
}
}
}
}
/**
* AbortAgentCruiseDialingCampaign response structure.
* @class
*/
class AbortAgentCruiseDialingCampaignResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Participant information.
* @class
*/
class ServeParticipant extends AbstractModel {
constructor(){
super();
/**
* Agent email.
* @type {string || null}
*/
this.Mail = null;
/**
* Agent phone number.
* @type {string || null}
*/
this.Phone = null;
/**
* Ringing timestamp, unix second-level timestamp.
* @type {number || null}
*/
this.RingTimestamp = null;
/**
* Answer timestamp. unix second-level timestamp.
* @type {number || null}
*/
this.AcceptTimestamp = null;
/**
* End timestamp. unix second-level timestamp.
* @type {number || null}
*/
this.EndedTimestamp = null;
/**
* Recording id can be indexed to the agent side recording.
* @type {string || null}
*/
this.RecordId = null;
/**
* Participant type: "staffseat", "outboundseat", "staffphoneseat".
* @type {string || null}
*/
this.Type = null;
/**
* Transfer source agent information.
* @type {string || null}
*/
this.TransferFrom = null;
/**
* Transfer source participant type is consistent with the type value.
* @type {string || null}
*/
this.TransferFromType = null;
/**
* Transfer destination agent information.
* @type {string || null}
*/
this.TransferTo = null;
/**
* Transfer destination participant type, which is consistent with type values.
* @type {string || null}
*/
this.TransferToType = null;
/**
* Skill group id.
* @type {number || null}
*/
this.SkillGroupId = null;
/**
* Ending status.
* @type {string || null}
*/
this.EndStatusString = null;
/**
* Recording url.
* @type {string || null}
*/
this.RecordURL = null;
/**
* Participant sequence number, starting from 0.
* @type {number || null}
*/
this.Sequence = null;
/**
* Start timestamp. unix second-level timestamp.
* @type {number || null}
*/
this.StartTimestamp = null;
/**
* Skill group name.
* @type {string || null}
*/
this.SkillGroupName = null;
/**
* Address of the third-party cos for transferring recording.
* @type {string || null}
*/
this.CustomRecordURL = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Mail = 'Mail' in params ? params.Mail : null;
this.Phone = 'Phone' in params ? params.Phone : null;
this.RingTimestamp = 'RingTimestamp' in params ? params.RingTimestamp : null;
this.AcceptTimestamp = 'AcceptTimestamp' in params ? params.AcceptTimestamp : null;
this.EndedTimestamp = 'EndedTimestamp' in params ? params.EndedTimestamp : null;
this.RecordId = 'RecordId' in params ? params.RecordId : null;
this.Type = 'Type' in params ? params.Type : null;
this.TransferFrom = 'TransferFrom' in params ? params.TransferFrom : null;
this.TransferFromType = 'TransferFromType' in params ? params.TransferFromType : null;
this.TransferTo = 'TransferTo' in params ? params.TransferTo : null;
this.TransferToType = 'TransferToType' in params ? params.TransferToType : null;
this.SkillGroupId = 'SkillGroupId' in params ? params.SkillGroupId : null;
this.EndStatusString = 'EndStatusString' in params ? params.EndStatusString : null;
this.RecordURL = 'RecordURL' in params ? params.RecordURL : null;
this.Sequence = 'Sequence' in params ? params.Sequence : null;
this.StartTimestamp = 'StartTimestamp' in params ? params.StartTimestamp : null;
this.SkillGroupName = 'SkillGroupName' in params ? params.SkillGroupName : null;
this.CustomRecordURL = 'CustomRecordURL' in params ? params.CustomRecordURL : null;
}
}
/**
* AI call extraction result.
* @class
*/
class AICallExtractResultElement extends AbstractModel {
constructor(){
super();
/**
* Type of extracted information.
Text.
Selector options.
Boolean value.
Number.
* @type {string || null}
*/
this.InfoType = null;
/**
* Name of the extracted information.
* @type {string || null}
*/
this.InfoName = null;
/**
* Specific description of the extracted information.
* @type {string || null}
*/
this.InfoContent = null;
/**
* Specific result of the extracted information.
* @type {AICallExtractResultInfo || null}
*/
this.Result = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InfoType = 'InfoType' in params ? params.InfoType : null;
this.InfoName = 'InfoName' in params ? params.InfoName : null;
this.InfoContent = 'InfoContent' in params ? params.InfoContent : null;
if (params.Result) {
let obj = new AICallExtractResultInfo();
obj.deserialize(params.Result)
this.Result = obj;
}
}
}
/**
* DescribeTelCallInfo response structure.
* @class
*/
class DescribeTelCallInfoResponse extends AbstractModel {
constructor(){
super();
/**
* Number of minutes consumed by outbound package.
* @type {number || null}
*/
this.TelCallOutCount = null;
/**
* Number of minutes consumed by inbound package.
* @type {number || null}
*/
this.TelCallInCount = null;
/**
* Number of agent usage statistics.
* @type {number || null}
*/
this.SeatUsedCount = null;
/**
* Number of minutes consumed by audio package.
* @type {number || null}
*/
this.VoipCallInCount = null;
/**
* Number of minutes consumed by audio package.
* @type {number || null}
*/
this.VOIPCallInCount = null;
/**
* Number of minutes consumed by offline speech-to-text package.
* @type {number || null}
*/
this.AsrOfflineCount = null;
/**
* Number of minutes consumed by real-time speech-to-text package.
* @type {number || null}
*/
this.AsrRealtimeCount = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TelCallOutCount = 'TelCallOutCount' in params ? params.TelCallOutCount : null;
this.TelCallInCount = 'TelCallInCount' in params ? params.TelCallInCount : null;
this.SeatUsedCount = 'SeatUsedCount' in params ? params.SeatUsedCount : null;
this.VoipCallInCount = 'VoipCallInCount' in params ? params.VoipCallInCount : null;
this.VOIPCallInCount = 'VOIPCallInCount' in params ? params.VOIPCallInCount : null;
this.AsrOfflineCount = 'AsrOfflineCount' in params ? params.AsrOfflineCount : null;
this.AsrRealtimeCount = 'AsrRealtimeCount' in params ? params.AsrRealtimeCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeExtensions response structure.
* @class
*/
class DescribeExtensionsResponse extends AbstractModel {
constructor(){
super();
/**
* Total query count.
* @type {number || null}
*/
this.Total = null;
/**
* Telephone information list.
* @type {Array.<ExtensionInfo> || null}
*/
this.ExtensionList = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Total = 'Total' in params ? params.Total : null;
if (params.ExtensionList) {
this.ExtensionList = new Array();
for (let z in params.ExtensionList) {
let obj = new ExtensionInfo();
o