import Vnmf from '../../index' declare module '../../index' { namespace updateVoIPChatMuteConfig { interface Option { /** Mute Settings */ muteConfig: MuteConfig /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } /** Mute Settings */ interface MuteConfig { /** Whether or not to remain silent mic */ muteMicrophone?: boolean /** Can not get message: %s */ muteEarphone?: boolean } } namespace subscribeVoIPVideoMembers { interface Option { /** Subscription membership list */ openIdList: string[] /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } } namespace setEnable1v1Chat { interface Option { /** Whether or not to open */ enable: boolean /** Window Background Color * @default 0 */ backgroundType?: keyof ColorType /** Small window style * @default 1 */ minWindowType?: keyof ColorType /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } /** Audio call background and window mode */ interface ColorType { /** #262930 */ 0 /** #FA5151 */ 1 /** #FA9D3B */ 2 /** #3D7257 */ 3 /** #1485EE */ 4 /** #6467F0 */ 5 } } namespace onVoIPVideoMembersChanged { interface Result extends VnmfGeneral.CallbackResult { /** Turn on the list of members video. */ openIdList: string[] /** Error Code */ errCode: number /** Call Results */ errMsg: string } /** Echo function for real-time voice call member video state change events */ type Callback = (res: Result) => void } namespace onVoIPChatStateChanged { interface Result extends VnmfGeneral.CallbackResult { /** Event Code */ code: number /** Can not open message */ data: Record /** Error Code */ errCode: number /** Call Results */ errMsg: string } /** Respond function for room state change events */ type Callback = (res: Result) => void } namespace onVoIPChatSpeakersChanged { interface Result extends VnmfGeneral.CallbackResult { /** He's a member of real-time voice call. openId List */ openIdList: string[] /** Error Code */ errCode: number /** Call Results */ errMsg: string } /** Respond function for room state change events */ type Callback = (res: Result) => void } namespace onVoIPChatMembersChanged { interface Result extends VnmfGeneral.CallbackResult { /** He's a member of real-time voice call. openId List */ openIdList: string[] /** Error Code */ errCode: number /** Call Results */ errMsg: string } /** Respond function for room state change events */ type Callback = (res: Result) => void } namespace onVoIPChatInterrupted { interface Result extends VnmfGeneral.CallbackResult { /** He's a member of real-time voice call. openId List */ openIdList: string[] /** Error Code */ errCode: number /** Call Results */ errMsg: string } /** Respond function for room state change events */ type Callback = (res: Result) => void } namespace joinVoIPChat { type Promised = FailCallbackResult | SuccessCallbackResult interface Option { /** Room type * @default "voice" */ roomType?: RoomType /** Signature,Could not close temporary folder: %s */ signature: string /** Random string required to verify */ nonceStr: string /** Time stamp for authentication */ timeStamp: number /** This room in the little game/It's a bunch of chats. ID。Send the same at time. groupId Users will enter the same real-time voice room.。 */ groupId: string /** Mute Settings */ muteConfig?: MuteConfig /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } /** Room type */ interface RoomType { /** Audio room.,It's for voice calls. */ voice /** Video room.,Combining [voip-room](/docs/components/media/voip-room) Component to show membership */ video } /** Mute Settings */ interface MuteConfig { /** Whether or not to remain silent mic */ muteMicrophone?: boolean /** Can not get message: %s */ muteEarphone?: boolean } interface FailCallbackResult extends VnmfGeneral.CallbackResult { /** Cannot initialise Evolution's mail component. */ errMsg: string /** Error Code */ errCode: keyof VoipErrCode } interface SuccessCallbackResult extends VnmfGeneral.CallbackResult { /** He's a member of real-time voice call. openId List */ openIdList: string[] /** Error Code */ errCode: number /** Call Results */ errMsg: string } /** Voip Error Code */ interface VoipErrCode { /** It's already in the room. */ [-1] /** Recording equipment occupied,It's probably a microphone or system call that's being used right now. */ [-2] /** Quit during joining session(Could be the user's withdrawal.,Or step back.、That's why I'm calling.),So joining failed. */ [-3] /** System Error */ [-1000] } } namespace exitVoIPChat { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } } interface VnmfStatic { /** Update real-time voice silence settings * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.updateVoIPChatMuteConfig.html */ updateVoIPChatMuteConfig(option: updateVoIPChatMuteConfig.Option): Promise /** Subscribe Video Members * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.subscribeVoIPVideoMembers.html */ subscribeVoIPVideoMembers(option: subscribeVoIPVideoMembers.Option): Promise /** Turn on the double. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.setEnable1v1Chat.html */ setEnable1v1Chat(option: subscribeVoIPVideoMembers.Option): Promise /** Listen to real-time voice communication member video status change events * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPVideoMembersChanged.html */ onVoIPVideoMembersChanged(callback: onVoIPVideoMembersChanged.Callback): void /** Listening to changes in room status * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatStateChanged.html */ onVoIPChatStateChanged(callback: onVoIPChatStateChanged.Callback): void /** Interception of real-time voice call member status change event * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatSpeakersChanged.html */ onVoIPChatSpeakersChanged(callback: onVoIPChatSpeakersChanged.Callback): void /** Listen to real-time voice caller online status change event * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatMembersChanged.html */ onVoIPChatMembersChanged(callback: onVoIPChatMembersChanged.Callback): void /** Listening to passive disconnection of real-time voice calls * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatInterrupted.html */ onVoIPChatInterrupted(callback: onVoIPChatInterrupted.Callback): void /** Disable listening to real-time voice call member video status change events * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPVideoMembersChanged.html */ offVoIPVideoMembersChanged(callback: onVoIPVideoMembersChanged.Callback): void /** Disable listening to changes in room status * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPChatStateChanged.html */ offVoIPChatStateChanged(callback: onVoIPChatStateChanged.Callback): void /** Disaggregation of live voice call member's online status change event * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPChatMembersChanged.html */ offVoIPChatMembersChanged(callback: onVoIPChatMembersChanged.Callback): void /** Disaggregate passive off-real-time voice calls. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPChatInterrupted.html */ offVoIPChatInterrupted(callback: onVoIPChatInterrupted.Callback): void /** Accession (Create) Real-time voice calls,More information can be found [Real-time voice guide](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/voip-chat.html) * * User authorization is required before calling `scope.record`,User authorization is required if the room type a video `scope.camera`。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.joinVoIPChat.html */ joinVoIPChat(option: joinVoIPChat.Option): Promise /** Quit(Destruction)Real-time voice calls * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.exitVoIPChat.html */ exitVoIPChat(option: exitVoIPChat.Option): Promise } }