@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.
Files changed (117) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +58 -10
  3. package/dist/account-_e06LVHE.d.cts +6 -0
  4. package/dist/account-_e06LVHE.d.ts +6 -0
  5. package/dist/{api-eD9o12yg.d.cts → api-DK7ohLa7.d.cts} +9 -18
  6. package/dist/{api-eD9o12yg.d.ts → api-DK7ohLa7.d.ts} +9 -18
  7. package/dist/bfs-web-BtWTiGvL.cjs +1 -0
  8. package/dist/bfs-web-xFSpR-s6.js +1 -0
  9. package/dist/bfs.cjs +1 -0
  10. package/dist/bfs.d.cts +2 -0
  11. package/dist/bfs.d.ts +2 -0
  12. package/dist/bfs.js +1 -0
  13. package/dist/community-web-B7SGi5-y.cjs +1 -0
  14. package/dist/community-web-Dzl0mbbh.js +1 -0
  15. package/dist/community-web-cloud-database-BkH9wp1u.cjs +1 -0
  16. package/dist/community-web-cloud-database-D9IZZIjN.js +1 -0
  17. package/dist/communityWeb.cjs +1 -0
  18. package/dist/communityWeb.d.cts +2 -0
  19. package/dist/communityWeb.d.ts +2 -0
  20. package/dist/communityWeb.js +1 -0
  21. package/dist/communityWebDB.cjs +1 -0
  22. package/dist/communityWebDB.d.cts +2 -0
  23. package/dist/communityWebDB.d.ts +2 -0
  24. package/dist/communityWebDB.js +1 -0
  25. package/dist/extensions-BhEKLZ5I.d.cts +617 -0
  26. package/dist/extensions-D1JeVkuw.d.ts +617 -0
  27. package/dist/gandi-main-Bdq3vj-l.js +1 -0
  28. package/dist/gandi-main-CVC31Jom.cjs +1 -0
  29. package/dist/gandiMain.cjs +1 -0
  30. package/dist/gandiMain.d.cts +2 -0
  31. package/dist/gandiMain.d.ts +2 -0
  32. package/dist/gandiMain.js +1 -0
  33. package/dist/index-B8SvUvok.d.ts +112 -0
  34. package/dist/{index-DHBvF_JC.d.ts → index-BVdJi7l7.d.ts} +12 -10
  35. package/dist/{index-Df4POgQq.d.ts → index-CDuyecw5.d.ts} +12 -10
  36. package/dist/index-CV03H74N.d.cts +2351 -0
  37. package/dist/index-CobjrinB.d.ts +2351 -0
  38. package/dist/index-CwWMFbgH.d.cts +112 -0
  39. package/dist/{index-BE998Kka.d.cts → index-DCDRwVC2.d.cts} +79 -74
  40. package/dist/{index-BDpiLiUN.d.ts → index-DXMyzE0v.d.ts} +79 -74
  41. package/dist/{index-DBnhnINQ.d.cts → index-IcG5LsGk.d.cts} +12 -10
  42. package/dist/{index-CTK9UFeW.d.cts → index-JnYvwWhY.d.cts} +33 -30
  43. package/dist/{index-CTK9UFeW.d.ts → index-JnYvwWhY.d.ts} +33 -30
  44. package/dist/{index-DcBdyIv0.d.cts → index-sOyHrix1.d.cts} +12 -10
  45. package/dist/index.cjs +1 -2
  46. package/dist/index.d.cts +167 -164
  47. package/dist/index.d.ts +167 -164
  48. package/dist/index.js +1 -2
  49. package/dist/op-parent-api-BC6-0rS8.js +1 -0
  50. package/dist/op-parent-api-BZbZzfJ6.cjs +1 -0
  51. package/dist/opParent.cjs +1 -0
  52. package/dist/opParent.d.cts +2 -0
  53. package/dist/opParent.d.ts +2 -0
  54. package/dist/opParent.js +1 -0
  55. package/dist/pages-K5jlky49.d.cts +42 -0
  56. package/dist/pages-K5jlky49.d.ts +42 -0
  57. package/dist/queryPages-CfywLB4S.cjs +1 -0
  58. package/dist/queryPages-Cj4eQL4Q.js +1 -0
  59. package/dist/request-CIq4GGVU.cjs +1 -0
  60. package/dist/request-CzgJtv9u.js +1 -0
  61. package/dist/session-Cw37kR-m.d.ts +43 -0
  62. package/dist/session-D8sffvmq.d.cts +43 -0
  63. package/dist/sso-C0ZWQvKo.cjs +1 -0
  64. package/dist/sso-DUoym0qZ.js +1 -0
  65. package/dist/sso.cjs +1 -0
  66. package/dist/sso.d.cts +2 -0
  67. package/dist/sso.d.ts +2 -0
  68. package/dist/sso.js +1 -0
  69. package/package.json +9 -9
  70. package/dist/account-Dk_iscrW.d.cts +0 -8
  71. package/dist/account-Dk_iscrW.d.ts +0 -8
  72. package/dist/bfs-web/index.cjs +0 -2
  73. package/dist/bfs-web/index.d.cts +0 -5
  74. package/dist/bfs-web/index.d.ts +0 -5
  75. package/dist/bfs-web/index.global.js +0 -29
  76. package/dist/bfs-web/index.js +0 -2
  77. package/dist/community-web/index.cjs +0 -2
  78. package/dist/community-web/index.d.cts +0 -6
  79. package/dist/community-web/index.d.ts +0 -6
  80. package/dist/community-web/index.global.js +0 -29
  81. package/dist/community-web/index.js +0 -2
  82. package/dist/community-web-cloud-database/index.cjs +0 -2
  83. package/dist/community-web-cloud-database/index.d.cts +0 -2
  84. package/dist/community-web-cloud-database/index.d.ts +0 -2
  85. package/dist/community-web-cloud-database/index.global.js +0 -29
  86. package/dist/community-web-cloud-database/index.js +0 -2
  87. package/dist/extensions-Bj9XMupR.d.cts +0 -662
  88. package/dist/extensions-zuu8XVBR.d.ts +0 -662
  89. package/dist/gandi-main/index.cjs +0 -2
  90. package/dist/gandi-main/index.d.cts +0 -3
  91. package/dist/gandi-main/index.d.ts +0 -3
  92. package/dist/gandi-main/index.global.js +0 -29
  93. package/dist/gandi-main/index.js +0 -2
  94. package/dist/index-BrxSkWbg.d.cts +0 -2289
  95. package/dist/index-CYQhPzUX.d.ts +0 -108
  96. package/dist/index-Ci0X9uqV.d.cts +0 -108
  97. package/dist/index-DBAUdwJo.d.ts +0 -2289
  98. package/dist/index.global.js +0 -29
  99. package/dist/op-parent-api/index.cjs +0 -2
  100. package/dist/op-parent-api/index.d.cts +0 -1
  101. package/dist/op-parent-api/index.d.ts +0 -1
  102. package/dist/op-parent-api/index.global.js +0 -29
  103. package/dist/op-parent-api/index.js +0 -2
  104. package/dist/pages-BgT6bhJd.d.cts +0 -46
  105. package/dist/pages-BgT6bhJd.d.ts +0 -46
  106. package/dist/session-Cq-kUclp.d.ts +0 -48
  107. package/dist/session-DGUV-m-G.d.cts +0 -48
  108. package/dist/setToken.cjs +0 -1
  109. package/dist/setToken.d.cts +0 -1
  110. package/dist/setToken.d.ts +0 -1
  111. package/dist/setToken.global.js +0 -29
  112. package/dist/setToken.js +0 -1
  113. package/dist/sso/index.cjs +0 -2
  114. package/dist/sso/index.d.cts +0 -4
  115. package/dist/sso/index.d.ts +0 -4
  116. package/dist/sso/index.global.js +0 -29
  117. package/dist/sso/index.js +0 -2
@@ -0,0 +1,112 @@
1
+ import { n as MongoDBId, t as CNameOssUrl } from "./api-DK7ohLa7.cjs";
2
+ import { n as PagesRes, r as SortType, t as PageArgs } from "./pages-K5jlky49.cjs";
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,47 +1,63 @@
1
- import { M as MongoDBId } from './api-eD9o12yg.cjs';
2
- import { L as LoginSession } from './session-DGUV-m-G.cjs';
3
-
4
- type LoginScene = "loginbyPhone";
5
- type LoginRuleCode = "ccw_sms";
6
- type Res$2<Extra> = LoginSession<Extra>;
1
+ import { n as MongoDBId } from "./api-DK7ohLa7.cjs";
2
+ import { t as LoginSession } from "./session-D8sffvmq.cjs";
3
+ //#region src/sso/web/auth/login-by-password.d.ts
4
+ type Res$2<Extra> = LoginSession<Extra, null>;
7
5
  type Extra$1 = {
8
- browser: string;
9
- device: string;
10
- ip: string;
11
- loginParentOid: MongoDBId;
12
- loginType: "BY_PHONE_LOGIN_OR_REGISTER";
6
+ browser: string;
7
+ device: string;
8
+ ip: string;
9
+ loginParentOid: MongoDBId;
10
+ loginType: "BY_PASSWORD";
11
+ orgId: "";
13
12
  };
13
+ /**
14
+ * @prop {string} device 设备名(win11)
15
+ * @prop {string} browser 浏览器名(chrome)
16
+ */
14
17
  interface ReqExtra$1 {
15
- browser: string;
16
- device: string;
18
+ browser: string;
19
+ device: string;
17
20
  }
18
21
  /**
19
- * 通过手机号+短信验证码登录(V3)
20
- * @param {string} phone 手机号,如 "12345671145"
21
- * @param {string} code 收到的短信验证码
22
- * @param {ReqExtra} reqExtra 设备和浏览器信息
23
- * @param {string} countryCode 国家代码,默认 "86"
24
- * @param {LoginRuleCode} ruleCode 短信规则编码,默认 "ccw_sms"
25
- * @param {LoginScene} scene 登录场景,默认 "loginbyPhone"
26
- * @returns {Promise<Res<Extra>>} session 信息
22
+ * 通过密码登录
23
+ * @param {string} loginKey 用户名
24
+ * @param {string} password 密码
25
+ * @param {ReqExtra} reqExtra 额外信息
26
+ * @returns {Res<Extra>}
27
+ */
28
+ declare function loginByPassword(loginKey: string, password: string, reqExtra?: ReqExtra$1): Promise<Res$2<Extra$1>>;
29
+ //#endregion
30
+ //#region src/sso/web/auth/logout.d.ts
31
+ /**
32
+ * 退出
33
+ * @returns {Promise<null>}
27
34
  */
28
- declare function loginByPhone(phone: string, code: string, reqExtra?: ReqExtra$1, countryCode?: string, ruleCode?: LoginRuleCode, scene?: LoginScene): Promise<Res$2<Extra$1>>;
29
-
35
+ declare function logout(): Promise<null>;
36
+ //#endregion
37
+ //#region src/sso/web/auth/logout_by_session.d.ts
38
+ /**
39
+ * 根据sessionId退出登陆设备
40
+ * @param {number} sessionId
41
+ * @returns {Promise<boolean>} 是否成功
42
+ */
43
+ declare function logoutBySession(sessionId: number): Promise<boolean>;
44
+ //#endregion
45
+ //#region src/sso/web/auth/assistant/captcha/v2/create.d.ts
30
46
  type SmsScene = "loginbyPhone";
31
47
  type SmsRuleCode = "ccw_sms";
32
48
  type CaptchaPayload = {
33
- data: {
34
- x: number;
35
- y: number;
36
- };
37
- token: string;
49
+ data: {
50
+ x: number;
51
+ y: number;
52
+ };
53
+ token: string;
38
54
  };
39
55
  type Res$1 = {
40
- batchId: string | null;
41
- /**
42
- * sendResult=1 表示成功
43
- */
44
- sendResult: 1 | 2;
56
+ batchId: string | null;
57
+ /**
58
+ * sendResult=1 表示成功
59
+ */
60
+ sendResult: 1 | 2;
45
61
  };
46
62
  /**
47
63
  * 发送短信验证码
@@ -53,52 +69,41 @@ type Res$1 = {
53
69
  * @returns {Promise<Res>} 发送结果:batchId 为短信批次ID,sendResult=1 表示成功
54
70
  */
55
71
  declare function createSmsCaptcha(recipient: string, scene?: SmsScene, countryCode?: string, ruleCode?: SmsRuleCode, captcha?: CaptchaPayload): Promise<Res$1>;
56
-
57
- /**
58
- * 根据sessionId退出登陆设备
59
- * @param {number} sessionId
60
- * @returns {Promise<boolean>} 是否成功
61
- */
62
- declare function logoutBySession(sessionId: number): Promise<boolean>;
63
-
64
- /**
65
- * 退出
66
- * @returns {Promise<null>}
67
- */
68
- declare function logout(): Promise<null>;
69
-
70
- type Res<Extra> = LoginSession<Extra, null>;
72
+ //#endregion
73
+ //#region src/sso/web/auth/v3/login/by-phone.d.ts
74
+ type LoginScene = "loginbyPhone";
75
+ type LoginRuleCode = "ccw_sms";
76
+ type Res<Extra> = LoginSession<Extra>;
71
77
  type Extra = {
72
- browser: string;
73
- device: string;
74
- ip: string;
75
- loginParentOid: MongoDBId;
76
- loginType: "BY_PASSWORD";
77
- orgId: "";
78
+ browser: string;
79
+ device: string;
80
+ ip: string;
81
+ loginParentOid: MongoDBId;
82
+ loginType: "BY_PHONE_LOGIN_OR_REGISTER";
78
83
  };
79
- /**
80
- * @prop {string} device 设备名(win11)
81
- * @prop {string} browser 浏览器名(chrome)
82
- */
83
84
  interface ReqExtra {
84
- browser: string;
85
- device: string;
85
+ browser: string;
86
+ device: string;
86
87
  }
87
88
  /**
88
- * 通过密码登录
89
- * @param {string} loginKey 用户名
90
- * @param {string} password 密码
91
- * @param {ReqExtra} reqExtra 额外信息
92
- * @returns {Res<Extra>}
89
+ * 通过手机号+短信验证码登录(V3)
90
+ * @param {string} phone 手机号,如 "12345671145"
91
+ * @param {string} code 收到的短信验证码
92
+ * @param {ReqExtra} reqExtra 设备和浏览器信息
93
+ * @param {string} countryCode 国家代码,默认 "86"
94
+ * @param {LoginRuleCode} ruleCode 短信规则编码,默认 "ccw_sms"
95
+ * @param {LoginScene} scene 登录场景,默认 "loginbyPhone"
96
+ * @returns {Promise<Res<Extra>>} session 信息
93
97
  */
94
- declare function loginByPassword(loginKey: string, password: string, reqExtra?: ReqExtra): Promise<Res<Extra>>;
95
-
98
+ declare function loginByPhone(phone: string, code: string, reqExtra?: ReqExtra, countryCode?: string, ruleCode?: LoginRuleCode, scene?: LoginScene): Promise<Res<Extra>>;
99
+ //#endregion
100
+ //#region src/sso/index.d.ts
96
101
  declare const sso: {
97
- loginByPassword: typeof loginByPassword;
98
- logout: typeof logout;
99
- logoutBySession: typeof logoutBySession;
100
- createSmsCaptcha: typeof createSmsCaptcha;
101
- loginByPhone: typeof loginByPhone;
102
+ loginByPassword: typeof loginByPassword;
103
+ logout: typeof logout;
104
+ logoutBySession: typeof logoutBySession;
105
+ createSmsCaptcha: typeof createSmsCaptcha;
106
+ loginByPhone: typeof loginByPhone;
102
107
  };
103
-
104
- export { logout as a, logoutBySession as b, createSmsCaptcha as c, loginByPhone as d, loginByPassword as l, sso as s };
108
+ //#endregion
109
+ export { logout as a, logoutBySession as i, loginByPhone as n, loginByPassword as o, createSmsCaptcha as r, sso as t };
@@ -1,47 +1,63 @@
1
- import { M as MongoDBId } from './api-eD9o12yg.js';
2
- import { L as LoginSession } from './session-Cq-kUclp.js';
3
-
4
- type LoginScene = "loginbyPhone";
5
- type LoginRuleCode = "ccw_sms";
6
- type Res$2<Extra> = LoginSession<Extra>;
1
+ import { n as MongoDBId } from "./api-DK7ohLa7.js";
2
+ import { t as LoginSession } from "./session-Cw37kR-m.js";
3
+ //#region src/sso/web/auth/login-by-password.d.ts
4
+ type Res$2<Extra> = LoginSession<Extra, null>;
7
5
  type Extra$1 = {
8
- browser: string;
9
- device: string;
10
- ip: string;
11
- loginParentOid: MongoDBId;
12
- loginType: "BY_PHONE_LOGIN_OR_REGISTER";
6
+ browser: string;
7
+ device: string;
8
+ ip: string;
9
+ loginParentOid: MongoDBId;
10
+ loginType: "BY_PASSWORD";
11
+ orgId: "";
13
12
  };
13
+ /**
14
+ * @prop {string} device 设备名(win11)
15
+ * @prop {string} browser 浏览器名(chrome)
16
+ */
14
17
  interface ReqExtra$1 {
15
- browser: string;
16
- device: string;
18
+ browser: string;
19
+ device: string;
17
20
  }
18
21
  /**
19
- * 通过手机号+短信验证码登录(V3)
20
- * @param {string} phone 手机号,如 "12345671145"
21
- * @param {string} code 收到的短信验证码
22
- * @param {ReqExtra} reqExtra 设备和浏览器信息
23
- * @param {string} countryCode 国家代码,默认 "86"
24
- * @param {LoginRuleCode} ruleCode 短信规则编码,默认 "ccw_sms"
25
- * @param {LoginScene} scene 登录场景,默认 "loginbyPhone"
26
- * @returns {Promise<Res<Extra>>} session 信息
22
+ * 通过密码登录
23
+ * @param {string} loginKey 用户名
24
+ * @param {string} password 密码
25
+ * @param {ReqExtra} reqExtra 额外信息
26
+ * @returns {Res<Extra>}
27
+ */
28
+ declare function loginByPassword(loginKey: string, password: string, reqExtra?: ReqExtra$1): Promise<Res$2<Extra$1>>;
29
+ //#endregion
30
+ //#region src/sso/web/auth/logout.d.ts
31
+ /**
32
+ * 退出
33
+ * @returns {Promise<null>}
27
34
  */
28
- declare function loginByPhone(phone: string, code: string, reqExtra?: ReqExtra$1, countryCode?: string, ruleCode?: LoginRuleCode, scene?: LoginScene): Promise<Res$2<Extra$1>>;
29
-
35
+ declare function logout(): Promise<null>;
36
+ //#endregion
37
+ //#region src/sso/web/auth/logout_by_session.d.ts
38
+ /**
39
+ * 根据sessionId退出登陆设备
40
+ * @param {number} sessionId
41
+ * @returns {Promise<boolean>} 是否成功
42
+ */
43
+ declare function logoutBySession(sessionId: number): Promise<boolean>;
44
+ //#endregion
45
+ //#region src/sso/web/auth/assistant/captcha/v2/create.d.ts
30
46
  type SmsScene = "loginbyPhone";
31
47
  type SmsRuleCode = "ccw_sms";
32
48
  type CaptchaPayload = {
33
- data: {
34
- x: number;
35
- y: number;
36
- };
37
- token: string;
49
+ data: {
50
+ x: number;
51
+ y: number;
52
+ };
53
+ token: string;
38
54
  };
39
55
  type Res$1 = {
40
- batchId: string | null;
41
- /**
42
- * sendResult=1 表示成功
43
- */
44
- sendResult: 1 | 2;
56
+ batchId: string | null;
57
+ /**
58
+ * sendResult=1 表示成功
59
+ */
60
+ sendResult: 1 | 2;
45
61
  };
46
62
  /**
47
63
  * 发送短信验证码
@@ -53,52 +69,41 @@ type Res$1 = {
53
69
  * @returns {Promise<Res>} 发送结果:batchId 为短信批次ID,sendResult=1 表示成功
54
70
  */
55
71
  declare function createSmsCaptcha(recipient: string, scene?: SmsScene, countryCode?: string, ruleCode?: SmsRuleCode, captcha?: CaptchaPayload): Promise<Res$1>;
56
-
57
- /**
58
- * 根据sessionId退出登陆设备
59
- * @param {number} sessionId
60
- * @returns {Promise<boolean>} 是否成功
61
- */
62
- declare function logoutBySession(sessionId: number): Promise<boolean>;
63
-
64
- /**
65
- * 退出
66
- * @returns {Promise<null>}
67
- */
68
- declare function logout(): Promise<null>;
69
-
70
- type Res<Extra> = LoginSession<Extra, null>;
72
+ //#endregion
73
+ //#region src/sso/web/auth/v3/login/by-phone.d.ts
74
+ type LoginScene = "loginbyPhone";
75
+ type LoginRuleCode = "ccw_sms";
76
+ type Res<Extra> = LoginSession<Extra>;
71
77
  type Extra = {
72
- browser: string;
73
- device: string;
74
- ip: string;
75
- loginParentOid: MongoDBId;
76
- loginType: "BY_PASSWORD";
77
- orgId: "";
78
+ browser: string;
79
+ device: string;
80
+ ip: string;
81
+ loginParentOid: MongoDBId;
82
+ loginType: "BY_PHONE_LOGIN_OR_REGISTER";
78
83
  };
79
- /**
80
- * @prop {string} device 设备名(win11)
81
- * @prop {string} browser 浏览器名(chrome)
82
- */
83
84
  interface ReqExtra {
84
- browser: string;
85
- device: string;
85
+ browser: string;
86
+ device: string;
86
87
  }
87
88
  /**
88
- * 通过密码登录
89
- * @param {string} loginKey 用户名
90
- * @param {string} password 密码
91
- * @param {ReqExtra} reqExtra 额外信息
92
- * @returns {Res<Extra>}
89
+ * 通过手机号+短信验证码登录(V3)
90
+ * @param {string} phone 手机号,如 "12345671145"
91
+ * @param {string} code 收到的短信验证码
92
+ * @param {ReqExtra} reqExtra 设备和浏览器信息
93
+ * @param {string} countryCode 国家代码,默认 "86"
94
+ * @param {LoginRuleCode} ruleCode 短信规则编码,默认 "ccw_sms"
95
+ * @param {LoginScene} scene 登录场景,默认 "loginbyPhone"
96
+ * @returns {Promise<Res<Extra>>} session 信息
93
97
  */
94
- declare function loginByPassword(loginKey: string, password: string, reqExtra?: ReqExtra): Promise<Res<Extra>>;
95
-
98
+ declare function loginByPhone(phone: string, code: string, reqExtra?: ReqExtra, countryCode?: string, ruleCode?: LoginRuleCode, scene?: LoginScene): Promise<Res<Extra>>;
99
+ //#endregion
100
+ //#region src/sso/index.d.ts
96
101
  declare const sso: {
97
- loginByPassword: typeof loginByPassword;
98
- logout: typeof logout;
99
- logoutBySession: typeof logoutBySession;
100
- createSmsCaptcha: typeof createSmsCaptcha;
101
- loginByPhone: typeof loginByPhone;
102
+ loginByPassword: typeof loginByPassword;
103
+ logout: typeof logout;
104
+ logoutBySession: typeof logoutBySession;
105
+ createSmsCaptcha: typeof createSmsCaptcha;
106
+ loginByPhone: typeof loginByPhone;
102
107
  };
103
-
104
- export { logout as a, logoutBySession as b, createSmsCaptcha as c, loginByPhone as d, loginByPassword as l, sso as s };
108
+ //#endregion
109
+ export { logout as a, logoutBySession as i, loginByPhone as n, loginByPassword as o, createSmsCaptcha as r, sso as t };
@@ -1,7 +1,7 @@
1
- import { M as MongoDBId } from './api-eD9o12yg.cjs';
2
- import { E as Extension } from './extensions-Bj9XMupR.cjs';
3
- import { P as PageArgs, a as PagesRes } from './pages-BgT6bhJd.cjs';
4
-
1
+ import { n as MongoDBId } from "./api-DK7ohLa7.cjs";
2
+ import { t as Extension } from "./extensions-BhEKLZ5I.cjs";
3
+ import { n as PagesRes, t as PageArgs } from "./pages-K5jlky49.cjs";
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
- donateExtension: typeof donateExtension;
25
- getUserExtensions: typeof getUserExtensions;
26
+ donateExtension: typeof donateExtension;
27
+ getUserExtensions: typeof getUserExtensions;
26
28
  };
27
-
28
- export { bfsWeb as b, donateExtension as d, getUserExtensions as g };
29
+ //#endregion
30
+ export { donateExtension as n, getUserExtensions as r, bfsWeb as t };
@@ -1,7 +1,30 @@
1
+ //#region src/op-parent-api/captcha/create.d.ts
2
+ type CaptchaType = "BLOCK_PUZZLE";
1
3
  type Res$1 = {
2
- captchaExpired: boolean;
3
- errorMsg: string | null;
4
- success: boolean;
4
+ data: {
5
+ /**
6
+ * data url
7
+ */
8
+ bgImg: string;
9
+ /**
10
+ * data url
11
+ */
12
+ jigsawImg: string;
13
+ };
14
+ token: string;
15
+ };
16
+ /**
17
+ * 创建图形验证码(拼图滑块)
18
+ * @param {CaptchaType} type 验证码类型,默认 BLOCK_PUZZLE(滑块拼图)
19
+ * @returns {Promise<Res>} 验证码信息:bgImg为背景图base64 data url,jigsawImg为拼图块base64 data url,token用于后续校验
20
+ */
21
+ declare function createCaptcha(type?: CaptchaType): Promise<Res$1>;
22
+ //#endregion
23
+ //#region src/op-parent-api/captcha/check.d.ts
24
+ type Res = {
25
+ captchaExpired: boolean;
26
+ errorMsg: string | null;
27
+ success: boolean;
5
28
  };
6
29
  /**
7
30
  * 校验图形验证码(拼图滑块坐标)
@@ -10,32 +33,12 @@ type Res$1 = {
10
33
  * @param {number} y 拼图滑块目标位置的 y 坐标
11
34
  * @returns {Promise<Res>} 校验结果
12
35
  */
13
- declare function checkCaptcha(token: string, x: number, y?: number): Promise<Res$1>;
14
-
15
- type CaptchaType = "BLOCK_PUZZLE";
16
- type Res = {
17
- data: {
18
- /**
19
- * data url
20
- */
21
- bgImg: string;
22
- /**
23
- * data url
24
- */
25
- jigsawImg: string;
26
- };
27
- token: string;
28
- };
29
- /**
30
- * 创建图形验证码(拼图滑块)
31
- * @param {CaptchaType} type 验证码类型,默认 BLOCK_PUZZLE(滑块拼图)
32
- * @returns {Promise<Res>} 验证码信息:bgImg为背景图base64 data url,jigsawImg为拼图块base64 data url,token用于后续校验
33
- */
34
- declare function createCaptcha(type?: CaptchaType): Promise<Res>;
35
-
36
+ declare function checkCaptcha(token: string, x: number, y?: number): Promise<Res>;
37
+ //#endregion
38
+ //#region src/op-parent-api/index.d.ts
36
39
  declare const opParentApi: {
37
- createCaptcha: typeof createCaptcha;
38
- checkCaptcha: typeof checkCaptcha;
40
+ createCaptcha: typeof createCaptcha;
41
+ checkCaptcha: typeof checkCaptcha;
39
42
  };
40
-
41
- export { checkCaptcha as a, createCaptcha as c, opParentApi as o };
43
+ //#endregion
44
+ export { checkCaptcha as n, createCaptcha as r, opParentApi as t };
@@ -1,7 +1,30 @@
1
+ //#region src/op-parent-api/captcha/create.d.ts
2
+ type CaptchaType = "BLOCK_PUZZLE";
1
3
  type Res$1 = {
2
- captchaExpired: boolean;
3
- errorMsg: string | null;
4
- success: boolean;
4
+ data: {
5
+ /**
6
+ * data url
7
+ */
8
+ bgImg: string;
9
+ /**
10
+ * data url
11
+ */
12
+ jigsawImg: string;
13
+ };
14
+ token: string;
15
+ };
16
+ /**
17
+ * 创建图形验证码(拼图滑块)
18
+ * @param {CaptchaType} type 验证码类型,默认 BLOCK_PUZZLE(滑块拼图)
19
+ * @returns {Promise<Res>} 验证码信息:bgImg为背景图base64 data url,jigsawImg为拼图块base64 data url,token用于后续校验
20
+ */
21
+ declare function createCaptcha(type?: CaptchaType): Promise<Res$1>;
22
+ //#endregion
23
+ //#region src/op-parent-api/captcha/check.d.ts
24
+ type Res = {
25
+ captchaExpired: boolean;
26
+ errorMsg: string | null;
27
+ success: boolean;
5
28
  };
6
29
  /**
7
30
  * 校验图形验证码(拼图滑块坐标)
@@ -10,32 +33,12 @@ type Res$1 = {
10
33
  * @param {number} y 拼图滑块目标位置的 y 坐标
11
34
  * @returns {Promise<Res>} 校验结果
12
35
  */
13
- declare function checkCaptcha(token: string, x: number, y?: number): Promise<Res$1>;
14
-
15
- type CaptchaType = "BLOCK_PUZZLE";
16
- type Res = {
17
- data: {
18
- /**
19
- * data url
20
- */
21
- bgImg: string;
22
- /**
23
- * data url
24
- */
25
- jigsawImg: string;
26
- };
27
- token: string;
28
- };
29
- /**
30
- * 创建图形验证码(拼图滑块)
31
- * @param {CaptchaType} type 验证码类型,默认 BLOCK_PUZZLE(滑块拼图)
32
- * @returns {Promise<Res>} 验证码信息:bgImg为背景图base64 data url,jigsawImg为拼图块base64 data url,token用于后续校验
33
- */
34
- declare function createCaptcha(type?: CaptchaType): Promise<Res>;
35
-
36
+ declare function checkCaptcha(token: string, x: number, y?: number): Promise<Res>;
37
+ //#endregion
38
+ //#region src/op-parent-api/index.d.ts
36
39
  declare const opParentApi: {
37
- createCaptcha: typeof createCaptcha;
38
- checkCaptcha: typeof checkCaptcha;
40
+ createCaptcha: typeof createCaptcha;
41
+ checkCaptcha: typeof checkCaptcha;
39
42
  };
40
-
41
- export { checkCaptcha as a, createCaptcha as c, opParentApi as o };
43
+ //#endregion
44
+ export { checkCaptcha as n, createCaptcha as r, opParentApi as t };