@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
package/dist/index-CYQhPzUX.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { P as PageArgs, a as PagesRes, S as SortType } from './pages-BgT6bhJd.js';
|
|
2
|
-
import { M as MongoDBId, C as CNameOssUrl } from './api-eD9o12yg.js';
|
|
3
|
-
|
|
4
|
-
type Res$2 = number;
|
|
5
|
-
/**
|
|
6
|
-
* 获取服务端当前时间戳
|
|
7
|
-
* @returns {Promise<Res>} 当前时间戳(毫秒)
|
|
8
|
-
*/
|
|
9
|
-
declare function getCurrentTimestamp(): Promise<Res$2>;
|
|
10
|
-
|
|
11
|
-
type BulletinItem = {
|
|
12
|
-
createdAt: number;
|
|
13
|
-
id: number;
|
|
14
|
-
publishedAt: number;
|
|
15
|
-
status: "PUBLISHED";
|
|
16
|
-
title: string;
|
|
17
|
-
updatedAt: number;
|
|
18
|
-
};
|
|
19
|
-
type SortField = "publishedAt";
|
|
20
|
-
type Res$1 = PagesRes<BulletinItem>;
|
|
21
|
-
/**
|
|
22
|
-
* 获取公告分页列表
|
|
23
|
-
* @param {'PUBLISHED' | S} status 公告状态过滤
|
|
24
|
-
* @param {Partial<PageArgs<SortField | T>>} pageArgs_ 分页参数
|
|
25
|
-
* @returns {Promise<Res>} 公告分页列表
|
|
26
|
-
*/
|
|
27
|
-
declare function getBulletinsPage<T extends string, S extends string>(status?: "PUBLISHED" | S, pageArgs_?: Partial<PageArgs<SortField | T>>): Promise<Res$1>;
|
|
28
|
-
|
|
29
|
-
type BulletinDetail = {
|
|
30
|
-
createdAt: number;
|
|
31
|
-
id: number;
|
|
32
|
-
publishedAt: number;
|
|
33
|
-
status: "PUBLISHED";
|
|
34
|
-
title: string;
|
|
35
|
-
updatedAt: number;
|
|
36
|
-
};
|
|
37
|
-
type Res = BulletinDetail;
|
|
38
|
-
/**
|
|
39
|
-
* 获取公告详情
|
|
40
|
-
* @param {number} id 公告id
|
|
41
|
-
* @returns {Promise<Res>} 公告详情
|
|
42
|
-
*/
|
|
43
|
-
declare function getBulletinDetail(id: number): Promise<Res>;
|
|
44
|
-
|
|
45
|
-
type SubmitRes = boolean;
|
|
46
|
-
type LeaderboardUser = {
|
|
47
|
-
avatar: null | CNameOssUrl;
|
|
48
|
-
id: MongoDBId;
|
|
49
|
-
locked: null | boolean;
|
|
50
|
-
nickname: null | string;
|
|
51
|
-
};
|
|
52
|
-
type LeaderboardRecord = {
|
|
53
|
-
createdAt: number;
|
|
54
|
-
ext: string;
|
|
55
|
-
leaderboardOid: MongoDBId;
|
|
56
|
-
oid: MongoDBId;
|
|
57
|
-
ranking: number;
|
|
58
|
-
score: number;
|
|
59
|
-
updatedAt: number;
|
|
60
|
-
user: LeaderboardUser;
|
|
61
|
-
userId: MongoDBId;
|
|
62
|
-
};
|
|
63
|
-
type ScoreFormat = "DECIMAL_WITH_SEPARATOR" | string;
|
|
64
|
-
type ScoreStorageRule = "BEST" | string;
|
|
65
|
-
type StatsCycle = "ALL_DAYS" | string;
|
|
66
|
-
type LeaderboardRecordsRes = {
|
|
67
|
-
coverLink: null | CNameOssUrl;
|
|
68
|
-
createdAt: number;
|
|
69
|
-
creationId: MongoDBId;
|
|
70
|
-
curUserLeaderboardRecord: null | LeaderboardRecord;
|
|
71
|
-
displayLines: number;
|
|
72
|
-
leaderboardRecordTotalNum: number;
|
|
73
|
-
leaderboardRecords: LeaderboardRecord[];
|
|
74
|
-
oid: MongoDBId;
|
|
75
|
-
scoreFormat: ScoreFormat;
|
|
76
|
-
scoreStorageRule: ScoreStorageRule;
|
|
77
|
-
scoreUnit: string;
|
|
78
|
-
showPersonalRanking: boolean;
|
|
79
|
-
sortType: SortType;
|
|
80
|
-
statsCycle: StatsCycle;
|
|
81
|
-
title: string;
|
|
82
|
-
updatedAt: number;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* 向作品排行榜提交一条分数记录
|
|
86
|
-
* @param {MongoDBId} leaderboardOid 排行榜id
|
|
87
|
-
* @param {number} score 分数
|
|
88
|
-
* @param {MongoDBId} userOid 用户id
|
|
89
|
-
* @param {string} ext 扩展信息(可选)
|
|
90
|
-
* @returns {Promise<SubmitRes>} 是否提交成功
|
|
91
|
-
*/
|
|
92
|
-
declare function submitLeaderboardRecord(leaderboardOid: MongoDBId, score: number, userOid: MongoDBId, ext?: string): Promise<SubmitRes>;
|
|
93
|
-
/**
|
|
94
|
-
* 获取作品排行榜记录列表
|
|
95
|
-
* @param {MongoDBId} leaderboardOid 排行榜id
|
|
96
|
-
* @returns {Promise<LeaderboardRecordsRes>} 排行榜记录列表
|
|
97
|
-
*/
|
|
98
|
-
declare function getLeaderboardRecords(leaderboardOid: MongoDBId): Promise<LeaderboardRecordsRes>;
|
|
99
|
-
|
|
100
|
-
declare const gandiMain: {
|
|
101
|
-
getCurrentTimestamp: typeof getCurrentTimestamp;
|
|
102
|
-
getBulletinsPage: typeof getBulletinsPage;
|
|
103
|
-
getBulletinDetail: typeof getBulletinDetail;
|
|
104
|
-
submitLeaderboardRecord: typeof submitLeaderboardRecord;
|
|
105
|
-
getLeaderboardRecords: typeof getLeaderboardRecords;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { getBulletinsPage as a, getBulletinDetail as b, getLeaderboardRecords as c, gandiMain as d, getCurrentTimestamp as g, submitLeaderboardRecord as s };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { P as PageArgs, a as PagesRes, S as SortType } from './pages-BgT6bhJd.cjs';
|
|
2
|
-
import { M as MongoDBId, C as CNameOssUrl } from './api-eD9o12yg.cjs';
|
|
3
|
-
|
|
4
|
-
type Res$2 = number;
|
|
5
|
-
/**
|
|
6
|
-
* 获取服务端当前时间戳
|
|
7
|
-
* @returns {Promise<Res>} 当前时间戳(毫秒)
|
|
8
|
-
*/
|
|
9
|
-
declare function getCurrentTimestamp(): Promise<Res$2>;
|
|
10
|
-
|
|
11
|
-
type BulletinItem = {
|
|
12
|
-
createdAt: number;
|
|
13
|
-
id: number;
|
|
14
|
-
publishedAt: number;
|
|
15
|
-
status: "PUBLISHED";
|
|
16
|
-
title: string;
|
|
17
|
-
updatedAt: number;
|
|
18
|
-
};
|
|
19
|
-
type SortField = "publishedAt";
|
|
20
|
-
type Res$1 = PagesRes<BulletinItem>;
|
|
21
|
-
/**
|
|
22
|
-
* 获取公告分页列表
|
|
23
|
-
* @param {'PUBLISHED' | S} status 公告状态过滤
|
|
24
|
-
* @param {Partial<PageArgs<SortField | T>>} pageArgs_ 分页参数
|
|
25
|
-
* @returns {Promise<Res>} 公告分页列表
|
|
26
|
-
*/
|
|
27
|
-
declare function getBulletinsPage<T extends string, S extends string>(status?: "PUBLISHED" | S, pageArgs_?: Partial<PageArgs<SortField | T>>): Promise<Res$1>;
|
|
28
|
-
|
|
29
|
-
type BulletinDetail = {
|
|
30
|
-
createdAt: number;
|
|
31
|
-
id: number;
|
|
32
|
-
publishedAt: number;
|
|
33
|
-
status: "PUBLISHED";
|
|
34
|
-
title: string;
|
|
35
|
-
updatedAt: number;
|
|
36
|
-
};
|
|
37
|
-
type Res = BulletinDetail;
|
|
38
|
-
/**
|
|
39
|
-
* 获取公告详情
|
|
40
|
-
* @param {number} id 公告id
|
|
41
|
-
* @returns {Promise<Res>} 公告详情
|
|
42
|
-
*/
|
|
43
|
-
declare function getBulletinDetail(id: number): Promise<Res>;
|
|
44
|
-
|
|
45
|
-
type SubmitRes = boolean;
|
|
46
|
-
type LeaderboardUser = {
|
|
47
|
-
avatar: null | CNameOssUrl;
|
|
48
|
-
id: MongoDBId;
|
|
49
|
-
locked: null | boolean;
|
|
50
|
-
nickname: null | string;
|
|
51
|
-
};
|
|
52
|
-
type LeaderboardRecord = {
|
|
53
|
-
createdAt: number;
|
|
54
|
-
ext: string;
|
|
55
|
-
leaderboardOid: MongoDBId;
|
|
56
|
-
oid: MongoDBId;
|
|
57
|
-
ranking: number;
|
|
58
|
-
score: number;
|
|
59
|
-
updatedAt: number;
|
|
60
|
-
user: LeaderboardUser;
|
|
61
|
-
userId: MongoDBId;
|
|
62
|
-
};
|
|
63
|
-
type ScoreFormat = "DECIMAL_WITH_SEPARATOR" | string;
|
|
64
|
-
type ScoreStorageRule = "BEST" | string;
|
|
65
|
-
type StatsCycle = "ALL_DAYS" | string;
|
|
66
|
-
type LeaderboardRecordsRes = {
|
|
67
|
-
coverLink: null | CNameOssUrl;
|
|
68
|
-
createdAt: number;
|
|
69
|
-
creationId: MongoDBId;
|
|
70
|
-
curUserLeaderboardRecord: null | LeaderboardRecord;
|
|
71
|
-
displayLines: number;
|
|
72
|
-
leaderboardRecordTotalNum: number;
|
|
73
|
-
leaderboardRecords: LeaderboardRecord[];
|
|
74
|
-
oid: MongoDBId;
|
|
75
|
-
scoreFormat: ScoreFormat;
|
|
76
|
-
scoreStorageRule: ScoreStorageRule;
|
|
77
|
-
scoreUnit: string;
|
|
78
|
-
showPersonalRanking: boolean;
|
|
79
|
-
sortType: SortType;
|
|
80
|
-
statsCycle: StatsCycle;
|
|
81
|
-
title: string;
|
|
82
|
-
updatedAt: number;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* 向作品排行榜提交一条分数记录
|
|
86
|
-
* @param {MongoDBId} leaderboardOid 排行榜id
|
|
87
|
-
* @param {number} score 分数
|
|
88
|
-
* @param {MongoDBId} userOid 用户id
|
|
89
|
-
* @param {string} ext 扩展信息(可选)
|
|
90
|
-
* @returns {Promise<SubmitRes>} 是否提交成功
|
|
91
|
-
*/
|
|
92
|
-
declare function submitLeaderboardRecord(leaderboardOid: MongoDBId, score: number, userOid: MongoDBId, ext?: string): Promise<SubmitRes>;
|
|
93
|
-
/**
|
|
94
|
-
* 获取作品排行榜记录列表
|
|
95
|
-
* @param {MongoDBId} leaderboardOid 排行榜id
|
|
96
|
-
* @returns {Promise<LeaderboardRecordsRes>} 排行榜记录列表
|
|
97
|
-
*/
|
|
98
|
-
declare function getLeaderboardRecords(leaderboardOid: MongoDBId): Promise<LeaderboardRecordsRes>;
|
|
99
|
-
|
|
100
|
-
declare const gandiMain: {
|
|
101
|
-
getCurrentTimestamp: typeof getCurrentTimestamp;
|
|
102
|
-
getBulletinsPage: typeof getBulletinsPage;
|
|
103
|
-
getBulletinDetail: typeof getBulletinDetail;
|
|
104
|
-
submitLeaderboardRecord: typeof submitLeaderboardRecord;
|
|
105
|
-
getLeaderboardRecords: typeof getLeaderboardRecords;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { getBulletinsPage as a, getBulletinDetail as b, getLeaderboardRecords as c, gandiMain as d, getCurrentTimestamp as g, submitLeaderboardRecord as s };
|