easemob-websdk 4.1.6 → 4.1.7-beta2

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/group/group.js CHANGED
@@ -1 +1 @@
1
- !function(r,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.websdk=e():r.websdk=e()}(this,(function(){return(this.webpackChunkwebsdk=this.webpackChunkwebsdk||[]).push([[194],{556:function(r,e,t){t.r(e),t.d(e,{acceptGroupInvite:function(){return X},acceptGroupJoinRequest:function(){return Z},addUsersToGroupAllowlist:function(){return fr},addUsersToGroupWhitelist:function(){return hr},agreeInviteIntoGroup:function(){return z},agreeJoinGroup:function(){return C},blockGroup:function(){return d},blockGroupMember:function(){return tr},blockGroupMembers:function(){return ar},blockGroupMessages:function(){return g},changeGroupOwner:function(){return I},changeOwner:function(){return T},createGroup:function(){return l},createGroupNew:function(){return p},deleteGroupSharedFile:function(){return Nr},destroyGroup:function(){return U},disableSendGroupMsg:function(){return dr},dissolveGroup:function(){return N},downloadGroupSharedFile:function(){return Pr},enableSendGroupMsg:function(){return gr},fetchGroupAnnouncement:function(){return Rr},fetchGroupSharedFileList:function(){return Ur},getGroup:function(){return m},getGroupAdmin:function(){return k},getGroupAllowlist:function(){return Er},getGroupBlacklist:function(){return pr},getGroupBlacklistNew:function(){return ur},getGroupBlocklist:function(){return lr},getGroupInfo:function(){return E},getGroupMemberAttributes:function(){return wr},getGroupMembersAttributes:function(){return Or},getGroupMsgReadUser:function(){return jr},getGroupMuteList:function(){return $},getGroupMutelist:function(){return rr},getGroupSharedFilelist:function(){return br},getGroupWhitelist:function(){return Ir},getJoinedGroups:function(){return y},getMuted:function(){return Y},getPublicGroups:function(){return f},groupBlockMulti:function(){return or},groupBlockSingle:function(){return er},inviteToGroup:function(){return M},inviteUsersToGroup:function(){return w},isGroupWhiteUser:function(){return vr},isInGroupAllowlist:function(){return Ar},isInGroupMutelist:function(){return kr},isInGroupWhiteList:function(){return Sr},joinGroup:function(){return O},leaveGroup:function(){return P},listGroupMember:function(){return S},listGroupMembers:function(){return A},listGroups:function(){return h},modifyGroup:function(){return v},mute:function(){return H},muteGroupMember:function(){return V},quitGroup:function(){return b},rejectGroupInvite:function(){return D},rejectGroupJoinRequest:function(){return x},rejectInviteIntoGroup:function(){return L},rejectJoinGroup:function(){return B},removeAdmin:function(){return _},removeGroupAdmin:function(){return G},removeGroupAllowlistMember:function(){return Tr},removeGroupBlockMulti:function(){return cr},removeGroupBlockSingle:function(){return nr},removeGroupMember:function(){return F},removeGroupMembers:function(){return K},removeGroupWhitelistMember:function(){return yr},removeMultiGroupMember:function(){return W},removeMute:function(){return q},removeSingleGroupMember:function(){return J},rmUsersFromGroupWhitelist:function(){return mr},setAdmin:function(){return j},setGroupAdmin:function(){return R},setGroupMemberAttributes:function(){return Mr},unblockGroupMember:function(){return sr},unblockGroupMembers:function(){return ir},unmuteGroupMember:function(){return Q},updateGroupAnnouncement:function(){return _r},uploadGroupSharedFile:function(){return Gr}}),t(900),t(3814),t(514),t(4201),t(6864),t(1685),t(2486),t(4261),t(7095),t(9889),t(6619),t(1362),t(7988),t(8668),t(3529),t(3535);var o=t(3365),a=t(7480),n=t(7551),s=t(1222),c=t(6916),i=t(3681);function u(r){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},u(r)}function p(r){if(!r||!r.data)throw Error("Invalid parameter");if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups?resource=").concat(d.clientResource),dataType:"json",type:"POST",data:JSON.stringify({owner:this.user,groupname:r.data.groupname,desc:r.data.desc,members:r.data.members,public:r.data.public,approval:r.data.approval,allowinvites:r.data.allowinvites,invite_need_confirm:r.data.inviteNeedConfirm,maxusers:r.data.maxusers,custom:r.data.ext}),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:function(e){r.success&&r.success(e)},error:r.error};return c.kg.debug("Call createGroup:",r),n.hj.call(this,g,i.fI.CREATE_GROUP)}var l=p;function d(r){var e;if("string"!=typeof r.groupId||""===r.groupId)throw Error("Invalid parameter");if(!s.XZ.call(this)){var t=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var u=this.context,p=u.orgName,l=u.appName,d=u.accessToken,g=u.jid,h={entities:[(e={},e["notification_ignore_"+r.groupId]=!0,e)]},f={type:"PUT",url:"".concat(this.apiUrl,"/").concat(p,"/").concat(l,"/users/").concat(this.user,"?resource=").concat(g.clientResource),data:JSON.stringify(h),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call blockGroupMessages",r),n.hj.call(this,f,i.fI.BLOCK_GROUP)}var g=d;function h(r){if("number"!=typeof r.limit)throw Error("Invalid parameter");if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d={limit:r.limit,cursor:r.cursor};r.cursor||delete d.cursor;var g={url:this.apiUrl+"/"+u+"/"+p+"/publicchatgroups",type:"GET",dataType:"json",data:d,headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call listGroups",r),n.hj.call(this,g,i.fI.LIST_GROUP)}var f=h;function m(r){if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d={url:this.apiUrl+"/"+u+"/"+p+"/users/"+this.user+"/joined_chatgroups",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r&&(null==r?void 0:r.success),error:r&&(null==r?void 0:r.error)};return c.kg.debug("Call getJoinedGroups",r),n.hj.call(this,d,i.fI.GET_USER_GROUP)}function y(r){if("number"!=typeof r.pageNum||"number"!=typeof r.pageSize)throw Error('Invalid parameter: "pageNum or pageSize"');if(r.pageNum<0||r.pageSize<0)throw Error('"pageNum" should >= 0 and "pageSize" should >= 0');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.needAffiliations||r.needRole?"/chatgroups/user/".concat(this.user,"?pagenum=").concat(r.pageNum,"&pagesize=").concat(r.pageSize,"&needAffiliations=").concat(r.needAffiliations,"&needRole=").concat(r.needRole):"/users/".concat(this.user,"/joined_chatgroups?pagenum=").concat(r.pageNum,"&pagesize=").concat(r.pageSize),g={url:this.apiUrl+"/"+u+"/"+p+d,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r&&(null==r?void 0:r.success),error:r&&(null==r?void 0:r.error)};return c.kg.debug("Call getGroup",r),n.hj.call(this,g,i.fI.GET_USER_GROUP).then((function(r){var e=r.uri,t=r.entities,o=[];return e.includes("joined_chatgroups")||(t.forEach((function(r){var e={affiliationsCount:r.affiliations_count,groupName:r.name,groupId:r.groupId,role:r.permission,disabled:r.disabled,approval:r.membersonly,allowInvites:r.allowinvites,description:r.description,maxUsers:r.maxusers,public:r.public};o.push(e)})),r.entities=o),r}))}function T(r){if("string"!=typeof r.groupId||"string"!=typeof r.newOwner)throw Error("Invalid parameter");if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t={newowner:r.newOwner},u=this.context,p=u.orgName,l=u.appName,d=u.accessToken,g=u.jid,h={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(l,"/chatgroups/").concat(r.groupId,"?resource=").concat(g.clientResource),type:"PUT",dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},data:JSON.stringify(t),success:r.success,error:r.error};return c.kg.debug("Call changeOwner",r),n.hj.call(this,h,i.fI.CHANGE_OWNER)}var I=T;function E(r){if("string"!=typeof r.groupId&&!Array.isArray(r.groupId))throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+r.groupId+"?joined_time=true",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupInfo",r),n.hj.call(this,d,i.fI.GET_GROUP_INFO)}function v(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error("Invalid parameter");if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={groupname:r.groupName,description:r.description,custom:r.ext},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"?resource=").concat(d.clientResource),type:"PUT",data:JSON.stringify(h),dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call modifyGroup",r),n.hj.call(this,f,i.fI.MODIFY_GROUP)}function S(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(isNaN(r.pageNum)||r.pageNum<=0)throw Error('The parameter "pageNum" should be a positive number');if(isNaN(r.pageSize)||r.pageSize<=0)throw Error('The parameter "pageSize" should be a positive number');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t={pagenum:r.pageNum,pagesize:r.pageSize},u=this.context,p=u.orgName,l=u.appName,d=u.accessToken,g={url:this.apiUrl+"/"+p+"/"+l+"/chatgroups/"+r.groupId+"/users",dataType:"json",type:"GET",data:t,headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call listGroupMember",r),n.hj.call(this,g,i.fI.LIST_GROUP_MEMBER)}var A=S;function k(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/admin",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupAdmin",r),n.hj.call(this,g,i.fI.GET_GROUP_ADMIN)}function j(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={newadmin:r.username},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/admin?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call setGroupAdmin",r),n.hj.call(this,f,i.fI.SET_GROUP_ADMIN)}var R=j;function _(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.username,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/admin/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call removeAdmin",r),n.hj.call(this,f,i.fI.REMOVE_GROUP_ADMIN)}var G=_;function N(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"?version=v3&resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call destroyGroup",r),n.hj.call(this,h,i.fI.DISSOLVE_GROUP)}var U=N;function b(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/quit?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call quitGroup",r),n.hj.call(this,h,i.fI.QUIT_GROUP)}var P=b;function M(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.users))throw Error('Invalid parameter: "users"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=r.groupId,u={usernames:r.users},p=this.context,l=p.orgName,d=p.appName,g=p.accessToken,h=p.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(d,"/chatgroups/").concat(t,"/invite?resource=").concat(h.clientResource),type:"POST",data:JSON.stringify(u),dataType:"json",headers:{Authorization:"Bearer "+g,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call inviteUsersToGroup",r),n.hj.call(this,f,i.fI.INVITE_TO_GROUP)}var w=M;function O(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(r.groupId,"/apply?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify({message:r.message||""}),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call joinGroup",r),n.hj.call(this,g,i.fI.JOIN_GROUP)}function C(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.applicant||""===r.applicant)throw Error('Invalid parameter: "applicant"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={applicant:r.applicant,verifyResult:!0,reason:"no clue"},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/apply_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call agreeJoinGroup",r),n.hj.call(this,f,i.fI.AGREE_JOIN_GROUP)}var Z=C;function B(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.applicant||""===r.applicant)throw Error('Invalid parameter: "applicant"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={applicant:r.applicant,verifyResult:!1,reason:r.reason||""},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/apply_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call rejectGroupJoinRequest",r),n.hj.call(this,f,i.fI.REJECT_JOIN_GROUP)}var x=B;function z(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.invitee||""===r.invitee)throw Error('Invalid parameter: "invitee"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={invitee:r.invitee,verifyResult:!0},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/invite_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call acceptGroupInvite",r),n.hj.call(this,f,i.fI.AGREE_INVITE_GROUP)}var X=z;function L(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.invitee||""===r.invitee)throw Error('Invalid parameter: "invitee"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={invitee:r.invitee,verifyResult:!1},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/invite_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call rejectGroupInvite",r),n.hj.call(this,f,i.fI.REJECT_INVITE_GROUP)}var D=L;function J(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=r.groupId,u=r.username,p=this.context,l=p.orgName,d=p.appName,g=p.accessToken,h=p.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(d,"/chatgroups/").concat(t,"/users/").concat(u,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+g,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call removeGroupMember",r),n.hj.call(this,f,i.fI.REMOVE_GROUP_MEMBER)}var F=J;function W(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.users))throw Error('Invalid parameter: "users"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.users.join(","),f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/users/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call removeGroupMembers",r),n.hj.call(this,f,i.fI.MULTI_REMOVE_GROUP_MEMBER)}var K=W;function H(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!(Array.isArray(r.username)||"string"==typeof r.username&&""!==r.username))throw Error('Invalid parameter: "username"');if("number"!=typeof r.muteDuration)throw Error('Invalid parameter: "muteDuration"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={usernames:"string"==typeof r.username?[r.username]:r.username,mute_duration:r.muteDuration},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/mute?resource=").concat(d.clientResource),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},data:JSON.stringify(h),success:r.success,error:r.error};return c.kg.debug("Call muteGroupMember",r),n.hj.call(this,f,i.fI.MUTE_GROUP_MEMBER)}var V=H;function q(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!(Array.isArray(r.username)||"string"==typeof r.username&&""!==r.username))throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.username,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/mute/").concat(h,"?resource=").concat(d.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call unmuteGroupMember",r),n.hj.call(this,f,i.fI.UNMUTE_GROUP_MEMBER)}var Q=q;function Y(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/mute",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupMuteList",r),n.hj.call(this,g,i.fI.GET_GROUP_MUTE_LIST)}var $=Y,rr=Y;function er(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.username,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/blocks/users/").concat(h,"?resource=").concat(d.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call blockGroupMember",r),n.hj.call(this,f,i.fI.BLOCK_GROUP_MEMBER)}var tr=er;function or(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.usernames))throw Error('Invalid parameter: "usernames"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={usernames:r.usernames},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/blocks/users?resource=").concat(d.clientResource),data:JSON.stringify(h),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call blockGroupMembers",r),n.hj.call(this,f,i.fI.BLOCK_GROUP_MEMBERS)}var ar=or;function nr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.username,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/blocks/users/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call unblockGroupMember",r),n.hj.call(this,f,i.fI.UNBLOCK_GROUP_MEMBER)}var sr=nr;function cr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.usernames))throw Error('Invalid parameter: "usernames"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.usernames.join(","),f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/blocks/users/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call unblockGroupMembers",r),n.hj.call(this,f,i.fI.UNBLOCK_GROUP_MEMBERS)}var ir=cr;function ur(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/blocks/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupBlacklist",r),n.hj.call(this,g,i.fI.GET_GROUP_BLACK_LIST)}var pr=ur,lr=ur;function dr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/ban?resource=").concat(d.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call disableSendGroupMsg",r),n.hj.call(this,h,i.fI.DISABLED_SEND_GROUP_MSG)}function gr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/ban?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call enableSendGroupMsg",r),n.hj.call(this,h,i.fI.ENABLE_SEND_GROUP_MSG)}function hr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.users))throw Error('Invalid parameter: "users"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={usernames:r.users},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/white/users?resource=").concat(d.clientResource),type:"POST",data:JSON.stringify(h),dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call addUsersToGroupWhitelist",r),n.hj.call(this,f,i.fI.ADD_USERS_TO_GROUP_WHITE)}var fr=hr;function mr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.userName||""===r.userName)throw Error('Invalid parameter: "userName"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/white/users/").concat(r.userName,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call removeGroupAllowlistMember",r),n.hj.call(this,h,i.fI.REMOVE_GROUP_WHITE_MEMBER)}var yr=mr,Tr=mr;function Ir(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/white/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupAllowlist",r),n.hj.call(this,g,i.fI.GET_GROUP_WHITE_LIST)}var Er=Ir;function vr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.userName||""===r.userName)throw Error('Invalid parameter: "userName"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/white/users/"+r.userName,type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call isInGroupAllowlist",r),n.hj.call(this,g,i.fI.IS_IN_GROUP_WHITE_LIST)}var Sr=vr,Ar=vr;function kr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "chatRoomId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,i=t.orgName,u=t.appName,p=t.accessToken,l=t.userId,d={url:this.apiUrl+"/"+i+"/"+u+"/sdk/group/"+r.groupId+"/mute/"+l,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p}};return c.kg.debug("Call isInGroupMutelist",r),n.hj.call(this,d).then((function(r){return r.data}))}function jr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.msgId||""===r.msgId)throw Error('Invalid parameter: "msgId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+r.groupId+"/acks/"+r.msgId,dataType:"json",type:"GET",data:{limit:500,key:void 0},headers:{Authorization:"Bearer "+l},success:r.success,error:r.error};return c.kg.debug("Call getGroupMsgReadUser",r),n.hj.call(this,d,i.fI.GET_GROUP_MSG_READ_USER)}function Rr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(d,"/announcement"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call fetchGroupAnnouncement",r),n.hj.call(this,g,i.fI.GET_GROUP_ANN)}function _r(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.announcement)throw Error('Invalid parameter: "announcement"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={announcement:r.announcement},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/announcement?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call updateGroupAnnouncement",r),n.hj.call(this,f,i.fI.UPDATE_GROUP_ANN)}function Gr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("object"!==u(r.file))throw Error('Invalid parameter: "file"');if(s.XZ.call(this)){var e=this.context,t=e.orgName,o=e.appName,a=e.accessToken,p=e.jid,l=r.groupId;n.cT.call(this,{uploadUrl:"".concat(this.apiUrl,"/").concat(t,"/").concat(o,"/chatgroups/").concat(l,"/share_files?resource=").concat(p.clientResource),onFileUploadProgress:r.onFileUploadProgress,onFileUploadComplete:r.onFileUploadComplete,onFileUploadError:r.onFileUploadError,onFileUploadCanceled:r.onFileUploadCanceled,accessToken:a,apiUrl:this.apiUrl,file:r.file,appKey:this.context.appKey},i.fI.UPLOAD_GROUP_FILE),c.kg.debug("Call uploadGroupSharedFile",r)}}function Nr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.fileId||""===r.fileId)throw Error('Invalid parameter: "file"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.fileId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/share_files/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call deleteGroupSharedFile",r),n.hj.call(this,f,i.fI.DELETE_GROUP_FILE)}function Ur(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.pageNum||1,g=r.pageSize||10,h=r.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(h,"/share_files?pagenum=").concat(d,"&pagesize=").concat(g),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupSharedFilelist",r),n.hj.call(this,f,i.fI.GET_GROUP_FILE_LIST)}var br=Ur;function Pr(r){var e=this.context,t=e.orgName,o=e.appName,a=e.accessToken,s=this.apiUrl,u=r.groupId,p=r.fileId;n.LR.call(this,{url:"".concat(s,"/").concat(t,"/").concat(o,"/chatgroups/").concat(u,"/share_files/").concat(p),onFileDownloadComplete:r.onFileDownloadComplete,onFileDownloadError:r.onFileDownloadError,accessToken:a,id:p,secret:r.secret},i.fI.DOWN_GROUP_FILE),c.kg.debug("Call downloadGroupSharedFile",r)}function Mr(r){return e=this,t=void 0,l=function(){var e,t,p,l,d,g,h,f,m,y,T;return function(r,e){var t,o,a,n,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function c(n){return function(c){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){s.label=n[1];break}if(6===n[0]&&s.label<a[1]){s.label=a[1],a=n;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(n);break}a[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(r,s)}catch(r){n=[6,r],o=0}finally{t=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,c])}}}(this,(function(I){switch(I.label){case 0:if(e=r.groupId,t=r.userId,p=r.memberAttributes,"string"!=typeof e||""===e)throw Error('Invalid parameter: "groupId"');if("string"!=typeof t||""===t)throw Error('Invalid parameter: "userId"');if("object"!==u(p))throw Error('Invalid parameter: "memberAttributes"');return s.XZ.call(this)?(d=this.context,g=d.orgName,h=d.appName,f=d.accessToken,m=d.jid,y={metaData:p},T={url:"".concat(this.apiUrl,"/").concat(g,"/").concat(h,"/sdk/metadata/chatgroup/").concat(e,"/user/").concat(t,"?resource=").concat(m.clientResource),type:"PUT",dataType:"json",data:JSON.stringify(y),headers:{Authorization:"Bearer "+f,"Content-Type":"application/json"}},c.kg.debug("Call setGroupMemberAttributes",r),[4,n.hj.call(this,T,i.fI.SET_GROUP_MEMBER_ATTRS)]):(l=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(l)]);case 1:return I.sent(),[2]}}))},new((p=void 0)||(p=Promise))((function(r,o){function a(r){try{s(l.next(r))}catch(r){o(r)}}function n(r){try{s(l.throw(r))}catch(r){o(r)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof p?t:new p((function(r){r(t)}))).then(a,n)}s((l=l.apply(e,t||[])).next())}));var e,t,p,l}function wr(r){var e=r.groupId,t=r.userId;return Or.call(this,{groupId:e,userIds:[t]}).then((function(r){var e;return{type:r.type,data:null===(e=r.data)||void 0===e?void 0:e[t]}}))}function Or(r){var e=r.groupId,t=r.userIds,u=r.keys,p=void 0===u?[]:u;if("string"!=typeof e||""===e)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(t)||(null==t?void 0:t.length)<=0)throw Error('Invalid parameter: "userIds"');if(!Array.isArray(p))throw Error('Invalid parameter: "keys"');if(!s.XZ.call(this)){var l=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(l)}var d=this.context,g=d.orgName,h=d.appName,f=d.accessToken,m={targets:t,properties:p},y={url:"".concat(this.apiUrl,"/").concat(g,"/").concat(h,"/sdk/metadata/chatgroup/").concat(e,"/get"),type:"POST",dataType:"json",data:JSON.stringify(m),headers:{Authorization:"Bearer "+f,"Content-Type":"application/json"}};return c.kg.debug("Call getGroupMembersAttributes",r),n.hj.call(this,y,i.fI.GET_GROUP_MEMBER_ATTR).then((function(r){return{type:r.type,data:(null==r?void 0:r.data)||{}}}))}},1222:function(r,e,t){t.d(e,{H7:function(){return u},XZ:function(){return c},_W:function(){return i}}),t(3786),t(1362),t(900),t(7988),t(9889),t(6619);var o=t(3365),a=t(7480);function n(){var r=this.context.appName,e=this.context.orgName;return!(!r||!e)||(this.onError&&this.onError({type:o.E.WEBIM_CONNCTION_AUTH_ERROR,message:"appName or orgName is illegal"}),!1)}function s(){var r;if(!this.context.accessToken){var e=a.Z.create({type:o.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"});return this.onError&&this.onError(e),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",e),!1}return!0}function c(){return s.call(this)&&n.call(this)}function i(r){var e=r.data,t=r.type;return{data:{status:Object.keys(e.errorKeys).length>0?"fail":"success",errorKeys:e.errorKeys,successKeys:e.successKeys},type:t}}function u(r){var e=r.data,t=void 0;return Object.keys(e.errorKeys).length>0&&Object.keys(e.errorKeys).forEach((function(r){var n=e.errorKeys[r];t=n.includes("is not part of you")?a.Z.create({type:o.E.NO_PERMISSION,message:n}):n.includes("size of metadata for this single chatroom exceeds the user defined limit")||n.includes("total size of chatroom metadata for this app exceeds the user defined limit")||n.includes("is exceeding maximum limit")?a.Z.create({type:o.E.MAX_LIMIT,message:n}):n.includes("is not Legal")?a.Z.create({type:o.E.REQUEST_PARAMETER_ERROR,message:n}):n.includes("Failed to update userMetadata. Concurrent updates not allowed")?a.Z.create({type:o.E.OPERATION_NOT_ALLOWED,message:n}):a.Z.create({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,message:n})})),t}}},function(r){return 556,r(r.s=556)}])}));
1
+ !function(r,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.websdk=e():r.websdk=e()}(this,(function(){return(this.webpackChunkwebsdk=this.webpackChunkwebsdk||[]).push([[194],{9685:function(r,e,t){t.r(e),t.d(e,{acceptGroupInvite:function(){return D},acceptGroupJoinRequest:function(){return x},addUsersToGroupAllowlist:function(){return yr},addUsersToGroupWhitelist:function(){return mr},agreeInviteIntoGroup:function(){return L},agreeJoinGroup:function(){return B},blockGroup:function(){return h},blockGroupMember:function(){return ar},blockGroupMembers:function(){return sr},blockGroupMessages:function(){return f},changeGroupOwner:function(){return v},changeOwner:function(){return E},createGroup:function(){return g},createGroupNew:function(){return d},deleteGroupSharedFile:function(){return br},destroyGroup:function(){return P},disableSendGroupMsg:function(){return hr},dissolveGroup:function(){return b},downloadGroupSharedFile:function(){return wr},enableSendGroupMsg:function(){return fr},fetchGroupAnnouncement:function(){return Gr},fetchGroupSharedFileList:function(){return Pr},getGroup:function(){return T},getGroupAdmin:function(){return R},getGroupAllowlist:function(){return Sr},getGroupBlacklist:function(){return dr},getGroupBlacklistNew:function(){return lr},getGroupBlocklist:function(){return gr},getGroupInfo:function(){return S},getGroupMemberAttributes:function(){return Cr},getGroupMembersAttributes:function(){return Zr},getGroupMsgReadUser:function(){return _r},getGroupMuteList:function(){return er},getGroupMutelist:function(){return tr},getGroupSharedFilelist:function(){return Mr},getGroupWhitelist:function(){return vr},getJoinedGroups:function(){return I},getMuted:function(){return rr},getPublicGroups:function(){return y},groupBlockMulti:function(){return nr},groupBlockSingle:function(){return or},inviteToGroup:function(){return O},inviteUsersToGroup:function(){return C},isGroupWhiteUser:function(){return Ar},isInGroupAllowlist:function(){return jr},isInGroupMutelist:function(){return Rr},isInGroupWhiteList:function(){return kr},joinGroup:function(){return Z},leaveGroup:function(){return w},listGroupMember:function(){return k},listGroupMembers:function(){return j},listGroups:function(){return m},modifyGroup:function(){return A},mute:function(){return q},muteGroupMember:function(){return Q},quitGroup:function(){return M},rejectGroupInvite:function(){return F},rejectGroupJoinRequest:function(){return X},rejectInviteIntoGroup:function(){return J},rejectJoinGroup:function(){return z},removeAdmin:function(){return N},removeGroupAdmin:function(){return U},removeGroupAllowlistMember:function(){return Er},removeGroupBlockMulti:function(){return ur},removeGroupBlockSingle:function(){return cr},removeGroupMember:function(){return K},removeGroupMembers:function(){return V},removeGroupWhitelistMember:function(){return Ir},removeMultiGroupMember:function(){return H},removeMute:function(){return Y},removeSingleGroupMember:function(){return W},rmUsersFromGroupWhitelist:function(){return Tr},setAdmin:function(){return _},setGroupAdmin:function(){return G},setGroupMemberAttributes:function(){return Or},unblockGroupMember:function(){return ir},unblockGroupMembers:function(){return pr},unmuteGroupMember:function(){return $},updateGroupAnnouncement:function(){return Nr},uploadGroupSharedFile:function(){return Ur}}),t(7451),t(3412),t(5373),t(2412),t(3976),t(6865),t(753),t(7308),t(1957),t(3355),t(4791),t(7460),t(6463),t(7529),t(7802),t(2651);var o=t(7912),a=t(2671),n=t(8989),s=t(5220),c=t(4075),i=t(9469);function u(r){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},u(r)}var p=function(r,e,t,o){return new(t||(t=Promise))((function(a,n){function s(r){try{i(o.next(r))}catch(r){n(r)}}function c(r){try{i(o.throw(r))}catch(r){n(r)}}function i(r){var e;r.done?a(r.value):(e=r.value,e instanceof t?e:new t((function(r){r(e)}))).then(s,c)}i((o=o.apply(r,e||[])).next())}))},l=function(r,e){var t,o,a,n,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function c(c){return function(i){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;n&&(n=0,c[0]&&(s=0)),s;)try{if(t=1,o&&(a=2&c[0]?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,o=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==c[0]&&2!==c[0])){s=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){s.label=c[1];break}if(6===c[0]&&s.label<a[1]){s.label=a[1],a=c;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(c);break}a[2]&&s.ops.pop(),s.trys.pop();continue}c=e.call(r,s)}catch(r){c=[6,r],o=0}finally{t=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,i])}}};function d(r){if(!r||!r.data)throw Error("Invalid parameter");if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups?resource=").concat(d.clientResource),dataType:"json",type:"POST",data:JSON.stringify({owner:this.user,groupname:r.data.groupname,desc:r.data.desc,members:r.data.members,public:r.data.public,approval:r.data.approval,allowinvites:r.data.allowinvites,invite_need_confirm:r.data.inviteNeedConfirm,maxusers:r.data.maxusers,custom:r.data.ext}),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:function(e){r.success&&r.success(e)},error:r.error};return c.kg.debug("Call createGroup:",r),n.hj.call(this,g,i.fI.CREATE_GROUP)}var g=d;function h(r){var e;if("string"!=typeof r.groupId||""===r.groupId)throw Error("Invalid parameter");if(!s.XZ.call(this)){var t=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var u=this.context,p=u.orgName,l=u.appName,d=u.accessToken,g=u.jid,h={entities:[(e={},e["notification_ignore_"+r.groupId]=!0,e)]},f={type:"PUT",url:"".concat(this.apiUrl,"/").concat(p,"/").concat(l,"/users/").concat(this.user,"?resource=").concat(g.clientResource),data:JSON.stringify(h),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call blockGroupMessages",r),n.hj.call(this,f,i.fI.BLOCK_GROUP)}var f=h;function m(r){if("number"!=typeof r.limit)throw Error("Invalid parameter");if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d={limit:r.limit,cursor:r.cursor};r.cursor||delete d.cursor;var g={url:this.apiUrl+"/"+u+"/"+p+"/publicchatgroups",type:"GET",dataType:"json",data:d,headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call listGroups",r),n.hj.call(this,g,i.fI.LIST_GROUP)}var y=m;function T(r){if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d={url:this.apiUrl+"/"+u+"/"+p+"/users/"+this.user+"/joined_chatgroups",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r&&(null==r?void 0:r.success),error:r&&(null==r?void 0:r.error)};return c.kg.debug("Call getJoinedGroups",r),n.hj.call(this,d,i.fI.GET_USER_GROUP)}function I(r){if("number"!=typeof r.pageNum||"number"!=typeof r.pageSize)throw Error('Invalid parameter: "pageNum or pageSize"');if(r.pageNum<0||r.pageSize<0)throw Error('"pageNum" should >= 0 and "pageSize" should >= 0');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.needAffiliations||r.needRole?"/chatgroups/user/".concat(this.user,"?pagenum=").concat(r.pageNum,"&pagesize=").concat(r.pageSize,"&needAffiliations=").concat(r.needAffiliations,"&needRole=").concat(r.needRole):"/users/".concat(this.user,"/joined_chatgroups?pagenum=").concat(r.pageNum,"&pagesize=").concat(r.pageSize),g={url:this.apiUrl+"/"+u+"/"+p+d,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r&&(null==r?void 0:r.success),error:r&&(null==r?void 0:r.error)};return c.kg.debug("Call getGroup",r),n.hj.call(this,g,i.fI.GET_USER_GROUP).then((function(r){var e=r.uri,t=r.entities,o=[];return e.includes("joined_chatgroups")||(t.forEach((function(r){var e={affiliationsCount:r.affiliations_count,groupName:r.name,groupId:r.groupId,role:r.permission,disabled:r.disabled,approval:r.membersonly,allowInvites:r.allowinvites,description:r.description,maxUsers:r.maxusers,public:r.public};o.push(e)})),r.entities=o),r}))}function E(r){if("string"!=typeof r.groupId||"string"!=typeof r.newOwner)throw Error("Invalid parameter");if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t={newowner:r.newOwner},u=this.context,p=u.orgName,l=u.appName,d=u.accessToken,g=u.jid,h={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(l,"/chatgroups/").concat(r.groupId,"?resource=").concat(g.clientResource),type:"PUT",dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},data:JSON.stringify(t),success:r.success,error:r.error};return c.kg.debug("Call changeOwner",r),n.hj.call(this,h,i.fI.CHANGE_OWNER)}var v=E;function S(r){if("string"!=typeof r.groupId&&!Array.isArray(r.groupId))throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+r.groupId+"?joined_time=true",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupInfo",r),n.hj.call(this,d,i.fI.GET_GROUP_INFO)}function A(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error("Invalid parameter");if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={groupname:r.groupName,description:r.description,custom:r.ext},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"?resource=").concat(d.clientResource),type:"PUT",data:JSON.stringify(h),dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call modifyGroup",r),n.hj.call(this,f,i.fI.MODIFY_GROUP)}function k(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(isNaN(r.pageNum)||r.pageNum<=0)throw Error('The parameter "pageNum" should be a positive number');if(isNaN(r.pageSize)||r.pageSize<=0)throw Error('The parameter "pageSize" should be a positive number');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t={pagenum:r.pageNum,pagesize:r.pageSize},u=this.context,p=u.orgName,l=u.appName,d=u.accessToken,g={url:this.apiUrl+"/"+p+"/"+l+"/chatgroups/"+r.groupId+"/users",dataType:"json",type:"GET",data:t,headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call listGroupMember",r),n.hj.call(this,g,i.fI.LIST_GROUP_MEMBER)}var j=k;function R(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/admin",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupAdmin",r),n.hj.call(this,g,i.fI.GET_GROUP_ADMIN)}function _(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={newadmin:r.username},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/admin?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call setGroupAdmin",r),n.hj.call(this,f,i.fI.SET_GROUP_ADMIN)}var G=_;function N(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.username,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/admin/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call removeAdmin",r),n.hj.call(this,f,i.fI.REMOVE_GROUP_ADMIN)}var U=N;function b(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"?version=v3&resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call destroyGroup",r),n.hj.call(this,h,i.fI.DISSOLVE_GROUP)}var P=b;function M(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/quit?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call quitGroup",r),n.hj.call(this,h,i.fI.QUIT_GROUP)}var w=M;function O(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.users))throw Error('Invalid parameter: "users"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=r.groupId,u={usernames:r.users},p=this.context,l=p.orgName,d=p.appName,g=p.accessToken,h=p.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(d,"/chatgroups/").concat(t,"/invite?resource=").concat(h.clientResource),type:"POST",data:JSON.stringify(u),dataType:"json",headers:{Authorization:"Bearer "+g,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call inviteUsersToGroup",r),n.hj.call(this,f,i.fI.INVITE_TO_GROUP)}var C=O;function Z(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(r.groupId,"/apply?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify({message:r.message||""}),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call joinGroup",r),n.hj.call(this,g,i.fI.JOIN_GROUP)}function B(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.applicant||""===r.applicant)throw Error('Invalid parameter: "applicant"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={applicant:r.applicant,verifyResult:!0,reason:"no clue"},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/apply_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call agreeJoinGroup",r),n.hj.call(this,f,i.fI.AGREE_JOIN_GROUP)}var x=B;function z(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.applicant||""===r.applicant)throw Error('Invalid parameter: "applicant"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={applicant:r.applicant,verifyResult:!1,reason:r.reason||""},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/apply_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call rejectGroupJoinRequest",r),n.hj.call(this,f,i.fI.REJECT_JOIN_GROUP)}var X=z;function L(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.invitee||""===r.invitee)throw Error('Invalid parameter: "invitee"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={invitee:r.invitee,verifyResult:!0},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/invite_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call acceptGroupInvite",r),n.hj.call(this,f,i.fI.AGREE_INVITE_GROUP)}var D=L;function J(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.invitee||""===r.invitee)throw Error('Invalid parameter: "invitee"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={invitee:r.invitee,verifyResult:!1},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/invite_verify?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call rejectGroupInvite",r),n.hj.call(this,f,i.fI.REJECT_INVITE_GROUP)}var F=J;function W(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=r.groupId,u=r.username,p=this.context,l=p.orgName,d=p.appName,g=p.accessToken,h=p.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(d,"/chatgroups/").concat(t,"/users/").concat(u,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+g,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call removeGroupMember",r),n.hj.call(this,f,i.fI.REMOVE_GROUP_MEMBER)}var K=W;function H(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.users))throw Error('Invalid parameter: "users"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.users.join(","),f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/users/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call removeGroupMembers",r),n.hj.call(this,f,i.fI.MULTI_REMOVE_GROUP_MEMBER)}var V=H;function q(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!(Array.isArray(r.username)||"string"==typeof r.username&&""!==r.username))throw Error('Invalid parameter: "username"');if("number"!=typeof r.muteDuration)throw Error('Invalid parameter: "muteDuration"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={usernames:"string"==typeof r.username?[r.username]:r.username,mute_duration:r.muteDuration},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/mute?resource=").concat(d.clientResource),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},data:JSON.stringify(h),success:r.success,error:r.error};return c.kg.debug("Call muteGroupMember",r),n.hj.call(this,f,i.fI.MUTE_GROUP_MEMBER)}var Q=q;function Y(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!(Array.isArray(r.username)||"string"==typeof r.username&&""!==r.username))throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.username,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/mute/").concat(h,"?resource=").concat(d.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call unmuteGroupMember",r),n.hj.call(this,f,i.fI.UNMUTE_GROUP_MEMBER)}var $=Y;function rr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/mute",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupMuteList",r),n.hj.call(this,g,i.fI.GET_GROUP_MUTE_LIST)}var er=rr,tr=rr;function or(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.username,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/blocks/users/").concat(h,"?resource=").concat(d.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call blockGroupMember",r),n.hj.call(this,f,i.fI.BLOCK_GROUP_MEMBER)}var ar=or;function nr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.usernames))throw Error('Invalid parameter: "usernames"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={usernames:r.usernames},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/blocks/users?resource=").concat(d.clientResource),data:JSON.stringify(h),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call blockGroupMembers",r),n.hj.call(this,f,i.fI.BLOCK_GROUP_MEMBERS)}var sr=nr;function cr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.username||""===r.username)throw Error('Invalid parameter: "username"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.username,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/blocks/users/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call unblockGroupMember",r),n.hj.call(this,f,i.fI.UNBLOCK_GROUP_MEMBER)}var ir=cr;function ur(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.usernames))throw Error('Invalid parameter: "usernames"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.usernames.join(","),f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/blocks/users/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call unblockGroupMembers",r),n.hj.call(this,f,i.fI.UNBLOCK_GROUP_MEMBERS)}var pr=ur;function lr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/blocks/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupBlacklist",r),n.hj.call(this,g,i.fI.GET_GROUP_BLACK_LIST)}var dr=lr,gr=lr;function hr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/ban?resource=").concat(d.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call disableSendGroupMsg",r),n.hj.call(this,h,i.fI.DISABLED_SEND_GROUP_MSG)}function fr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/ban?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call enableSendGroupMsg",r),n.hj.call(this,h,i.fI.ENABLE_SEND_GROUP_MSG)}function mr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(r.users))throw Error('Invalid parameter: "users"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={usernames:r.users},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/white/users?resource=").concat(d.clientResource),type:"POST",data:JSON.stringify(h),dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call addUsersToGroupWhitelist",r),n.hj.call(this,f,i.fI.ADD_USERS_TO_GROUP_WHITE)}var yr=mr;function Tr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.userName||""===r.userName)throw Error('Invalid parameter: "userName"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/white/users/").concat(r.userName,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call removeGroupAllowlistMember",r),n.hj.call(this,h,i.fI.REMOVE_GROUP_WHITE_MEMBER)}var Ir=Tr,Er=Tr;function vr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/white/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupAllowlist",r),n.hj.call(this,g,i.fI.GET_GROUP_WHITE_LIST)}var Sr=vr;function Ar(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.userName||""===r.userName)throw Error('Invalid parameter: "userName"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+d+"/white/users/"+r.userName,type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call isInGroupAllowlist",r),n.hj.call(this,g,i.fI.IS_IN_GROUP_WHITE_LIST)}var kr=Ar,jr=Ar;function Rr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "chatRoomId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,i=t.orgName,u=t.appName,p=t.accessToken,l=t.userId,d={url:this.apiUrl+"/"+i+"/"+u+"/sdk/group/"+r.groupId+"/mute/"+l,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p}};return c.kg.debug("Call isInGroupMutelist",r),n.hj.call(this,d).then((function(r){return r.data}))}function _r(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.msgId||""===r.msgId)throw Error('Invalid parameter: "msgId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d={url:this.apiUrl+"/"+u+"/"+p+"/chatgroups/"+r.groupId+"/acks/"+r.msgId,dataType:"json",type:"GET",data:{limit:500,key:void 0},headers:{Authorization:"Bearer "+l},success:r.success,error:r.error};return c.kg.debug("Call getGroupMsgReadUser",r),n.hj.call(this,d,i.fI.GET_GROUP_MSG_READ_USER)}function Gr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.groupId,g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(d,"/announcement"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call fetchGroupAnnouncement",r),n.hj.call(this,g,i.fI.GET_GROUP_ANN)}function Nr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.announcement)throw Error('Invalid parameter: "announcement"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h={announcement:r.announcement},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/announcement?resource=").concat(d.clientResource),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call updateGroupAnnouncement",r),n.hj.call(this,f,i.fI.UPDATE_GROUP_ANN)}function Ur(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("object"!==u(r.file))throw Error('Invalid parameter: "file"');if(s.XZ.call(this)){var e=this.context,t=e.orgName,o=e.appName,a=e.accessToken,p=e.jid,l=r.groupId;n.cT.call(this,{uploadUrl:"".concat(this.apiUrl,"/").concat(t,"/").concat(o,"/chatgroups/").concat(l,"/share_files?resource=").concat(p.clientResource),onFileUploadProgress:r.onFileUploadProgress,onFileUploadComplete:r.onFileUploadComplete,onFileUploadError:r.onFileUploadError,onFileUploadCanceled:r.onFileUploadCanceled,accessToken:a,apiUrl:this.apiUrl,file:r.file,appKey:this.context.appKey},i.fI.UPLOAD_GROUP_FILE),c.kg.debug("Call uploadGroupSharedFile",r)}}function br(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof r.fileId||""===r.fileId)throw Error('Invalid parameter: "file"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=t.jid,g=r.groupId,h=r.fileId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(g,"/share_files/").concat(h,"?resource=").concat(d.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call deleteGroupSharedFile",r),n.hj.call(this,f,i.fI.DELETE_GROUP_FILE)}function Pr(r){if("string"!=typeof r.groupId||""===r.groupId)throw Error('Invalid parameter: "groupId"');if(!s.XZ.call(this)){var e=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,u=t.orgName,p=t.appName,l=t.accessToken,d=r.pageNum||1,g=r.pageSize||10,h=r.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(p,"/chatgroups/").concat(h,"/share_files?pagenum=").concat(d,"&pagesize=").concat(g),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:r.success,error:r.error};return c.kg.debug("Call getGroupSharedFilelist",r),n.hj.call(this,f,i.fI.GET_GROUP_FILE_LIST)}var Mr=Pr;function wr(r){var e=this.context,t=e.orgName,o=e.appName,a=e.accessToken,s=this.apiUrl,u=r.groupId,p=r.fileId;n.LR.call(this,{url:"".concat(s,"/").concat(t,"/").concat(o,"/chatgroups/").concat(u,"/share_files/").concat(p),onFileDownloadComplete:r.onFileDownloadComplete,onFileDownloadError:r.onFileDownloadError,accessToken:a,id:p,secret:r.secret},i.fI.DOWN_GROUP_FILE),c.kg.debug("Call downloadGroupSharedFile",r)}function Or(r){return p(this,void 0,void 0,(function(){var e,t,p,d,g,h,f,m,y,T,I;return l(this,(function(l){switch(l.label){case 0:if(e=r.groupId,t=r.userId,p=r.memberAttributes,"string"!=typeof e||""===e)throw Error('Invalid parameter: "groupId"');if("string"!=typeof t||""===t)throw Error('Invalid parameter: "userId"');if("object"!==u(p))throw Error('Invalid parameter: "memberAttributes"');return s.XZ.call(this)?(g=this.context,h=g.orgName,f=g.appName,m=g.accessToken,y=g.jid,T={metaData:p},I={url:"".concat(this.apiUrl,"/").concat(h,"/").concat(f,"/sdk/metadata/chatgroup/").concat(e,"/user/").concat(t,"?resource=").concat(y.clientResource),type:"PUT",dataType:"json",data:JSON.stringify(T),headers:{Authorization:"Bearer "+m,"Content-Type":"application/json"}},c.kg.debug("Call setGroupMemberAttributes",r),[4,n.hj.call(this,I,i.fI.SET_GROUP_MEMBER_ATTRS)]):(d=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(d)]);case 1:return l.sent(),[2]}}))}))}function Cr(r){var e=r.groupId,t=r.userId;return Zr.call(this,{groupId:e,userIds:[t]}).then((function(r){var e;return{type:r.type,data:null===(e=r.data)||void 0===e?void 0:e[t]}}))}function Zr(r){var e=r.groupId,t=r.userIds,u=r.keys,p=void 0===u?[]:u;if("string"!=typeof e||""===e)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(t)||(null==t?void 0:t.length)<=0)throw Error('Invalid parameter: "userIds"');if(!Array.isArray(p))throw Error('Invalid parameter: "keys"');if(!s.XZ.call(this)){var l=a.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(l)}var d=this.context,g=d.orgName,h=d.appName,f=d.accessToken,m={targets:t,properties:p},y={url:"".concat(this.apiUrl,"/").concat(g,"/").concat(h,"/sdk/metadata/chatgroup/").concat(e,"/get"),type:"POST",dataType:"json",data:JSON.stringify(m),headers:{Authorization:"Bearer "+f,"Content-Type":"application/json"}};return c.kg.debug("Call getGroupMembersAttributes",r),n.hj.call(this,y,i.fI.GET_GROUP_MEMBER_ATTR).then((function(r){return{type:r.type,data:(null==r?void 0:r.data)||{}}}))}},5220:function(r,e,t){t.d(e,{H7:function(){return u},XZ:function(){return c},_W:function(){return i}}),t(6957),t(7460),t(7451),t(6463),t(3355),t(4791);var o=t(7912),a=t(2671);function n(){var r=this.context.appName,e=this.context.orgName;return!(!r||!e)||(this.onError&&this.onError({type:o.E.WEBIM_CONNCTION_AUTH_ERROR,message:"appName or orgName is illegal"}),!1)}function s(){var r;if(!this.context.accessToken){var e=a.Z.create({type:o.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"});return this.onError&&this.onError(e),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",e),!1}return!0}function c(){return s.call(this)&&n.call(this)}function i(r){var e=r.data,t=r.type;return{data:{status:Object.keys(e.errorKeys).length>0?"fail":"success",errorKeys:e.errorKeys,successKeys:e.successKeys},type:t}}function u(r){var e=r.data,t=void 0;return Object.keys(e.errorKeys).length>0&&Object.keys(e.errorKeys).forEach((function(r){var n=e.errorKeys[r];t=n.includes("is not part of you")?a.Z.create({type:o.E.NO_PERMISSION,message:n}):n.includes("size of metadata for this single chatroom exceeds the user defined limit")||n.includes("total size of chatroom metadata for this app exceeds the user defined limit")||n.includes("is exceeding maximum limit")?a.Z.create({type:o.E.MAX_LIMIT,message:n}):n.includes("is not Legal")?a.Z.create({type:o.E.REQUEST_PARAMETER_ERROR,message:n}):n.includes("Failed to update userMetadata. Concurrent updates not allowed")?a.Z.create({type:o.E.OPERATION_NOT_ALLOWED,message:n}):a.Z.create({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,message:n})})),t}}},function(r){return 9685,r(r.s=9685)}])}));
@@ -87,10 +87,12 @@ export interface AudioMsgBody extends AudioMsgSetParameters {
87
87
  /** Message priority. */
88
88
  priority?: MessagePriority;
89
89
  /** Whether the message is delivered only when the recipient(s) is/are online:
90
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
91
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
90
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
91
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
92
92
  */
93
93
  deliverOnlineOnly?: boolean;
94
+ /** The list of message recipients. */
95
+ receiverList?: string[];
94
96
  }
95
97
  export interface CreateAudioMsgParameters {
96
98
  /** The message type. */
@@ -139,10 +141,12 @@ export interface CreateAudioMsgParameters {
139
141
  /** Message priority. */
140
142
  priority?: MessagePriority;
141
143
  /** Whether the message is delivered only when the recipient(s) is/are online:
142
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
143
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
144
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
145
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
144
146
  */
145
147
  deliverOnlineOnly?: boolean;
148
+ /** The list of message recipients. */
149
+ receiverList?: string[];
146
150
  }
147
151
  export declare class Audio {
148
152
  id: string;
@@ -31,8 +31,8 @@ export interface ChannelMsgBody extends ChannelMsgSetParameters {
31
31
  /** Message priority. */
32
32
  priority?: MessagePriority;
33
33
  /** Whether the message is delivered only when the recipient(s) is/are online:
34
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
35
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
34
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
35
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
36
36
  */
37
37
  deliverOnlineOnly?: boolean;
38
38
  }
@@ -56,8 +56,8 @@ export interface CreateChannelMsgParameters {
56
56
  /** Message priority. */
57
57
  priority?: MessagePriority;
58
58
  /** Whether the message is delivered only when the recipient(s) is/are online:
59
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
60
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
59
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
60
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
61
61
  */
62
62
  deliverOnlineOnly?: boolean;
63
63
  }
package/message/cmd.d.ts CHANGED
@@ -72,10 +72,12 @@ export interface CmdMsgBody {
72
72
  /** Message priority. */
73
73
  priority?: MessagePriority;
74
74
  /** Whether the message is delivered only when the recipient(s) is/are online:
75
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
76
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
75
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
76
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
77
77
  */
78
78
  deliverOnlineOnly?: boolean;
79
+ /** The list of message recipients. */
80
+ receiverList?: string[];
79
81
  }
80
82
  export interface CreateCmdMsgParameters {
81
83
  /** The message type. */
@@ -101,10 +103,12 @@ export interface CreateCmdMsgParameters {
101
103
  /** Message priority. */
102
104
  priority?: MessagePriority;
103
105
  /** Whether the message is delivered only when the recipient(s) is/are online:
104
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
105
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
106
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
107
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
106
108
  */
107
109
  deliverOnlineOnly?: boolean;
110
+ /** The list of message recipients. */
111
+ receiverList?: string[];
108
112
  }
109
113
  export declare class Cmd {
110
114
  id: string;
@@ -59,8 +59,8 @@ export interface CustomMsgBody extends CreateCustomMsgParameters {
59
59
  /** Message priority. */
60
60
  priority?: MessagePriority;
61
61
  /** Whether the message is delivered only when the recipient(s) is/are online:
62
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
63
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
62
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
63
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
64
64
  */
65
65
  deliverOnlineOnly?: boolean;
66
66
  }
@@ -92,10 +92,12 @@ export interface CreateCustomMsgParameters {
92
92
  /** Message priority. */
93
93
  priority?: MessagePriority;
94
94
  /** Whether the message is delivered only when the recipient(s) is/are online:
95
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
96
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
95
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
96
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
97
97
  */
98
98
  deliverOnlineOnly?: boolean;
99
+ /** The list of message recipients. */
100
+ receiverList?: string[];
99
101
  }
100
102
  export declare class Custom {
101
103
  id: string;
@@ -40,8 +40,8 @@ export interface DeliveryMsgBody {
40
40
  /** Message priority. */
41
41
  priority?: MessagePriority;
42
42
  /** Whether the message is delivered only when the recipient(s) is/are online:
43
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
44
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
43
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
44
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
45
45
  */
46
46
  deliverOnlineOnly?: boolean;
47
47
  }
@@ -59,8 +59,8 @@ export interface CreateDeliveryMsgParameters {
59
59
  /** Message priority. */
60
60
  priority?: MessagePriority;
61
61
  /** Whether the message is delivered only when the recipient(s) is/are online:
62
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
63
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
62
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
63
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
64
64
  */
65
65
  deliverOnlineOnly?: boolean;
66
66
  }
package/message/file.d.ts CHANGED
@@ -84,8 +84,8 @@ export interface FileMsgBody extends CreateFileMsgParameters {
84
84
  /** Message priority. */
85
85
  priority?: MessagePriority;
86
86
  /** Whether the message is delivered only when the recipient(s) is/are online:
87
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
88
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
87
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
88
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
89
89
  */
90
90
  deliverOnlineOnly?: boolean;
91
91
  }
@@ -132,10 +132,12 @@ export interface CreateFileMsgParameters {
132
132
  /** Message priority. */
133
133
  priority?: MessagePriority;
134
134
  /** Whether the message is delivered only when the recipient(s) is/are online:
135
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
136
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
135
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
136
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
137
137
  */
138
138
  deliverOnlineOnly?: boolean;
139
+ /** The list of message recipients. */
140
+ receiverList?: string[];
139
141
  }
140
142
  export declare class FileMsg {
141
143
  id: string;
package/message/img.d.ts CHANGED
@@ -97,8 +97,8 @@ export interface ImgMsgBody extends CreateImgMsgParameters {
97
97
  /** Message priority. */
98
98
  priority?: MessagePriority;
99
99
  /** Whether the message is delivered only when the recipient(s) is/are online:
100
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
101
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
100
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
101
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
102
102
  */
103
103
  deliverOnlineOnly?: boolean;
104
104
  }
@@ -147,10 +147,16 @@ export interface CreateImgMsgParameters {
147
147
  /** Message priority. */
148
148
  priority?: MessagePriority;
149
149
  /** Whether the message is delivered only when the recipient(s) is/are online:
150
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
151
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
150
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
151
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
152
152
  */
153
153
  deliverOnlineOnly?: boolean;
154
+ /** The list of message recipients. */
155
+ receiverList?: string[];
156
+ /** The thumbnail width. */
157
+ thumbnailWidth?: number;
158
+ /** The thumbnail height. */
159
+ thumbnailHeight?: number;
154
160
  }
155
161
  export declare class Img {
156
162
  id: string;
@@ -60,8 +60,8 @@ export interface LocationMsgBody extends CreateLocationMsgParameters {
60
60
  /** Message priority. */
61
61
  priority?: MessagePriority;
62
62
  /** Whether the message is delivered only when the recipient(s) is/are online:
63
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
64
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
63
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
64
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
65
65
  */
66
66
  deliverOnlineOnly?: boolean;
67
67
  }
@@ -95,10 +95,12 @@ export interface CreateLocationMsgParameters {
95
95
  /** Message priority. */
96
96
  priority?: MessagePriority;
97
97
  /** Whether the message is delivered only when the recipient(s) is/are online:
98
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
99
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
98
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
99
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
100
100
  */
101
101
  deliverOnlineOnly?: boolean;
102
+ /** The list of message recipients. */
103
+ receiverList?: string[];
102
104
  }
103
105
  export declare class Location {
104
106
  id: string;
package/message/read.d.ts CHANGED
@@ -38,8 +38,8 @@ export interface ReadMsgBody extends ReadMsgSetParameters {
38
38
  /** Message priority. */
39
39
  priority?: MessagePriority;
40
40
  /** Whether the message is delivered only when the recipient(s) is/are online:
41
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
42
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
41
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
42
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
43
43
  */
44
44
  deliverOnlineOnly?: boolean;
45
45
  }
@@ -67,8 +67,8 @@ export interface CreateReadMsgParameters {
67
67
  /** Message priority. */
68
68
  priority?: MessagePriority;
69
69
  /** Whether the message is delivered only when the recipient(s) is/are online:
70
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
71
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
70
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
71
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
72
72
  */
73
73
  deliverOnlineOnly?: boolean;
74
74
  }
package/message/text.d.ts CHANGED
@@ -73,10 +73,12 @@ export interface TextMsgBody {
73
73
  /** Message priority. */
74
74
  priority?: MessagePriority;
75
75
  /** Whether the message is delivered only when the recipient(s) is/are online:
76
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
77
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
76
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
77
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
78
78
  */
79
79
  deliverOnlineOnly?: boolean;
80
+ /** The list of message recipients. */
81
+ receiverList?: string[];
80
82
  }
81
83
  export interface CreateTextMsgParameters {
82
84
  /** The session type. */
@@ -103,10 +105,12 @@ export interface CreateTextMsgParameters {
103
105
  /** Message priority. */
104
106
  priority?: MessagePriority;
105
107
  /** Whether the message is delivered only when the recipient(s) is/are online:
106
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
107
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
108
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
109
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
108
110
  */
109
111
  deliverOnlineOnly?: boolean;
112
+ /** The list of message recipients. */
113
+ receiverList?: string[];
110
114
  }
111
115
  export declare class Text {
112
116
  id: string;
@@ -85,10 +85,12 @@ export interface VideoMsgBody extends VideoMsgSetParameters {
85
85
  /** Message priority. */
86
86
  priority?: MessagePriority;
87
87
  /** Whether the message is delivered only when the recipient(s) is/are online:
88
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
89
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
88
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
89
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
90
90
  */
91
91
  deliverOnlineOnly?: boolean;
92
+ /** The list of message recipients. */
93
+ receiverList?: string[];
92
94
  }
93
95
  export interface CreateVideoMsgParameters {
94
96
  /** The message type. */
@@ -137,10 +139,12 @@ export interface CreateVideoMsgParameters {
137
139
  /** Message priority. */
138
140
  priority?: MessagePriority;
139
141
  /** Whether the message is delivered only when the recipient(s) is/are online:
140
- * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
141
- * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
142
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
143
+ * - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
142
144
  */
143
145
  deliverOnlineOnly?: boolean;
146
+ /** The list of message recipients. */
147
+ receiverList?: string[];
144
148
  }
145
149
  export declare class Video {
146
150
  id: string;