@ccw-api/api 0.11.0 → 1.0.0
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 +9 -0
- package/README.md +58 -10
- package/dist/account-_e06LVHE.d.cts +6 -0
- package/dist/account-_e06LVHE.d.ts +6 -0
- package/dist/{api-eD9o12yg.d.cts → api-DK7ohLa7.d.cts} +9 -18
- package/dist/{api-eD9o12yg.d.ts → api-DK7ohLa7.d.ts} +9 -18
- package/dist/bfs-web-BtWTiGvL.cjs +1 -0
- package/dist/bfs-web-xFSpR-s6.js +1 -0
- package/dist/bfs.cjs +1 -0
- package/dist/bfs.d.cts +2 -0
- package/dist/bfs.d.ts +2 -0
- package/dist/bfs.js +1 -0
- package/dist/community-web-B7SGi5-y.cjs +1 -0
- package/dist/community-web-Dzl0mbbh.js +1 -0
- package/dist/community-web-cloud-database-BkH9wp1u.cjs +1 -0
- package/dist/community-web-cloud-database-D9IZZIjN.js +1 -0
- package/dist/communityWeb.cjs +1 -0
- package/dist/communityWeb.d.cts +2 -0
- package/dist/communityWeb.d.ts +2 -0
- package/dist/communityWeb.js +1 -0
- package/dist/communityWebDB.cjs +1 -0
- package/dist/communityWebDB.d.cts +2 -0
- package/dist/communityWebDB.d.ts +2 -0
- package/dist/communityWebDB.js +1 -0
- package/dist/extensions-BhEKLZ5I.d.cts +617 -0
- package/dist/extensions-D1JeVkuw.d.ts +617 -0
- package/dist/gandi-main-Bdq3vj-l.js +1 -0
- package/dist/gandi-main-CVC31Jom.cjs +1 -0
- package/dist/gandiMain.cjs +1 -0
- package/dist/gandiMain.d.cts +2 -0
- package/dist/gandiMain.d.ts +2 -0
- package/dist/gandiMain.js +1 -0
- package/dist/index-B8SvUvok.d.ts +112 -0
- package/dist/{index-DHBvF_JC.d.ts → index-BVdJi7l7.d.ts} +12 -10
- package/dist/{index-Df4POgQq.d.ts → index-CDuyecw5.d.ts} +12 -10
- package/dist/index-CV03H74N.d.cts +2351 -0
- package/dist/index-CobjrinB.d.ts +2351 -0
- package/dist/index-CwWMFbgH.d.cts +112 -0
- package/dist/{index-BE998Kka.d.cts → index-DCDRwVC2.d.cts} +79 -74
- package/dist/{index-BDpiLiUN.d.ts → index-DXMyzE0v.d.ts} +79 -74
- package/dist/{index-DBnhnINQ.d.cts → index-IcG5LsGk.d.cts} +12 -10
- package/dist/{index-CTK9UFeW.d.cts → index-JnYvwWhY.d.cts} +33 -30
- package/dist/{index-CTK9UFeW.d.ts → index-JnYvwWhY.d.ts} +33 -30
- package/dist/{index-DcBdyIv0.d.cts → index-sOyHrix1.d.cts} +12 -10
- package/dist/index.cjs +1 -2
- package/dist/index.d.cts +167 -164
- package/dist/index.d.ts +167 -164
- package/dist/index.js +1 -2
- package/dist/op-parent-api-BC6-0rS8.js +1 -0
- package/dist/op-parent-api-BZbZzfJ6.cjs +1 -0
- package/dist/opParent.cjs +1 -0
- package/dist/opParent.d.cts +2 -0
- package/dist/opParent.d.ts +2 -0
- package/dist/opParent.js +1 -0
- package/dist/pages-K5jlky49.d.cts +42 -0
- package/dist/pages-K5jlky49.d.ts +42 -0
- package/dist/queryPages-CfywLB4S.cjs +1 -0
- package/dist/queryPages-Cj4eQL4Q.js +1 -0
- package/dist/request-CIq4GGVU.cjs +1 -0
- package/dist/request-CzgJtv9u.js +1 -0
- package/dist/session-Cw37kR-m.d.ts +43 -0
- package/dist/session-D8sffvmq.d.cts +43 -0
- package/dist/sso-C0ZWQvKo.cjs +1 -0
- package/dist/sso-DUoym0qZ.js +1 -0
- package/dist/sso.cjs +1 -0
- package/dist/sso.d.cts +2 -0
- package/dist/sso.d.ts +2 -0
- package/dist/sso.js +1 -0
- package/package.json +9 -9
- package/dist/account-Dk_iscrW.d.cts +0 -8
- package/dist/account-Dk_iscrW.d.ts +0 -8
- package/dist/bfs-web/index.cjs +0 -2
- package/dist/bfs-web/index.d.cts +0 -5
- package/dist/bfs-web/index.d.ts +0 -5
- package/dist/bfs-web/index.global.js +0 -29
- package/dist/bfs-web/index.js +0 -2
- package/dist/community-web/index.cjs +0 -2
- package/dist/community-web/index.d.cts +0 -6
- package/dist/community-web/index.d.ts +0 -6
- package/dist/community-web/index.global.js +0 -29
- package/dist/community-web/index.js +0 -2
- package/dist/community-web-cloud-database/index.cjs +0 -2
- package/dist/community-web-cloud-database/index.d.cts +0 -2
- package/dist/community-web-cloud-database/index.d.ts +0 -2
- package/dist/community-web-cloud-database/index.global.js +0 -29
- package/dist/community-web-cloud-database/index.js +0 -2
- package/dist/extensions-Bj9XMupR.d.cts +0 -662
- package/dist/extensions-zuu8XVBR.d.ts +0 -662
- package/dist/gandi-main/index.cjs +0 -2
- package/dist/gandi-main/index.d.cts +0 -3
- package/dist/gandi-main/index.d.ts +0 -3
- package/dist/gandi-main/index.global.js +0 -29
- package/dist/gandi-main/index.js +0 -2
- package/dist/index-BrxSkWbg.d.cts +0 -2289
- package/dist/index-CYQhPzUX.d.ts +0 -108
- package/dist/index-Ci0X9uqV.d.cts +0 -108
- package/dist/index-DBAUdwJo.d.ts +0 -2289
- package/dist/index.global.js +0 -29
- package/dist/op-parent-api/index.cjs +0 -2
- package/dist/op-parent-api/index.d.cts +0 -1
- package/dist/op-parent-api/index.d.ts +0 -1
- package/dist/op-parent-api/index.global.js +0 -29
- package/dist/op-parent-api/index.js +0 -2
- package/dist/pages-BgT6bhJd.d.cts +0 -46
- package/dist/pages-BgT6bhJd.d.ts +0 -46
- package/dist/session-Cq-kUclp.d.ts +0 -48
- package/dist/session-DGUV-m-G.d.cts +0 -48
- package/dist/setToken.cjs +0 -1
- package/dist/setToken.d.cts +0 -1
- package/dist/setToken.d.ts +0 -1
- package/dist/setToken.global.js +0 -29
- package/dist/setToken.js +0 -1
- package/dist/sso/index.cjs +0 -2
- package/dist/sso/index.d.cts +0 -4
- package/dist/sso/index.d.ts +0 -4
- package/dist/sso/index.global.js +0 -29
- package/dist/sso/index.js +0 -2
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { n as MongoDBId, t as CNameOssUrl } from "./api-DK7ohLa7.js";
|
|
2
|
+
import { n as PagesRes, r as SortType, t as PageArgs } from "./pages-K5jlky49.js";
|
|
3
|
+
//#region src/gandi-main/timestamp/current.d.ts
|
|
4
|
+
type Res$2 = number;
|
|
5
|
+
/**
|
|
6
|
+
* 获取服务端当前时间戳
|
|
7
|
+
* @returns {Promise<Res>} 当前时间戳(毫秒)
|
|
8
|
+
*/
|
|
9
|
+
declare function getCurrentTimestamp(): Promise<Res$2>;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/gandi-main/bulletins/page.d.ts
|
|
12
|
+
type BulletinItem = {
|
|
13
|
+
createdAt: number;
|
|
14
|
+
id: number;
|
|
15
|
+
publishedAt: number;
|
|
16
|
+
status: "PUBLISHED";
|
|
17
|
+
title: string;
|
|
18
|
+
updatedAt: number;
|
|
19
|
+
};
|
|
20
|
+
type SortField = "publishedAt";
|
|
21
|
+
type Res$1 = PagesRes<BulletinItem>;
|
|
22
|
+
/**
|
|
23
|
+
* 获取公告分页列表
|
|
24
|
+
* @param {'PUBLISHED' | S} status 公告状态过滤
|
|
25
|
+
* @param {Partial<PageArgs<SortField | T>>} pageArgs_ 分页参数
|
|
26
|
+
* @returns {Promise<Res>} 公告分页列表
|
|
27
|
+
*/
|
|
28
|
+
declare function getBulletinsPage<T extends string, S extends string>(status?: "PUBLISHED" | S, pageArgs_?: Partial<PageArgs<SortField | T>>): Promise<Res$1>;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/gandi-main/bulletins/detail.d.ts
|
|
31
|
+
type BulletinDetail = {
|
|
32
|
+
createdAt: number;
|
|
33
|
+
id: number;
|
|
34
|
+
publishedAt: number;
|
|
35
|
+
status: "PUBLISHED";
|
|
36
|
+
title: string;
|
|
37
|
+
updatedAt: number;
|
|
38
|
+
};
|
|
39
|
+
type Res = BulletinDetail;
|
|
40
|
+
/**
|
|
41
|
+
* 获取公告详情
|
|
42
|
+
* @param {number} id 公告id
|
|
43
|
+
* @returns {Promise<Res>} 公告详情
|
|
44
|
+
*/
|
|
45
|
+
declare function getBulletinDetail(id: number): Promise<Res>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/gandi-main/creation/leaderboards/{oid}/records.d.ts
|
|
48
|
+
type SubmitRes = boolean;
|
|
49
|
+
type LeaderboardUser = {
|
|
50
|
+
avatar: null | CNameOssUrl;
|
|
51
|
+
id: MongoDBId;
|
|
52
|
+
locked: null | boolean;
|
|
53
|
+
nickname: null | string;
|
|
54
|
+
};
|
|
55
|
+
type LeaderboardRecord = {
|
|
56
|
+
createdAt: number;
|
|
57
|
+
ext: string;
|
|
58
|
+
leaderboardOid: MongoDBId;
|
|
59
|
+
oid: MongoDBId;
|
|
60
|
+
ranking: number;
|
|
61
|
+
score: number;
|
|
62
|
+
updatedAt: number;
|
|
63
|
+
user: LeaderboardUser;
|
|
64
|
+
userId: MongoDBId;
|
|
65
|
+
};
|
|
66
|
+
type ScoreFormat = "DECIMAL_WITH_SEPARATOR" | string;
|
|
67
|
+
type ScoreStorageRule = "BEST" | string;
|
|
68
|
+
type StatsCycle = "ALL_DAYS" | string;
|
|
69
|
+
type LeaderboardRecordsRes = {
|
|
70
|
+
coverLink: null | CNameOssUrl;
|
|
71
|
+
createdAt: number;
|
|
72
|
+
creationId: MongoDBId;
|
|
73
|
+
curUserLeaderboardRecord: null | LeaderboardRecord;
|
|
74
|
+
displayLines: number;
|
|
75
|
+
leaderboardRecordTotalNum: number;
|
|
76
|
+
leaderboardRecords: LeaderboardRecord[];
|
|
77
|
+
oid: MongoDBId;
|
|
78
|
+
scoreFormat: ScoreFormat;
|
|
79
|
+
scoreStorageRule: ScoreStorageRule;
|
|
80
|
+
scoreUnit: string;
|
|
81
|
+
showPersonalRanking: boolean;
|
|
82
|
+
sortType: SortType;
|
|
83
|
+
statsCycle: StatsCycle;
|
|
84
|
+
title: string;
|
|
85
|
+
updatedAt: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* 向作品排行榜提交一条分数记录
|
|
89
|
+
* @param {MongoDBId} leaderboardOid 排行榜id
|
|
90
|
+
* @param {number} score 分数
|
|
91
|
+
* @param {MongoDBId} userOid 用户id
|
|
92
|
+
* @param {string} ext 扩展信息(可选)
|
|
93
|
+
* @returns {Promise<SubmitRes>} 是否提交成功
|
|
94
|
+
*/
|
|
95
|
+
declare function submitLeaderboardRecord(leaderboardOid: MongoDBId, score: number, userOid: MongoDBId, ext?: string): Promise<SubmitRes>;
|
|
96
|
+
/**
|
|
97
|
+
* 获取作品排行榜记录列表
|
|
98
|
+
* @param {MongoDBId} leaderboardOid 排行榜id
|
|
99
|
+
* @returns {Promise<LeaderboardRecordsRes>} 排行榜记录列表
|
|
100
|
+
*/
|
|
101
|
+
declare function getLeaderboardRecords(leaderboardOid: MongoDBId): Promise<LeaderboardRecordsRes>;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/gandi-main/index.d.ts
|
|
104
|
+
declare const gandiMain: {
|
|
105
|
+
getCurrentTimestamp: typeof getCurrentTimestamp;
|
|
106
|
+
getBulletinsPage: typeof getBulletinsPage;
|
|
107
|
+
getBulletinDetail: typeof getBulletinDetail;
|
|
108
|
+
submitLeaderboardRecord: typeof submitLeaderboardRecord;
|
|
109
|
+
getLeaderboardRecords: typeof getLeaderboardRecords;
|
|
110
|
+
};
|
|
111
|
+
//#endregion
|
|
112
|
+
export { getBulletinsPage as a, getBulletinDetail as i, getLeaderboardRecords as n, getCurrentTimestamp as o, submitLeaderboardRecord as r, gandiMain as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { n as MongoDBId } from "./api-DK7ohLa7.js";
|
|
2
|
+
//#region src/community-web-cloud-database/cloud_variable/save.d.ts
|
|
3
3
|
type SaveCloudVariableRes<T extends Record<string, unknown>> = T;
|
|
4
4
|
/**
|
|
5
5
|
* 保存作品云变量到云数据库
|
|
@@ -9,7 +9,7 @@ type SaveCloudVariableRes<T extends Record<string, unknown>> = T;
|
|
|
9
9
|
* @returns {Promise<SaveCloudVariableRes<T>>} 保存后的值对象
|
|
10
10
|
*/
|
|
11
11
|
declare function saveProjectCloudVariable<T extends string>(projectId: MongoDBId, secondaryKey: string, value: T): Promise<SaveCloudVariableRes<{
|
|
12
|
-
|
|
12
|
+
v: T;
|
|
13
13
|
}>>;
|
|
14
14
|
/**
|
|
15
15
|
* 保存数据到用户云数据库
|
|
@@ -19,7 +19,8 @@ declare function saveProjectCloudVariable<T extends string>(projectId: MongoDBId
|
|
|
19
19
|
* @returns {Promise<SaveCloudVariableRes<T>>} 保存后的值对象
|
|
20
20
|
*/
|
|
21
21
|
declare function saveUserCloudVariable<T extends Record<string, string>>(projectId: MongoDBId, studentNum: number, value: T): Promise<SaveCloudVariableRes<T>>;
|
|
22
|
-
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/community-web-cloud-database/cloud_variable/detail/v2.d.ts
|
|
23
24
|
type Res = {};
|
|
24
25
|
/**
|
|
25
26
|
* 查询云变量详情 V2
|
|
@@ -30,11 +31,12 @@ type Res = {};
|
|
|
30
31
|
* @returns {Promise<Res>} 云变量详情
|
|
31
32
|
*/
|
|
32
33
|
declare function getCloudVariableDetailV2(accessKey: string, primaryKey: string, secondaryKey: string, filterKeys: string[]): Promise<Res>;
|
|
33
|
-
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/community-web-cloud-database/index.d.ts
|
|
34
36
|
declare const communityWebCloudDatabase: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
saveProjectCloudVariable: typeof saveProjectCloudVariable;
|
|
38
|
+
saveUserCloudVariable: typeof saveUserCloudVariable;
|
|
39
|
+
getCloudVariableDetailV2: typeof getCloudVariableDetailV2;
|
|
38
40
|
};
|
|
39
|
-
|
|
40
|
-
export { saveUserCloudVariable as
|
|
41
|
+
//#endregion
|
|
42
|
+
export { saveUserCloudVariable as i, getCloudVariableDetailV2 as n, saveProjectCloudVariable as r, communityWebCloudDatabase as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { n as MongoDBId } from "./api-DK7ohLa7.js";
|
|
2
|
+
import { t as Extension } from "./extensions-D1JeVkuw.js";
|
|
3
|
+
import { n as PagesRes, t as PageArgs } from "./pages-K5jlky49.js";
|
|
4
|
+
//#region src/bfs-web/users/{oid}/extensions.d.ts
|
|
5
5
|
type Res$1 = PagesRes<Extension>;
|
|
6
6
|
/**
|
|
7
7
|
* 获取用户扩展列表分页
|
|
@@ -10,7 +10,8 @@ type Res$1 = PagesRes<Extension>;
|
|
|
10
10
|
* @returns {Promise<Res>} 扩展分页列表
|
|
11
11
|
*/
|
|
12
12
|
declare function getUserExtensions<T extends string>(userOid: MongoDBId, pageArgs_?: Partial<PageArgs<"createdAt" | "updatedAt" | T>>): Promise<Res$1>;
|
|
13
|
-
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/bfs-web/extensions/{eid}/donate.d.ts
|
|
14
15
|
type Res = boolean;
|
|
15
16
|
/**
|
|
16
17
|
* 向扩展投币
|
|
@@ -19,10 +20,11 @@ type Res = boolean;
|
|
|
19
20
|
* @returns {Promise<Res>} 是否捐赠成功
|
|
20
21
|
*/
|
|
21
22
|
declare function donateExtension(eid: string, bucks: number): Promise<Res>;
|
|
22
|
-
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/bfs-web/index.d.ts
|
|
23
25
|
declare const bfsWeb: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
donateExtension: typeof donateExtension;
|
|
27
|
+
getUserExtensions: typeof getUserExtensions;
|
|
26
28
|
};
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
+
//#endregion
|
|
30
|
+
export { donateExtension as n, getUserExtensions as r, bfsWeb as t };
|