@ccw-api/api 1.0.1 → 1.0.2

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/LICENSE CHANGED
@@ -5,5 +5,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
5
5
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
6
 
7
7
  THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
-
9
- Fork this project to create your own MIT license that you can always link to.
@@ -0,0 +1 @@
1
+ var ccwApi=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let t={post(e,t=null){return n.post(e,t)},get(e){return n.get(e)}},n={async post(e,t=null){throw Error(`requestUtils for @ccw-api/api is not initialized`)},async get(e){throw Error(`requestUtils for @ccw-api/api is not initialized`)}};function r(e){n=e}async function i(e,n,r={device:`Node`,browser:`Node.js`}){let i={loginKey:e,password:n,clientCode:`STUDY_COMMUNITY`,extra:JSON.stringify({...r,scene:null})},{extra:a,...o}=await t.post(`https://sso.ccw.site/web/auth/login-by-password`,i).then(e=>e.data.body),s=JSON.parse(a);return{...o,extra:s}}async function a(){return await t.post(`https://sso.ccw.site/web/auth/logout`,{}).then(e=>e.data.body)}async function o(e){return await t.post(`https://sso.ccw.site/web/auth/logout_by_session`,{id:e}).then(e=>e.data.body)}async function s(e,n=`loginbyPhone`,r=`86`,i=`ccw_sms`,a){let o={recipient:e,countryCode:r,scene:n,ruleCode:i,captcha:a};return await t.post(`https://sso.ccw.site/web/auth/assistant/captcha/v2/create`,o).then(e=>e.data.body)}async function c(e,n,r={device:`Node`,browser:`Node.js`},i=`86`,a=`ccw_sms`,o=`loginbyPhone`){let{extra:s,...c}=await t.post(`https://sso.ccw.site/web/auth/v3/login/by_phone`,{phone:e,code:n,countryCode:i,ruleCode:a,scene:o,clientCode:`STUDY_COMMUNITY`,extra:JSON.stringify({...r,scene:null})}).then(e=>e.data.body),l=JSON.parse(s);return{...c,extra:l}}let l={loginByPassword:i,logout:a,logoutBySession:o,createSmsCaptcha:s,loginByPhone:c};async function u(e,n,r,i){let a={origin:{inviterAvatar:n,inviterName:r,inviterId:e,inviterType:`STUDENT`,entrance:`create_detail`,creationOid:i}};return await t.post(`https://community-web.ccw.site/api/v1/short_code/encode`,a).then(e=>e.data.body)}async function ee(e){let n={objectId:e,objectType:`STUDENT`};return await t.post(`https://community-web.ccw.site/approval/list`,n).then(e=>e.data.body)}async function te(){return t.post(`https://community-web.ccw.site/base/dateTime`,void 0).then(e=>e.data.body)}async function ne(e){return await t.post(`https://community-web.ccw.site/campaign_resource/detail`,{keyword:e}).then(e=>e.data.body)}async function re(){return await t.post(`https://community-web.ccw.site/check_in_record/detail`,{scene:`HOMEPAGE`}).then(e=>e.data.body)}async function ie(){return await t.post(`https://community-web.ccw.site/check_in_record/insert`,{scene:`HOMEPAGE`}).then(e=>e.data.body)}async function ae(){return await t.post(`https://community-web.ccw.site/cloud_asset/user/privacy`,{}).then(e=>e.data.body)}function d(e,t){let n=new URL(e);return Object.entries(t).forEach(([e,t])=>{t!=null&&n.searchParams.set(e,t)}),n.toString()}let f={page:1,perPage:20,sortType:`DESC`,sortField:``},oe={...f,sortField:`createdAt`};async function se(e,n=`/`,r={}){let i=d(`https://community-web.ccw.site/cloud_asset/search`,{...oe,...r}),a={creatorOid:e,path:n};return await t.post(i,a).then(e=>e.data.body)}async function ce(e,n,r=[`PUBLISHED`,`FOLDED`],i={sortField:`createdAt`}){let a=d(`https://community-web.ccw.site/comment/page`,{...f,...i}),o={topicId:e,parentId:n,statuses:r};return await t.post(a,o).then(e=>e.data.body)}let p={...f,sortField:`createdAt`};async function m(e,n,r,i={sortField:`createdAt`}){let a=d(`https://community-web.ccw.site/comment/page_by_topic`,{...p,...i}),o={subjectOid:e,subjectType:n,sectionType:r};return await t.post(a,o).then(e=>e.data.body)}async function h(e){let n={key:e};return await t.post(`https://community-web.ccw.site/config/detail`,n).then(e=>e.data.body)}async function g(e,n={sortField:`createdAt`}){let r={...f,...n},i=d(`https://community-web.ccw.site/ccw-mall/ccw/product/fe/query`,r),a={page:r.page,perPage:r.perPage,sortType:r.sortType,productCategory:e,source:`CCW_OFFICIAL`};return await t.post(i,a).then(e=>e.data.body)}async function _(e,n,r,i=`ORIGINAL`,a=`LANDSCAPE`,o=`PRIVATE`){let s={type:i,title:e,latestProjectLink:n,screenMode:a,artifactType:`STANDARD`,sourceOpenLevel:o,latestCoverLink:r};return await t.post(`https://community-web.ccw.site/creation/create`,s).then(e=>e.data.body)}async function v(e,n,r=``){let i={oid:e,accessKey:n,mode:r};return await t.post(`https://community-web.ccw.site/creation/detail`,i).then(e=>e.data.body)}async function y(e){let n={num:e};return await t.post(`https://community-web.ccw.site/creation/excellent/list`,n).then(e=>e.data.body)}async function b(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/creation/introduction/detail`,n).then(e=>e.data.body)}async function x(e){let n={creationOid:e};return await t.post(`https://community-web.ccw.site/creation/like/detail`,n).then(e=>e.data.body)}async function S(){return await t.post(`https://community-web.ccw.site/creation/loading/tips`,{}).then(e=>e.data.body)}let C={...f,sortField:`createdAt`};async function w(e,n={}){let r=d(`https://community-web.ccw.site/creation/page`,{...C,...n}),i={remixCreationOids:e};return await t.post(r,i).then(e=>e.data.body)}let T={...f,sortField:`createdAt`};async function E(e,n={}){let r=d(`https://community-web.ccw.site/creation/page_by_student`,{...T,...n}),i={studentOids:e};return await t.post(r,i).then(e=>e.data.body)}async function D(e){let n={num:e};return await t.post(`https://community-web.ccw.site/creation/potential/list`,n).then(e=>e.data.body)}let O={...f,sortField:`createdAt`};async function k(e,n={}){let r=d(`https://community-web.ccw.site/creation/recommend`,{...O,...n}),i={num:e,subjectType:`POTENTIAL`};return await t.post(r,i).then(e=>e.data.body)}async function A(e=4,n=8){let r={excellentCount:e,potentialCount:n};return await t.post(`https://community-web.ccw.site/recommend_creator/list`,r).then(e=>e.data.body)}let j={...f,sortField:`createdAt`};async function M(e,n={}){let r=d(`https://community-web.ccw.site/creation/search/page`,{...j,...n});return await t.post(r,e).then(e=>e.data.body)}async function N(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/creation/student/detail`,n).then(e=>e.data.body)}async function P(){return await t.post(`https://community-web.ccw.site/creation/tag/list`,{visibility:`PUBLIC`}).then(e=>e.data.body)}async function F(e){let n={originUrl:e};return await t.post(`https://community-web.ccw.site/short_url/create`,n).then(e=>e.data.body)}async function I(e){let n={creationOid:e};return await t.post(`https://community-web.ccw.site/hash_tag_creation/list_relation`,n).then(e=>e.data.body)}let L={...f,sortField:`lastPassedAt`};async function R(e,n,r={}){let i={...L,...r},a=d(`https://community-web.ccw.site/hash_tag_creation/mine`,i),o={...i,excludeHashTag:e,statuses:n};return await t.post(a,o).then(e=>e.data.body)}async function z(e){let n={identifier:e};return await t.post(`https://community-web.ccw.site/hash_tag/detail`,n).then(e=>e.data.body)}let B={...f,sortField:`createdAt`};async function V(e,n=[],r={}){let i={...B,...r},a=d(`https://community-web.ccw.site/hash_tag/managed/list`,i),o={...i,studentOid:e,excludeHashTagIds:n};return await t.post(a,o).then(e=>e.data.body)}async function H(e){let n={hashTagId:e};return await t.post(`https://community-web.ccw.site/hash_tag_favorite/detail`,n).then(e=>e.data.body)}async function U(e,n={sortField:`createdAt`}){let r=d(`https://community-web.ccw.site/creation_donated_record/ranking_list`,{...f,...n}),i={creationOid:e};return await t.post(r,i).then(e=>e.data.body)}async function W(e){let n={creationOid:e};return await t.post(`https://community-web.ccw.site/creation_favorite/detail`,n).then(e=>e.data.body)}async function G(e){let n={creationOid:e};return await t.post(`https://community-web.ccw.site/creation_recommend_position/list`,n).then(e=>e.data.body)}async function le(e,n={}){let r=d(`https://community-web.ccw.site/creation_screenshot/page`,{...f,...n}),i={subjectOid:e};return await t.post(r,i).then(e=>e.data.body)}async function ue(e,n=``){let r={oid:e,inviteCode:n};return await t.post(`https://community-web.ccw.site/creation_stats/view`,r).then(e=>e.data.body)}async function de(){return await t.post(`https://community-web.ccw.site/notify_message/show`,{type:`COMMENT_AUDIT`}).then(e=>e.data.body)}async function fe(e){let n={slug:e};return await t.post(`https://community-web.ccw.site/post/detail`,n).then(e=>e.data.body)}async function pe(e){let n={length:e};return await t.post(`https://community-web.ccw.site/search/hot_words`,n).then(e=>e.data.body)}async function me(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/student/block_record/detail`,n).then(e=>e.data.body)}async function he(e={sortField:`createdAt`}){let n=d(`https://community-web.ccw.site/student/block_record/list`,{...f,...e});return await t.post(n,{}).then(e=>e.data.body)}async function ge(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/student/block_record/status`,n).then(e=>e.data.body)}async function _e(){return await t.post(`https://community-web.ccw.site/students/creator_score`,void 0).then(e=>e.data.body)}async function ve(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/students/last_active_at`,n).then(e=>e.data.body)}async function ye(e){let n={studentOids:e};return await t.post(`https://community-web.ccw.site/students/list`,n).then(e=>e.data.body)}async function be(e={sortField:`createdAt`}){let n=d(`https://community-web.ccw.site/students/list_sessions`,{...f,...e});return await t.post(n,{}).then(e=>e.data.body)}async function xe(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/students/profile`,n).then(e=>e.data.body)}async function Se(e={sortField:`createdAt`}){let n=d(`https://community-web.ccw.site/students/reputation_score_log/page`,{...f,...e});return await t.post(n,{}).then(e=>e.data.body)}async function Ce(e,n,r){let i={needGrade:e,needExtraInfo:n,fields:r};return await t.post(`https://community-web.ccw.site/students/self/detail`,i).then(e=>e.data.body)}async function we(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/students/stats`,n).then(e=>e.data.body)}async function Te(e,n,r,i,a,o,s,c,l){let u={gender:e,hideGender:n,fullName:r,birthday:i,programmingCapability:a,school:o,qq:s,hobbies:c,learnedProgrammingLanguages:l};return await t.post(`https://community-web.ccw.site/students/update`,u).then(e=>e.data.body)}async function Ee(){return await t.post(`https://community-web.ccw.site/study-community/member/detail`,{}).then(e=>e.data.body)}async function De(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/study-community/spread_feed/unread/count`,n).then(e=>e.data.body)}async function Oe(e,n={sortField:`createdAt`}){let r=d(`https://community-web.ccw.site/subject_area/page`,{...f,...n}),i={scene:e};return await t.post(r,i).then(e=>e.data.body)}async function ke(e,n={sortField:`campaignResourceId`}){let r=d(`https://community-web.ccw.site/subject_area/page_by_channel`,{...f,...n}),i={channel:e,scene:`CUSTOM_PAGE`};return await t.post(r,i).then(e=>e.data.body)}async function Ae(e){let n={taskOid:e};return await t.post(`https://community-web.ccw.site/task/award`,n).then(e=>e.data.body)}async function je(){return await t.post(`https://community-web.ccw.site/task/mine`,{scene:`checkIn`}).then(e=>e.data.body)}async function Me(e){let n={oid:e};return await t.post(`https://community-web.ccw.site/user-card/detail`,n).then(e=>e.data.body)}async function Ne(){return await t.post(`https://community-web.ccw.site/user_label/list`,{}).then(e=>e.data.body)}async function Pe(){return await t.post(`https://community-web.ccw.site/currency/account/personal`).then(e=>e.data.body)}async function Fe(){return await t.post(`https://community-web.ccw.site/emoji/all`,{}).then(e=>e.data.body)}async function Ie(){return await t.post(`https://community-web.ccw.site/emoji/category/list`,{}).then(e=>e.data.body)}async function Le(e=`ENABLED`,n={sortField:`createdAt`}){let r={...f,...n},i=d(`https://community-web.ccw.site/emoji/page`,r),a={page:r.page,perPage:r.perPage,status:e};return await t.post(i,a).then(e=>e.data.body)}async function Re(e){let n={actionId:e};return await t.post(`https://community-web.ccw.site/event`,n).then(e=>e.data.body)}async function ze(){return await t.post(`https://community-web.ccw.site/health/check`).then(e=>e.data.body)}async function Be(e){let n={advertisementId:e};return await t.post(`https://community-web.ccw.site/leaflets/item/list`,n).then(e=>e.data.body)}async function Ve(e){let n={accountOid:e};return await t.post(`https://community-web.ccw.site/locked_user/detail`,n).then(e=>e.data.body)}async function He(e){let n={studentNumber:e};return await t.post(`https://community-web.ccw.site/muted_user/detail`,n).then(e=>e.data.body)}async function Ue(e=`COMMENT_TO_ME`,n={sortField:`createdAt`}){let r={...f,...n},i=d(`https://community-web.ccw.site/notification/page`,r),a={notifyGroup:e,page:r.page};return await t.post(i,a).then(e=>e.data.body)}async function We(e=!0){let n={countAll:e};return await t.post(`https://community-web.ccw.site/notification/stats/v2`,n).then(e=>e.data.body)}async function Ge(e,n={sortField:`createdAt`}){let r=d(`https://community-web.ccw.site/typical_project/page`,{...f,...n}),i={studentOid:e,templateType:`APPLICATION`};return await t.post(r,i).then(e=>e.data.body)}async function Ke(e){let n={studentOid:e};return await t.post(`https://community-web.ccw.site/typical_project/student/unread_count`,n).then(e=>e.data.body)}async function qe(e={sortField:`updatedAt`},n=[`BANNED`,`PUBLISHED`,`REJECTED`,`SUBMITTED`],r=!1){let i=d(`https://community-web.ccw.site/creation/own/page`,{...f,...e}),a={statuses:n,ignoreTypicalProject:r};return await t.post(i,a).then(e=>e.data.body)}async function Je(e){let n={creationOid:e};return await t.post(`https://community-web.ccw.site/creation/team_member/observer_invite_token/fetch`,n).then(e=>e.data.body)}async function Ye(e,n=`MEMBER`){let r={creationOid:e,authority:n};return await t.post(`https://community-web.ccw.site/creation/team_member/invite_token/fetch`,r).then(e=>e.data.body)}async function Xe(e){let n={creationOid:e};return await t.post(`https://community-web.ccw.site/creation/team_member/produce_ticket`,n).then(e=>e.data.body)}async function Ze(e,n){let r={creationOid:e,authorities:n};return await t.post(`https://community-web.ccw.site/creation/team_member/list`,r).then(e=>e.data.body)}async function Qe(e,n,r={sortField:`createdAt`}){let i=d(`https://community-web.ccw.site/creation/teamwork_log/page`,{...f,...r}),a={creationId:e,operateTargets:n},o=await t.post(i,a).then(e=>e.data.body),{data:s}=o,c=s.map(e=>{let{content:t}=e;return{...e,content:JSON.parse(t)}});return{...o,data:c}}async function $e(e,n,r=`LANDSCAPE`,i){if(!n.includes(`t=`)){let e=new URL(n);e.searchParams.set(`t`,Date.now().toString()),n=e.toString()}let a={oid:e,latestProjectLink:n,screenMode:r,latestCoverLink:i};return await t.post(`https://community-web.ccw.site/creation/update`,a).then(e=>e.data.body)}async function et(e){return await t.post(`https://community-web.ccw.site/creation/submit`,e).then(e=>e.data.body)}async function tt(e){let n={creationOid:e};return await t.post(`https://community-web.ccw.site/creation/smart_contract/split_rule/detail`,n).then(e=>e.data.body)}async function nt(e,n,r=`86`){let i={phone:e,code:n,ruleCode:`ccw_sms`,scene:`bindPhone`,countryCode:r};return await t.post(`https://community-web.ccw.site/students/bind_phone`,i).then(e=>e.data.body)}async function rt(e,n){let r={newPassword:e,code:n};return await t.post(`https://community-web.ccw.site/students/password/change`,r).then(e=>e.data.body)}async function it(e=`change_password`,n=`86`,r=`ccw_sms`,i=`SMS`){let a={type:i,countryCode:n,scene:e,ruleCode:r};return await t.post(`https://community-web.ccw.site/captcha/v2/create_by_session`,a).then(e=>e.data.body)}async function at(e,n){let r={creationOid:e,memberSplitDetails:n};return await t.post(`https://community-web.ccw.site/creation/smart_contract/split_rule/create`,r).then(e=>e.data.body)}async function ot(e){let n={creationOid:e},r=await t.post(`https://community-web.ccw.site/creation_attribute/detail`,n).then(e=>e.data.body);if(r===null)return null;let{ext:{KEYPAD_CONFIG:i}}=r,a=JSON.parse(i);return{...r,ext:{KEYPAD_CONFIG:a}}}async function st(e){let n={creationOid:e,type:`DAY`};return await t.post(`https://community-web.ccw.site/creation_activity_stats/list`,n).then(e=>e.data.body)}async function ct(e,n={sortField:`submittedAt`}){let r=d(`https://community-web.ccw.site/creation_release/page`,{...f,...n}),i={creationOid:e};return await t.post(r,i).then(e=>e.data.body)}async function lt(e,n){let r={creationOid:e,creationReleaseOid:n};return await t.post(`https://community-web.ccw.site/creation_release/code_profiling/detail`,r).then(e=>e.data.body)}async function ut(e,n={sortField:`createdAt`}){let r={...f,...n},i=d(`https://community-web.ccw.site/historical_team_member/page`,r),a={creationOid:e,page:r.page,perPage:r.perPage};return await t.post(i,a).then(e=>e.data.body)}async function dt(e){let n={shortUrlCode:e};return await t.post(`https://community-web.ccw.site/short_url/decompress`,n).then(e=>e.data.body)}async function ft(){return await t.post(`https://community-web.ccw.site/hash_tag/recommend/list`).then(e=>e.data.body)}async function pt(){return await t.post(`https://community-web.ccw.site/ccw-main/status`,{}).then(e=>e.data.body)}async function mt(e,n){let r={projectId:e,variables:n};return await t.post(`https://community-web.ccw.site/study-community/cloud_variable/create`,r).then(e=>e.data.body)}async function ht(e){let n={id:e};return await t.post(`https://community-web.ccw.site/study-community/comment/top`,n).then(e=>e.data.body)}async function gt(e){let n={id:e};return await t.post(`https://community-web.ccw.site/study-community/comment/fold`,n).then(e=>e.data.body)}async function _t(e){let n={id:e};return await t.post(`https://community-web.ccw.site/study-community/comment/reset_weight`,n).then(e=>e.data.body)}async function vt(e){let n={id:e};return await t.post(`https://community-web.ccw.site/study-community/comment/delete`,n).then(e=>e.data.body)}async function yt(e,n,r){n.outline??=`foo`;let i={content:e,topic:n,sectionType:r};return await t.post(`https://community-web.ccw.site/comment/create`,i).then(e=>e.data.body)}async function bt(e){let n={commentId:e};return await t.post(`https://community-web.ccw.site/comment/like_record/create`,n).then(e=>e.data.body)}async function xt(e,n={sortField:`createdAt`}){let r=d(`https://community-web.ccw.site/student/following/page`,{...f,...n}),i={studentOid:e};return await t.post(r,i).then(e=>e.data.body)}async function St(e,n,r=`CREATION`){let i={bucks:e,objectId:n,objectType:r};return await t.post(`https://community-web.ccw.site/study-trade/trade/donate`,i).then(e=>e.data.body)}async function Ct(e=5,n={}){let r={...f,...n},i=d(`https://community-web.ccw.site/user_package/user_product`,r),a={page:r.page,perPage:r.perPage,sortType:r.sortType,productCategory:e};return await t.post(i,a).then(e=>e.data.body)}async function wt(e,n){let r={status:n,id:e};return await t.post(`https://community-web.ccw.site/user_package/status`,r).then(e=>e.data.body)}async function Tt(e){let n={creationOid:e};return await t.post(`https://community-web.ccw.site/great_creation/update`,n).then(e=>e.data.body)}async function Et(e,n,r,i,a=`CREATION`){let o={bizId:e,bizType:a,id:n,ruleId:r,params:{bucks:i}};return await t.post(`https://community-web.ccw.site/smart_contract/execute`,o).then(e=>e.data.body)}async function Dt(e){let n={id:e};return await t.post(`https://community-web.ccw.site/smart_contract/account`,n).then(e=>e.data.body)}async function Ot(e){let n={id:e};return await t.post(`https://community-web.ccw.site/smart_contract/detail`,n).then(e=>e.data.body)}async function kt(e,n=`CREATION`){let r={bizId:e,bizType:n};return await t.post(`https://community-web.ccw.site/smart_contract/list`,r).then(e=>e.data.body)}async function At(e,n){let r={playingCreationOid:e,userOid:n};return await t.post(`https://community-web.ccw.site/extensions/following/status`,r).then(e=>e.data.body)}async function jt(e,n){let r={playingCreationOid:e,creationOid:n};return await t.post(`https://community-web.ccw.site/extensions/creation-like/detail`,r).then(e=>e.data.body)}async function Mt(e){let n={followingOid:e};return await t.post(`https://community-web.ccw.site/study-community/following/follow`,n).then(e=>e.data.body)}async function Nt(e){let n={followingOid:e};return await t.post(`https://community-web.ccw.site/study-community/following/unfollow`,n).then(e=>e.data.body)}let K={acceptAward:Ae,bindStudentPhone:nt,changeStudentPassword:rt,createCreation:_,donateTrade:St,encodeShortCode:u,executeSmartContract:Et,fetchMemberInviteToken:Ye,fetchObserverInviteToken:Je,createCloudVariable:mt,createComment:yt,createShortUrl:F,createSmsCaptchaBySession:it,createSplitRule:at,decompressShortUrl:dt,deleteComment:vt,foldComment:gt,followCreator:Mt,unfollowCreator:Nt,getApprovalTags:ee,getCampaignResources:ne,getCcwMainStatus:pt,getCheckInRecords:re,getCodeProfilingDetail:lt,getCommentReplies:ce,getCommentsByTopic:m,getConfigDetail:h,getCreationActivityStatsList:st,getCreationAttributeDetail:ot,getCreationDetail:v,getCreationFavoriteDetail:W,getCreationIntroduction:b,getConnectCommunityCreationLikeStatus:jt,getCreationRecommendPositionList:G,getCreationReleasePage:ct,getCreationScreenshotPage:le,getCreationStudentDetail:N,getCreationTags:P,getCreatorScore:_e,getDonatedRecordRanking:U,getExcellentCreations:y,getConnectCommunityFollowingStatus:At,getEmojiCategoryList:Ie,getEmojiPage:Le,getAllEmojis:Fe,getHashTagDetail:z,getHashTagFavoriteDetail:H,getHistoricalTeamMemberPage:ut,getManagedHashTags:V,getHealthCheck:ze,getLeafletsItemList:Be,getLikeDetail:x,getLoadingTips:S,getLockedUserDetail:Ve,getMutedUserDetail:He,getMyHashTagCreations:R,getMyTasks:je,getNotifyDeleteReasons:de,getNotificationPage:Ue,getNotificationStats:We,getOwnCreationPage:qe,getPersonalCurrencyAccount:Pe,getPlanetsOfCreation:I,getPostDetail:fe,getPotentialCreations:D,getRecommendCreations:k,getRecommendCreators:A,getRecommendHashTags:ft,getRemixedCreationPage:w,getReputationScoreLogPage:Se,getSearchHotWords:pe,getSmartContractAccount:Dt,getSmartContractDetail:Ot,getSmartContractList:kt,getSplitRuleDetail:tt,getSpreadFeedUnreadCount:De,getStudentBlockRecordDetail:me,getStudentBlockRecordList:he,getStudentBlockStatus:ge,getStudentFollowingPage:xt,getStudentLastActiveAt:ve,getStudentProfile:xe,getStudentSelfDetail:Ce,getStudentSessions:be,getStudentsList:ye,getStudentStats:we,getStudyCommunityMemberDetail:Ee,getSubjectAreaPage:Oe,getSubjectAreaPageByChannel:ke,getTeamMemberList:Ze,getTeamworkLogPage:Qe,getTime:te,getTypicalProjectPage:Ge,getTypicalProjectUnreadCount:Ke,getUserAssetStorageSize:ae,getUserCardDetail:Me,getUserLabelList:Ne,getUserProductsPage:Ct,queryMallProducts:g,getCreationsByStudent:E,insertCheckInRecord:ie,likeComment:bt,produceTeamMemberTicket:Xe,resetCommentWeight:_t,searchCloudAssets:se,searchCreationsByTag:M,sendEvent:Re,setUserProductStatus:wt,submitCreation:et,topComment:ht,updateCreation:$e,updateGreatCreation:Tt,updateStudent:Te,viewCreationStats:ue};async function Pt(){return await t.get(`https://gandi-main.ccw.site/timestamp/current`).then(e=>e.data.body)}async function Ft(e=`PUBLISHED`,n={sortField:`publishedAt`}){let r=d(`https://gandi-main.ccw.site/bulletins`,{...f,...n,status:e});return await t.get(r).then(e=>e.data.body)}async function It(e){return await t.get(`https://gandi-main.ccw.site/bulletins/${e}`).then(e=>e.data.body)}let q=`https://gandi-main.ccw.site/creation/leaderboards`;async function Lt(e,n,r,i=``){let a={score:n,oid:r,ext:i},o=`${q}/${e}/records`;return await t.post(o,a).then(e=>e.data.body)}async function Rt(e){let n=`${q}/${e}/records`;return await t.get(n).then(e=>e.data.body)}let J={getCurrentTimestamp:Pt,getBulletinsPage:Ft,getBulletinDetail:It,submitLeaderboardRecord:Lt,getLeaderboardRecords:Rt};async function zt(e,n={sortField:`updatedAt`}){let r={...f,...n},i=d(`https://bfs-web.ccw.site/users/${e}/extensions`,r);return await t.get(i).then(e=>e.data.body)}async function Bt(e,n){let r={eid:e,bucks:n};return await t.post(`https://bfs-web.ccw.site/extensions/${e}/donate`,r).then(e=>e.data.body)}let Y={donateExtension:Bt,getUserExtensions:zt};async function X(e,n,r){let i={primaryKey:e,secondaryKey:n,value:r};return await t.post(`https://community-web-cloud-database.ccw.site/cloud_variable/save`,i).then(e=>e.data.body)}async function Vt(e,t,n){return await X(e,t,{v:n})}async function Z(e,t,n){return await X(`${e}-u`,`${t}`,n)}async function Ht(e,n,r,i){let a={accessKey:e,primaryKey:n,secondaryKey:r,filterKeys:i};return await t.post(`https://community-web-cloud-database.ccw.site/cloud_variable/detail/v2`,a).then(e=>e.data.body)}let Q={saveProjectCloudVariable:Vt,saveUserCloudVariable:Z,getCloudVariableDetailV2:Ht};async function Ut(e=`BLOCK_PUZZLE`){let n={type:e};return await t.post(`https://op-parent-api.xiguacity.cn/captcha/create`,n).then(e=>e.data.body)}async function Wt(e,n,r=5){let i={data:{x:n,y:r},token:e};return await t.post(`https://op-parent-api.xiguacity.cn/captcha/check`,i).then(e=>e.data.body)}let $={createCaptcha:Ut,checkCaptcha:Wt};var Gt={sso:l,communityWeb:K,gandiMain:J,bfsWeb:Y,communityWebCloudDatabase:Q,opParentApi:$};return e.bfsWeb=Y,e.communityWeb=K,e.communityWebCloudDatabase=Q,e.default=Gt,e.gandiMain=J,e.opParentApi=$,e.setRequestUtils=r,e.sso=l,e})({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccw-api/api",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "ccw api collections",
5
5
  "license": "MIT",
6
6
  "author": "Meng Fuzi",
@@ -51,6 +51,7 @@
51
51
  "README.md",
52
52
  "LICENSE"
53
53
  ],
54
+ "unpkg": "./dist/index.iife.js",
54
55
  "scripts": {
55
56
  "prepublishOnly": "npm run build && npm test",
56
57
  "test": "tsx --import ./src/before.test.ts --test",