UNPKG

@tencentcloud/lite-chat

Version:

Tencent Cloud Chat SDK for Web/Mini Program/uni-app/React Native/Donut

2 lines (1 loc) 1.54 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).TencentCloudChatFriend=e()}(this,(function(){"use strict";function t(t,e,i,n){return new(i||(i=Promise))((function(o,r){function s(t){try{l(n.next(t))}catch(t){r(t)}}function c(t){try{l(n.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,c)}l((n=n.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const e="friend";var i=new class{init(t){this._core=t;const{helper:e}=t;e.registerApi("getBlacklist",this)}getBlacklist(){return t(this,void 0,void 0,(function*(){return console.log(`${e} getBlacklist`),{code:0,data:[]}}))}};var n=new class{init(t){this._core=t;const{helper:e}=t;e.registerApi("getFriendList",this)}getFriendList(){return t(this,void 0,void 0,(function*(){return console.log(`${e} getFriendList`),{code:0,data:[]}}))}};var o=new class{init(t){this._core=t;const{helper:e}=t;e.registerApi("getFriendApplicationList",this)}getFriendApplicationList(){return t(this,void 0,void 0,(function*(){return console.log(`${e} getFriendApplicationList`),{code:0,data:{friendApplicationList:[],unreadCount:0}}}))}};var r=new class{init(t){this._core=t}};const s={getBlacklist:!0,getFriendList:!0,getFriendApplicationList:!0};return new class{install(t){i.init(t),n.init(t),o.init(t),r.init(t),t.helper.registerValidateConfig({auth:s})}}}));