karin-plugin-mys-core 1.0.1 → 1.0.3

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 (168) hide show
  1. package/LICENSE +674 -0
  2. package/lib/apps/MiHoYoLogin.d.ts +3 -1
  3. package/lib/apps/MiHoYoLogin.js +177 -109
  4. package/lib/apps/MysDevice.d.ts +2 -2
  5. package/lib/apps/MysDevice.js +65 -23
  6. package/lib/apps/UIDManage.d.ts +10 -0
  7. package/lib/apps/UIDManage.js +52 -0
  8. package/lib/array-DuqoS2wx.d.ts +62 -0
  9. package/lib/chunk-2DHTKQ34.js +0 -0
  10. package/lib/chunk-3BIQN6QA.js +27 -0
  11. package/lib/chunk-5NA7ZPDS.js +54 -0
  12. package/lib/chunk-6PIXUPZ6.js +82 -0
  13. package/lib/chunk-7KEG6SDX.js +0 -0
  14. package/lib/chunk-7SZX3RBZ.js +0 -0
  15. package/lib/chunk-7VAWV6ZE.js +0 -0
  16. package/lib/chunk-7WESXE4X.js +29 -0
  17. package/lib/chunk-ARLTXJFJ.js +0 -0
  18. package/lib/chunk-CFS2WFOO.js +0 -0
  19. package/lib/chunk-COKAJ7V6.js +31 -0
  20. package/lib/chunk-EMAUATE3.js +217 -0
  21. package/lib/chunk-FBWSEBAW.js +0 -0
  22. package/lib/chunk-FOAQZIZ2.js +0 -0
  23. package/lib/chunk-G547WVGV.js +73 -0
  24. package/lib/chunk-G5W5WAY5.js +64 -0
  25. package/lib/chunk-HNODD2IL.js +179 -0
  26. package/lib/chunk-HVYNK5BN.js +45 -0
  27. package/lib/chunk-I7XZONDN.js +13 -0
  28. package/lib/chunk-IVZICDGW.js +19 -0
  29. package/lib/chunk-JKZ5NRPX.js +130 -0
  30. package/lib/chunk-JRH4JC43.js +0 -0
  31. package/lib/chunk-JVJQKRJ4.js +89 -0
  32. package/lib/chunk-K5U2O3HH.js +0 -0
  33. package/lib/chunk-KN5SHBVI.js +30 -0
  34. package/lib/chunk-LG34FPBI.js +50 -0
  35. package/lib/chunk-LJSDSOY6.js +0 -0
  36. package/lib/chunk-LYTNREAI.js +0 -0
  37. package/lib/chunk-MWYDWDR4.js +0 -0
  38. package/lib/chunk-RWBRS7SA.js +510 -0
  39. package/lib/chunk-SEWEEPJN.js +0 -0
  40. package/lib/{chunk-JML6VYXN.js → chunk-SHLPPEAY.js} +13 -17
  41. package/lib/chunk-SHW6FHIB.js +10 -0
  42. package/lib/chunk-UVMX6WUC.js +38 -0
  43. package/lib/chunk-W4DBT7AD.js +0 -0
  44. package/lib/chunk-XQWTJIT4.js +0 -0
  45. package/lib/chunk-Y3J3J5B2.js +124 -0
  46. package/lib/chunk-Z5I6A73Y.js +0 -0
  47. package/lib/common-Dw5l6Uud.d.ts +33 -0
  48. package/lib/define-BWuQ7acM.d.ts +131 -0
  49. package/lib/dir.d.ts +11 -13
  50. package/lib/dir.js +1 -1
  51. package/lib/exports/config/array.d.ts +1 -0
  52. package/lib/exports/config/array.js +7 -0
  53. package/lib/exports/config/config.d.ts +1 -0
  54. package/lib/exports/config/config.js +8 -0
  55. package/lib/exports/config/index.d.ts +2 -0
  56. package/lib/exports/config/index.js +14 -0
  57. package/lib/exports/config/types/config.d.ts +12 -0
  58. package/lib/exports/config/types/config.js +1 -0
  59. package/lib/exports/config/types/index.d.ts +1 -0
  60. package/lib/exports/config/types/index.js +2 -0
  61. package/lib/exports/database/database.d.ts +30 -0
  62. package/lib/exports/database/database.js +18 -0
  63. package/lib/exports/database/dbs/base.d.ts +23 -0
  64. package/lib/exports/database/dbs/base.js +15 -0
  65. package/lib/exports/database/dbs/index.d.ts +4 -0
  66. package/lib/exports/database/dbs/index.js +23 -0
  67. package/lib/exports/database/dbs/sqlite3.d.ts +23 -0
  68. package/lib/exports/database/dbs/sqlite3.js +19 -0
  69. package/lib/exports/database/dbs/table.d.ts +13 -0
  70. package/lib/exports/database/dbs/table.js +19 -0
  71. package/lib/exports/database/index.d.ts +12 -0
  72. package/lib/exports/database/index.js +62 -0
  73. package/lib/exports/database/tables/index.d.ts +9 -0
  74. package/lib/exports/database/tables/index.js +39 -0
  75. package/lib/exports/database/tables/mysAccountInfo.d.ts +9 -0
  76. package/lib/exports/database/tables/mysAccountInfo.js +23 -0
  77. package/lib/exports/database/tables/mysDeviceInfo.d.ts +9 -0
  78. package/lib/exports/database/tables/mysDeviceInfo.js +26 -0
  79. package/lib/exports/database/tables/mysUserInfo.d.ts +9 -0
  80. package/lib/exports/database/tables/mysUserInfo.js +23 -0
  81. package/lib/exports/database/types/database.d.ts +6 -0
  82. package/lib/exports/database/types/database.js +1 -0
  83. package/lib/exports/database/types/dbs/base.d.ts +114 -0
  84. package/lib/exports/database/types/dbs/base.js +11 -0
  85. package/lib/exports/database/types/dbs/index.d.ts +2 -0
  86. package/lib/exports/database/types/dbs/index.js +12 -0
  87. package/lib/exports/database/types/index.d.ts +6 -0
  88. package/lib/exports/database/types/index.js +24 -0
  89. package/lib/exports/database/types/tables/index.d.ts +5 -0
  90. package/lib/exports/database/types/tables/index.js +13 -0
  91. package/lib/exports/database/types/tables/mysAccountInfo.d.ts +14 -0
  92. package/lib/exports/database/types/tables/mysAccountInfo.js +7 -0
  93. package/lib/exports/database/types/tables/mysDeviceInfo.d.ts +19 -0
  94. package/lib/exports/database/types/tables/mysDeviceInfo.js +1 -0
  95. package/lib/exports/database/types/tables/mysUserInfo.d.ts +31 -0
  96. package/lib/exports/database/types/tables/mysUserInfo.js +7 -0
  97. package/lib/exports/mys/api/apis.d.ts +82 -0
  98. package/lib/exports/mys/api/apis.js +57 -0
  99. package/lib/exports/mys/api/app.d.ts +60 -0
  100. package/lib/exports/mys/api/app.js +31 -0
  101. package/lib/exports/mys/api/define.d.ts +6 -0
  102. package/lib/exports/mys/api/define.js +43 -0
  103. package/lib/exports/mys/api/index.d.ts +11 -0
  104. package/lib/exports/mys/api/index.js +64 -0
  105. package/lib/exports/mys/index.d.ts +13 -0
  106. package/lib/exports/mys/index.js +77 -0
  107. package/lib/exports/mys/types/api/define.d.ts +6 -0
  108. package/lib/exports/mys/types/api/define.js +1 -0
  109. package/lib/exports/mys/types/api/index.d.ts +6 -0
  110. package/lib/exports/mys/types/api/index.js +2 -0
  111. package/lib/exports/mys/types/index.d.ts +10 -0
  112. package/lib/exports/mys/types/index.js +12 -0
  113. package/lib/exports/mys/types/user/game.d.ts +10 -0
  114. package/lib/exports/mys/types/user/game.js +1 -0
  115. package/lib/exports/mys/types/user/index.d.ts +10 -0
  116. package/lib/exports/mys/types/user/index.js +9 -0
  117. package/lib/exports/mys/types/user/userInfo.d.ts +10 -0
  118. package/lib/exports/mys/types/user/userInfo.js +7 -0
  119. package/lib/exports/mys/user/deviceInfo.d.ts +11 -0
  120. package/lib/exports/mys/user/deviceInfo.js +29 -0
  121. package/lib/exports/mys/user/game.d.ts +20 -0
  122. package/lib/exports/mys/user/game.js +7 -0
  123. package/lib/exports/mys/user/index.d.ts +12 -0
  124. package/lib/exports/mys/user/index.js +51 -0
  125. package/lib/exports/mys/user/userInfo.d.ts +10 -0
  126. package/lib/exports/mys/user/userInfo.js +45 -0
  127. package/lib/exports/utils/common.d.ts +1 -0
  128. package/lib/exports/utils/common.js +13 -0
  129. package/lib/exports/utils/index.d.ts +2 -0
  130. package/lib/exports/utils/index.js +12 -0
  131. package/lib/exports/utils/render.d.ts +21 -0
  132. package/lib/exports/utils/render.js +7 -0
  133. package/lib/index-DEEWbZ0V.d.ts +102 -0
  134. package/lib/index.js +1 -1
  135. package/package.json +29 -15
  136. package/resources/fonts/HYWenHei-55W.ttf +0 -0
  137. package/resources/image/launcher-icon//345/216/237/347/245/236.png +0 -0
  138. package/resources/image/launcher-icon//345/264/251/345/235/2173.png +0 -0
  139. package/resources/image/launcher-icon//345/264/251/345/235/217/345/255/246/345/233/2552.png +0 -0
  140. package/resources/image/launcher-icon//345/264/251/345/235/217/357/274/232/345/233/240/347/274/230/347/262/276/347/201/265.png +0 -0
  141. package/resources/image/launcher-icon//345/264/251/345/235/217/357/274/232/346/230/237/347/251/271/351/223/201/351/201/223.png +0 -0
  142. package/resources/image/launcher-icon//346/230/237/345/270/203/350/260/267/345/234/260.png +0 -0
  143. package/resources/image/launcher-icon//346/234/252/345/256/232/344/272/213/344/273/266/347/260/277.png +0 -0
  144. package/resources/image/launcher-icon//347/273/235/345/214/272/351/233/266.png +0 -0
  145. package/resources/image/mys-logo.png +0 -0
  146. package/resources/template/ShowBindAccount/index.css +1 -0
  147. package/resources/template/ShowBindAccount/index.html +65 -0
  148. package/resources/template/ShowBindDevice/index.html +20 -0
  149. package/resources/template/ShowBindDevice/inex.css +1 -0
  150. package/resources/template/layout/default.css +1 -0
  151. package/resources/template/layout/default.html +27 -0
  152. package/lib/app.d.ts +0 -2
  153. package/lib/base-BJv9XnQP.d.ts +0 -120
  154. package/lib/chunk-CQNW7LJI.js +0 -38
  155. package/lib/chunk-MV2UE7C7.js +0 -410
  156. package/lib/chunk-NHUNEZXM.js +0 -371
  157. package/lib/chunk-WYRIRWT5.js +0 -213
  158. package/lib/database-byVXw91u.d.ts +0 -5
  159. package/lib/define-pa_pWNWT.d.ts +0 -182
  160. package/lib/exports/core.d.ts +0 -249
  161. package/lib/exports/core.js +0 -45
  162. package/lib/exports/database.d.ts +0 -48
  163. package/lib/exports/database.js +0 -20
  164. package/lib/exports/types.d.ts +0 -5
  165. package/lib/exports/types.js +0 -13
  166. package/lib/index.d.ts +0 -2
  167. package/lib/web.config.d.ts +0 -5
  168. package/lib/web.config.js +0 -55
@@ -0,0 +1,62 @@
1
+ import "../../chunk-W4DBT7AD.js";
2
+ import "../../chunk-Z5I6A73Y.js";
3
+ import {
4
+ MysAccountInfoDB,
5
+ MysAccountInfoTable
6
+ } from "../../chunk-KN5SHBVI.js";
7
+ import {
8
+ MysDeviceInfoDB,
9
+ MysDeviceInfoTable
10
+ } from "../../chunk-UVMX6WUC.js";
11
+ import {
12
+ MysUserInfoDB,
13
+ MysUserInfoTable
14
+ } from "../../chunk-7WESXE4X.js";
15
+ import "../../chunk-SEWEEPJN.js";
16
+ import {
17
+ Table
18
+ } from "../../chunk-5NA7ZPDS.js";
19
+ import "../../chunk-ARLTXJFJ.js";
20
+ import "../../chunk-LG34FPBI.js";
21
+ import "../../chunk-HVYNK5BN.js";
22
+ import {
23
+ Database
24
+ } from "../../chunk-G547WVGV.js";
25
+ import "../../chunk-EMAUATE3.js";
26
+ import {
27
+ DbBase
28
+ } from "../../chunk-Y3J3J5B2.js";
29
+ import "../../chunk-7KEG6SDX.js";
30
+ import "../../chunk-FBWSEBAW.js";
31
+ import {
32
+ DatabaseArray,
33
+ DatabaseType,
34
+ Dialect
35
+ } from "../../chunk-JVJQKRJ4.js";
36
+ import "../../chunk-LYTNREAI.js";
37
+ import "../../chunk-K5U2O3HH.js";
38
+ import {
39
+ UidPermission
40
+ } from "../../chunk-I7XZONDN.js";
41
+ import {
42
+ MysAccountType
43
+ } from "../../chunk-SHW6FHIB.js";
44
+ import "../../chunk-JRH4JC43.js";
45
+ import "../../chunk-SHLPPEAY.js";
46
+ import "../../chunk-MLKGABMK.js";
47
+ export {
48
+ Database,
49
+ DatabaseArray,
50
+ DatabaseType,
51
+ DbBase,
52
+ Dialect,
53
+ MysAccountInfoDB,
54
+ MysAccountInfoTable,
55
+ MysAccountType,
56
+ MysDeviceInfoDB,
57
+ MysDeviceInfoTable,
58
+ MysUserInfoDB,
59
+ MysUserInfoTable,
60
+ Table,
61
+ UidPermission
62
+ };
@@ -0,0 +1,9 @@
1
+ export { MysAccountInfoDB, MysAccountInfoTable } from './mysAccountInfo.js';
2
+ export { MysDeviceInfoDB, MysDeviceInfoTable } from './mysDeviceInfo.js';
3
+ export { MysUserInfoDB, MysUserInfoTable } from './mysUserInfo.js';
4
+ import '../types/dbs/base.js';
5
+ import 'sequelize';
6
+ import '../types/tables/mysAccountInfo.js';
7
+ import '../dbs/table.js';
8
+ import '../types/tables/mysDeviceInfo.js';
9
+ import '../types/tables/mysUserInfo.js';
@@ -0,0 +1,39 @@
1
+ import "../../../chunk-Z5I6A73Y.js";
2
+ import {
3
+ MysAccountInfoDB,
4
+ MysAccountInfoTable
5
+ } from "../../../chunk-KN5SHBVI.js";
6
+ import {
7
+ MysDeviceInfoDB,
8
+ MysDeviceInfoTable
9
+ } from "../../../chunk-UVMX6WUC.js";
10
+ import {
11
+ MysUserInfoDB,
12
+ MysUserInfoTable
13
+ } from "../../../chunk-7WESXE4X.js";
14
+ import "../../../chunk-SEWEEPJN.js";
15
+ import "../../../chunk-5NA7ZPDS.js";
16
+ import "../../../chunk-ARLTXJFJ.js";
17
+ import "../../../chunk-LG34FPBI.js";
18
+ import "../../../chunk-HVYNK5BN.js";
19
+ import "../../../chunk-G547WVGV.js";
20
+ import "../../../chunk-EMAUATE3.js";
21
+ import "../../../chunk-Y3J3J5B2.js";
22
+ import "../../../chunk-7KEG6SDX.js";
23
+ import "../../../chunk-FBWSEBAW.js";
24
+ import "../../../chunk-JVJQKRJ4.js";
25
+ import "../../../chunk-LYTNREAI.js";
26
+ import "../../../chunk-K5U2O3HH.js";
27
+ import "../../../chunk-I7XZONDN.js";
28
+ import "../../../chunk-SHW6FHIB.js";
29
+ import "../../../chunk-JRH4JC43.js";
30
+ import "../../../chunk-SHLPPEAY.js";
31
+ import "../../../chunk-MLKGABMK.js";
32
+ export {
33
+ MysAccountInfoDB,
34
+ MysAccountInfoTable,
35
+ MysDeviceInfoDB,
36
+ MysDeviceInfoTable,
37
+ MysUserInfoDB,
38
+ MysUserInfoTable
39
+ };
@@ -0,0 +1,9 @@
1
+ import { DatabaseType, DatabaseClassInstance } from '../types/dbs/base.js';
2
+ import { MysAccountInfoTableType } from '../types/tables/mysAccountInfo.js';
3
+ import { Table } from '../dbs/table.js';
4
+ import 'sequelize';
5
+
6
+ declare const MysAccountInfoTable: Table<MysAccountInfoTableType, DatabaseType.Db, {}>;
7
+ declare const MysAccountInfoDB: () => Promise<DatabaseClassInstance<MysAccountInfoTableType, DatabaseType.Db>>;
8
+
9
+ export { MysAccountInfoDB, MysAccountInfoTable };
@@ -0,0 +1,23 @@
1
+ import {
2
+ MysAccountInfoDB,
3
+ MysAccountInfoTable
4
+ } from "../../../chunk-KN5SHBVI.js";
5
+ import "../../../chunk-SEWEEPJN.js";
6
+ import "../../../chunk-5NA7ZPDS.js";
7
+ import "../../../chunk-G547WVGV.js";
8
+ import "../../../chunk-EMAUATE3.js";
9
+ import "../../../chunk-Y3J3J5B2.js";
10
+ import "../../../chunk-7KEG6SDX.js";
11
+ import "../../../chunk-FBWSEBAW.js";
12
+ import "../../../chunk-JVJQKRJ4.js";
13
+ import "../../../chunk-LYTNREAI.js";
14
+ import "../../../chunk-K5U2O3HH.js";
15
+ import "../../../chunk-I7XZONDN.js";
16
+ import "../../../chunk-SHW6FHIB.js";
17
+ import "../../../chunk-JRH4JC43.js";
18
+ import "../../../chunk-SHLPPEAY.js";
19
+ import "../../../chunk-MLKGABMK.js";
20
+ export {
21
+ MysAccountInfoDB,
22
+ MysAccountInfoTable
23
+ };
@@ -0,0 +1,9 @@
1
+ import { DatabaseType, DatabaseClassInstance } from '../types/dbs/base.js';
2
+ import { MysDeviceInfoTableType } from '../types/tables/mysDeviceInfo.js';
3
+ import { Table } from '../dbs/table.js';
4
+ import 'sequelize';
5
+
6
+ declare const MysDeviceInfoTable: Table<MysDeviceInfoTableType, DatabaseType.Db, {}>;
7
+ declare const MysDeviceInfoDB: () => Promise<DatabaseClassInstance<MysDeviceInfoTableType, DatabaseType.Db>>;
8
+
9
+ export { MysDeviceInfoDB, MysDeviceInfoTable };
@@ -0,0 +1,26 @@
1
+ import {
2
+ MysDeviceInfoDB,
3
+ MysDeviceInfoTable
4
+ } from "../../../chunk-UVMX6WUC.js";
5
+ import "../../../chunk-SEWEEPJN.js";
6
+ import "../../../chunk-5NA7ZPDS.js";
7
+ import "../../../chunk-ARLTXJFJ.js";
8
+ import "../../../chunk-LG34FPBI.js";
9
+ import "../../../chunk-HVYNK5BN.js";
10
+ import "../../../chunk-G547WVGV.js";
11
+ import "../../../chunk-EMAUATE3.js";
12
+ import "../../../chunk-Y3J3J5B2.js";
13
+ import "../../../chunk-7KEG6SDX.js";
14
+ import "../../../chunk-FBWSEBAW.js";
15
+ import "../../../chunk-JVJQKRJ4.js";
16
+ import "../../../chunk-LYTNREAI.js";
17
+ import "../../../chunk-K5U2O3HH.js";
18
+ import "../../../chunk-I7XZONDN.js";
19
+ import "../../../chunk-SHW6FHIB.js";
20
+ import "../../../chunk-JRH4JC43.js";
21
+ import "../../../chunk-SHLPPEAY.js";
22
+ import "../../../chunk-MLKGABMK.js";
23
+ export {
24
+ MysDeviceInfoDB,
25
+ MysDeviceInfoTable
26
+ };
@@ -0,0 +1,9 @@
1
+ import { DatabaseType, DatabaseClassInstance } from '../types/dbs/base.js';
2
+ import { BaseUserInfoTableType, BaseGameUIDInfoTableType } from '../types/tables/mysUserInfo.js';
3
+ import { Table } from '../dbs/table.js';
4
+ import 'sequelize';
5
+
6
+ declare const MysUserInfoTable: Table<BaseUserInfoTableType, DatabaseType.Db, BaseGameUIDInfoTableType<string>>;
7
+ declare const MysUserInfoDB: () => Promise<DatabaseClassInstance<BaseUserInfoTableType, DatabaseType.Db>>;
8
+
9
+ export { MysUserInfoDB, MysUserInfoTable };
@@ -0,0 +1,23 @@
1
+ import {
2
+ MysUserInfoDB,
3
+ MysUserInfoTable
4
+ } from "../../../chunk-7WESXE4X.js";
5
+ import "../../../chunk-SEWEEPJN.js";
6
+ import "../../../chunk-5NA7ZPDS.js";
7
+ import "../../../chunk-G547WVGV.js";
8
+ import "../../../chunk-EMAUATE3.js";
9
+ import "../../../chunk-Y3J3J5B2.js";
10
+ import "../../../chunk-7KEG6SDX.js";
11
+ import "../../../chunk-FBWSEBAW.js";
12
+ import "../../../chunk-JVJQKRJ4.js";
13
+ import "../../../chunk-LYTNREAI.js";
14
+ import "../../../chunk-K5U2O3HH.js";
15
+ import "../../../chunk-I7XZONDN.js";
16
+ import "../../../chunk-SHW6FHIB.js";
17
+ import "../../../chunk-JRH4JC43.js";
18
+ import "../../../chunk-SHLPPEAY.js";
19
+ import "../../../chunk-MLKGABMK.js";
20
+ export {
21
+ MysUserInfoDB,
22
+ MysUserInfoTable
23
+ };
@@ -0,0 +1,6 @@
1
+ import { DatabaseType, DatabaseClassInstance } from './dbs/base.js';
2
+ import 'sequelize';
3
+
4
+ type DatabaseFn = <T extends Record<string, any>, D extends DatabaseType>() => DatabaseClassInstance<T, D>;
5
+
6
+ export type { DatabaseFn };
@@ -0,0 +1 @@
1
+ import "../../../chunk-JRH4JC43.js";
@@ -0,0 +1,114 @@
1
+ import { ModelStatic, Model, ModelAttributeColumnOptions, DataTypes } from 'sequelize';
2
+
3
+ declare const enum Dialect {
4
+ Sqlite = "sqlite",
5
+ MySQL = "mysql",
6
+ MariaDB = "mariadb",
7
+ PostgreSQL = "postgres",
8
+ MSSQL = "mssql",
9
+ Oracle = "oracle",
10
+ DB2 = "db2",
11
+ Snowflake = "snowflake"
12
+ }
13
+ declare enum DatabaseType {
14
+ File = "file",
15
+ Dir = "dir",
16
+ Db = "db"
17
+ }
18
+ type ModelAttributes<M extends Model = Model, TAttributes = any> = {
19
+ [name in keyof TAttributes]: ModelAttributeColumnOptions<M>;
20
+ };
21
+ interface DatabaseReturn<T> {
22
+ [DatabaseType.Db]: T & {
23
+ save: (data: Partial<T>) => Promise<DatabaseReturn<T>[DatabaseType.Db]>;
24
+ destroy: () => Promise<boolean>;
25
+ };
26
+ [DatabaseType.File]: T & {
27
+ save: (data: T) => Promise<DatabaseReturn<T>[DatabaseType.File]>;
28
+ destroy: () => Promise<boolean>;
29
+ };
30
+ [DatabaseType.Dir]: T & {
31
+ save: (data: T) => Promise<DatabaseReturn<T>[DatabaseType.Dir]>;
32
+ destroy: () => Promise<boolean>;
33
+ };
34
+ }
35
+ type DatabaseClassInstance<T extends Record<string, any>, D extends DatabaseType> = {
36
+ dialect: Dialect;
37
+ model: ModelStatic<Model>;
38
+ databasePath: string;
39
+ databaseType: D;
40
+ /** @description 表名 */
41
+ modelName: string;
42
+ /** @description 表定义 */
43
+ modelSchema: ModelAttributes<Model>;
44
+ /** @description 检查数据库是否可用 */
45
+ check(): Promise<boolean>;
46
+ /**
47
+ * @description 初始化表
48
+ * @param DataDir 插件数据目录
49
+ * @param modelName 表名
50
+ * @param modelSchema 表定义
51
+ * @param type 数据库类型
52
+ */
53
+ init(DataDir: string, modelName: string, modelSchema: Record<keyof T, ModelAttributeColumnOptions<Model>>, type: D): Promise<DatabaseClassInstance<T, D>>;
54
+ /** @description 将表定义转换为 JSON 对象 */
55
+ schemaToJSON(pk: string): T;
56
+ /** @description 获取用户数据文件路径 */
57
+ userPath(pk: string): string;
58
+ /** @description 根据主键读取用户数据文件 */
59
+ readSync(path: string, pk: string): DatabaseReturn<T>[DatabaseType.File];
60
+ /** @description 根据主键读取用户数据目录 */
61
+ readDirSync(pk: string): DatabaseReturn<T>[DatabaseType.Dir];
62
+ /** @description 写入用户数据目录 */
63
+ writeDirSync(pk: string, data: Record<string, any>): boolean;
64
+ /** @description 保存用户数据到文件 */
65
+ saveFile(pk: string): (data: T) => Promise<DatabaseReturn<T>[DatabaseType.File]>;
66
+ /** @description 保存用户数据到目录 */
67
+ saveDir(pk: string): (data: T) => Promise<DatabaseReturn<T>[DatabaseType.Dir]>;
68
+ /** @description 保存用户数据到 SQL 数据库 */
69
+ saveSql(model: Model<any, any>, pk: string): (data: Partial<T>) => Promise<DatabaseReturn<T>[DatabaseType.Db]>;
70
+ /** @description 根据主键查找并创建用户数据 */
71
+ findByPk(pk: string, create: true): Promise<DatabaseReturn<T>[D]>;
72
+ /** @description 根据主键查找用户数据 */
73
+ findByPk(pk: string, create?: boolean): Promise<DatabaseReturn<T>[D] | undefined>;
74
+ /** @description 根据主键数组查找用户数据 */
75
+ findAllByPks(pks: string[]): Promise<DatabaseReturn<T>[D][]>;
76
+ /** @description 获取所有用户数据 */
77
+ findAll(): Promise<DatabaseReturn<T>[D][]>;
78
+ /** @description 获取除 excludePks 以外所有用户数据 */
79
+ findAll(excludePks: string[]): Promise<DatabaseReturn<T>[D][]>;
80
+ /** @description 删除用户数据 */
81
+ destroy(pk: string): Promise<boolean>;
82
+ };
83
+ interface DatabaseClassStatic {
84
+ /** @description 数据库标识 */
85
+ dialect: Dialect;
86
+ /** @description 数据库说明 */
87
+ description: string;
88
+ Column<T>(type: keyof typeof DataTypes, def: T, option?: Partial<ModelAttributeColumnOptions<Model>>): ModelAttributeColumnOptions<Model>;
89
+ ArrayColumn<T>(key: string, fn?: (data: DatabaseArray<T>) => T[]): ModelAttributeColumnOptions<Model>;
90
+ JsonColumn<T extends Record<string, any>>(key: string, def: T): ModelAttributeColumnOptions<Model>;
91
+ }
92
+ declare class DatabaseArray<T> extends Array<T> {
93
+ constructor(items: T[]);
94
+ /**
95
+ * @param element - string | number
96
+ * @returns
97
+ */
98
+ has(element: T & (string | number)): boolean;
99
+ /**
100
+ * @param isEqual 是否不添加重复元素
101
+ */
102
+ add(element: T, isEqual: boolean): this;
103
+ /**
104
+ * @param isEqual 是否不添加重复元素
105
+ */
106
+ addSome(elements: T[], isEqual: boolean): this;
107
+ /**
108
+ * @param isIndex predicate是否为索引
109
+ */
110
+ remove(predicate: T | ((item: T) => boolean), isIndex?: boolean): this;
111
+ clear(): this;
112
+ }
113
+
114
+ export { DatabaseArray, type DatabaseClassInstance, type DatabaseClassStatic, type DatabaseReturn, DatabaseType, Dialect, type ModelAttributes };
@@ -0,0 +1,11 @@
1
+ import {
2
+ DatabaseArray,
3
+ DatabaseType,
4
+ Dialect
5
+ } from "../../../../chunk-JVJQKRJ4.js";
6
+ import "../../../../chunk-MLKGABMK.js";
7
+ export {
8
+ DatabaseArray,
9
+ DatabaseType,
10
+ Dialect
11
+ };
@@ -0,0 +1,2 @@
1
+ export { DatabaseArray, DatabaseClassInstance, DatabaseClassStatic, DatabaseReturn, DatabaseType, Dialect, ModelAttributes } from './base.js';
2
+ import 'sequelize';
@@ -0,0 +1,12 @@
1
+ import "../../../../chunk-FBWSEBAW.js";
2
+ import {
3
+ DatabaseArray,
4
+ DatabaseType,
5
+ Dialect
6
+ } from "../../../../chunk-JVJQKRJ4.js";
7
+ import "../../../../chunk-MLKGABMK.js";
8
+ export {
9
+ DatabaseArray,
10
+ DatabaseType,
11
+ Dialect
12
+ };
@@ -0,0 +1,6 @@
1
+ export { DatabaseFn } from './database.js';
2
+ export { DatabaseArray, DatabaseClassInstance, DatabaseClassStatic, DatabaseReturn, DatabaseType, Dialect, ModelAttributes } from './dbs/base.js';
3
+ export { MysAccountInfoTableType, MysAccountType } from './tables/mysAccountInfo.js';
4
+ export { MysDeviceInfoDatabaseBaseType, MysDeviceInfoDatabaseIdFpType, MysDeviceInfoTableType } from './tables/mysDeviceInfo.js';
5
+ export { BaseGameUIDInfoTableType, BaseUserInfoTableType, UidPermission } from './tables/mysUserInfo.js';
6
+ import 'sequelize';
@@ -0,0 +1,24 @@
1
+ import "../../../chunk-7KEG6SDX.js";
2
+ import "../../../chunk-FBWSEBAW.js";
3
+ import {
4
+ DatabaseArray,
5
+ DatabaseType,
6
+ Dialect
7
+ } from "../../../chunk-JVJQKRJ4.js";
8
+ import "../../../chunk-LYTNREAI.js";
9
+ import "../../../chunk-K5U2O3HH.js";
10
+ import {
11
+ UidPermission
12
+ } from "../../../chunk-I7XZONDN.js";
13
+ import {
14
+ MysAccountType
15
+ } from "../../../chunk-SHW6FHIB.js";
16
+ import "../../../chunk-JRH4JC43.js";
17
+ import "../../../chunk-MLKGABMK.js";
18
+ export {
19
+ DatabaseArray,
20
+ DatabaseType,
21
+ Dialect,
22
+ MysAccountType,
23
+ UidPermission
24
+ };
@@ -0,0 +1,5 @@
1
+ export { MysAccountInfoTableType, MysAccountType } from './mysAccountInfo.js';
2
+ export { MysDeviceInfoDatabaseBaseType, MysDeviceInfoDatabaseIdFpType, MysDeviceInfoTableType } from './mysDeviceInfo.js';
3
+ export { BaseGameUIDInfoTableType, BaseUserInfoTableType, UidPermission } from './mysUserInfo.js';
4
+ import '../dbs/base.js';
5
+ import 'sequelize';
@@ -0,0 +1,13 @@
1
+ import "../../../../chunk-LYTNREAI.js";
2
+ import "../../../../chunk-K5U2O3HH.js";
3
+ import {
4
+ UidPermission
5
+ } from "../../../../chunk-I7XZONDN.js";
6
+ import {
7
+ MysAccountType
8
+ } from "../../../../chunk-SHW6FHIB.js";
9
+ import "../../../../chunk-MLKGABMK.js";
10
+ export {
11
+ MysAccountType,
12
+ UidPermission
13
+ };
@@ -0,0 +1,14 @@
1
+ declare const enum MysAccountType {
2
+ cn = "mihoyo",
3
+ os = "hoyolab"
4
+ }
5
+ interface MysAccountInfoTableType {
6
+ ltuid: string;
7
+ type: MysAccountType;
8
+ cookie: string;
9
+ stoken: string;
10
+ /** 绑定的设备md5 */
11
+ deviceMd5: string;
12
+ }
13
+
14
+ export { type MysAccountInfoTableType, MysAccountType };
@@ -0,0 +1,7 @@
1
+ import {
2
+ MysAccountType
3
+ } from "../../../../chunk-SHW6FHIB.js";
4
+ import "../../../../chunk-MLKGABMK.js";
5
+ export {
6
+ MysAccountType
7
+ };
@@ -0,0 +1,19 @@
1
+ interface MysDeviceInfoDatabaseBaseType {
2
+ name: string;
3
+ board: string;
4
+ /** @description 重要参数 */
5
+ model: string;
6
+ oaid: string;
7
+ version: number;
8
+ fingerprint: string;
9
+ product: string;
10
+ }
11
+ interface MysDeviceInfoDatabaseIdFpType {
12
+ deviceId: string;
13
+ deviceFp: string;
14
+ }
15
+ interface MysDeviceInfoTableType extends MysDeviceInfoDatabaseBaseType, MysDeviceInfoDatabaseIdFpType {
16
+ md5: string;
17
+ }
18
+
19
+ export type { MysDeviceInfoDatabaseBaseType, MysDeviceInfoDatabaseIdFpType, MysDeviceInfoTableType };
@@ -0,0 +1 @@
1
+ import "../../../../chunk-K5U2O3HH.js";
@@ -0,0 +1,31 @@
1
+ import { DatabaseArray } from '../dbs/base.js';
2
+ import 'sequelize';
3
+
4
+ interface BaseUserInfoTableType {
5
+ userId: string;
6
+ ltuids: DatabaseArray<string>;
7
+ stuids: DatabaseArray<string>;
8
+ deviceList: DatabaseArray<string>;
9
+ }
10
+ declare const enum UidPermission {
11
+ /** @description 普通绑定 */
12
+ BIND = 0,
13
+ /** @description Cookie */
14
+ CK = 1,
15
+ /** @description SToken */
16
+ ST = 2,
17
+ /** @description Cookie + SToken */
18
+ CS = 3,
19
+ /** @description 删除绑定 */
20
+ DEL = 4
21
+ }
22
+ type BaseGameUIDInfoTableType<Game extends string> = {
23
+ [P in `${Game}-main`]: string;
24
+ } & {
25
+ [P in `${Game}-uids`]: Partial<Record<string, {
26
+ perm: UidPermission;
27
+ ltuid: string;
28
+ }>>;
29
+ };
30
+
31
+ export { type BaseGameUIDInfoTableType, type BaseUserInfoTableType, UidPermission };
@@ -0,0 +1,7 @@
1
+ import {
2
+ UidPermission
3
+ } from "../../../../chunk-I7XZONDN.js";
4
+ import "../../../../chunk-MLKGABMK.js";
5
+ export {
6
+ UidPermission
7
+ };
@@ -0,0 +1,82 @@
1
+ import { b as DefineApi, B as BaseMysRes, a as BaseltuidInfo } from '../../../define-BWuQ7acM.js';
2
+ import { U as UserGameRoleItem } from '../../../index-DEEWbZ0V.js';
3
+ import './app.js';
4
+ import '../../database/types/tables/mysAccountInfo.js';
5
+ import 'node-karin';
6
+ import 'node-karin/axios';
7
+ import '../../database/types/tables/mysDeviceInfo.js';
8
+ import '../../database/types/tables/mysUserInfo.js';
9
+ import '../../database/types/dbs/base.js';
10
+ import 'sequelize';
11
+
12
+ declare const fetchQRcode: DefineApi<BaseMysRes & {
13
+ data: {
14
+ url: string;
15
+ };
16
+ }, {
17
+ device: string;
18
+ }, null>;
19
+ declare const queryQRcode: DefineApi<BaseMysRes & {
20
+ data: {
21
+ stat: "Scanned" | "Confirmed";
22
+ payload: {
23
+ raw: string;
24
+ };
25
+ };
26
+ }, {
27
+ device: string;
28
+ ticket: string;
29
+ }, null>;
30
+ declare const getTokenByGameToken: DefineApi<BaseMysRes & {
31
+ data: {
32
+ token: {
33
+ token: string;
34
+ };
35
+ user_info: {
36
+ aid: string;
37
+ mid: string;
38
+ };
39
+ };
40
+ }, {
41
+ account_id: number;
42
+ game_token: string;
43
+ }, null>;
44
+ declare const getCookieAccountInfoByGameToken: DefineApi<BaseMysRes & {
45
+ data: {
46
+ cookie_token: string;
47
+ };
48
+ }, {
49
+ account_id: string;
50
+ game_token: string;
51
+ }, null>;
52
+ declare const getCookieTokenBySToken: DefineApi<BaseMysRes & {
53
+ data: {
54
+ cookie_token: string;
55
+ };
56
+ }, {
57
+ stoken: string;
58
+ method: "GET" | "POST";
59
+ }, null>;
60
+ declare const getUserGameRolesByCookie: DefineApi<BaseMysRes & {
61
+ data: {
62
+ list: UserGameRoleItem[];
63
+ };
64
+ }, null, {
65
+ cookie: string;
66
+ } & BaseltuidInfo>;
67
+ declare const getUserFullInfo: DefineApi<BaseMysRes & {
68
+ data: {
69
+ user_info: {
70
+ uid: string;
71
+ };
72
+ };
73
+ }, null, {
74
+ cookie: string;
75
+ } & BaseltuidInfo>;
76
+ declare const getDeviceFp: DefineApi<BaseMysRes & {
77
+ data: {
78
+ device_fp: string;
79
+ };
80
+ }, null, null>;
81
+
82
+ export { fetchQRcode, getCookieAccountInfoByGameToken, getCookieTokenBySToken, getDeviceFp, getTokenByGameToken, getUserFullInfo, getUserGameRolesByCookie, queryQRcode };
@@ -0,0 +1,57 @@
1
+ import {
2
+ fetchQRcode,
3
+ getCookieAccountInfoByGameToken,
4
+ getCookieTokenBySToken,
5
+ getDeviceFp,
6
+ getTokenByGameToken,
7
+ getUserFullInfo,
8
+ getUserGameRolesByCookie,
9
+ queryQRcode
10
+ } from "../../../chunk-RWBRS7SA.js";
11
+ import "../../../chunk-COKAJ7V6.js";
12
+ import "../../../chunk-3BIQN6QA.js";
13
+ import "../../../chunk-G5W5WAY5.js";
14
+ import "../../../chunk-7VAWV6ZE.js";
15
+ import "../../../chunk-LJSDSOY6.js";
16
+ import "../../../chunk-CFS2WFOO.js";
17
+ import "../../../chunk-MWYDWDR4.js";
18
+ import "../../../chunk-FOAQZIZ2.js";
19
+ import "../../../chunk-IVZICDGW.js";
20
+ import "../../../chunk-XQWTJIT4.js";
21
+ import "../../../chunk-7SZX3RBZ.js";
22
+ import "../../../chunk-2DHTKQ34.js";
23
+ import "../../../chunk-JKZ5NRPX.js";
24
+ import "../../../chunk-6PIXUPZ6.js";
25
+ import "../../../chunk-W4DBT7AD.js";
26
+ import "../../../chunk-Z5I6A73Y.js";
27
+ import "../../../chunk-KN5SHBVI.js";
28
+ import "../../../chunk-UVMX6WUC.js";
29
+ import "../../../chunk-7WESXE4X.js";
30
+ import "../../../chunk-SEWEEPJN.js";
31
+ import "../../../chunk-5NA7ZPDS.js";
32
+ import "../../../chunk-ARLTXJFJ.js";
33
+ import "../../../chunk-LG34FPBI.js";
34
+ import "../../../chunk-HVYNK5BN.js";
35
+ import "../../../chunk-G547WVGV.js";
36
+ import "../../../chunk-EMAUATE3.js";
37
+ import "../../../chunk-Y3J3J5B2.js";
38
+ import "../../../chunk-7KEG6SDX.js";
39
+ import "../../../chunk-FBWSEBAW.js";
40
+ import "../../../chunk-JVJQKRJ4.js";
41
+ import "../../../chunk-LYTNREAI.js";
42
+ import "../../../chunk-K5U2O3HH.js";
43
+ import "../../../chunk-I7XZONDN.js";
44
+ import "../../../chunk-SHW6FHIB.js";
45
+ import "../../../chunk-JRH4JC43.js";
46
+ import "../../../chunk-SHLPPEAY.js";
47
+ import "../../../chunk-MLKGABMK.js";
48
+ export {
49
+ fetchQRcode,
50
+ getCookieAccountInfoByGameToken,
51
+ getCookieTokenBySToken,
52
+ getDeviceFp,
53
+ getTokenByGameToken,
54
+ getUserFullInfo,
55
+ getUserGameRolesByCookie,
56
+ queryQRcode
57
+ };