karin-plugin-mys-core 1.0.0 → 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 +674 -0
- package/lib/apps/MiHoYoLogin.d.ts +3 -1
- package/lib/apps/MiHoYoLogin.js +181 -125
- package/lib/apps/MysDevice.d.ts +5 -0
- package/lib/apps/MysDevice.js +101 -0
- package/lib/apps/UIDManage.d.ts +10 -0
- package/lib/apps/UIDManage.js +52 -0
- package/lib/array-CZDr9qst.d.ts +62 -0
- package/lib/chunk-2DHTKQ34.js +0 -0
- package/lib/chunk-3BIQN6QA.js +27 -0
- package/lib/chunk-3CNBOOKY.js +31 -0
- package/lib/chunk-5NA7ZPDS.js +54 -0
- package/lib/chunk-6PIXUPZ6.js +82 -0
- package/lib/chunk-7KEG6SDX.js +0 -0
- package/lib/chunk-7SZX3RBZ.js +0 -0
- package/lib/chunk-7VAWV6ZE.js +0 -0
- package/lib/chunk-7WESXE4X.js +29 -0
- package/lib/chunk-7YZHHLS5.js +130 -0
- package/lib/chunk-ARLTXJFJ.js +0 -0
- package/lib/chunk-CFS2WFOO.js +0 -0
- package/lib/chunk-EMAUATE3.js +217 -0
- package/lib/chunk-FBWSEBAW.js +0 -0
- package/lib/chunk-FOAQZIZ2.js +0 -0
- package/lib/chunk-G547WVGV.js +73 -0
- package/lib/chunk-G5W5WAY5.js +64 -0
- package/lib/chunk-HVYNK5BN.js +45 -0
- package/lib/chunk-I7XZONDN.js +13 -0
- package/lib/chunk-IVZICDGW.js +19 -0
- package/lib/chunk-JBGXPVO2.js +179 -0
- package/lib/chunk-JRH4JC43.js +0 -0
- package/lib/chunk-JVJQKRJ4.js +89 -0
- package/lib/chunk-K5U2O3HH.js +0 -0
- package/lib/chunk-KN5SHBVI.js +30 -0
- package/lib/chunk-LG34FPBI.js +50 -0
- package/lib/chunk-LJSDSOY6.js +0 -0
- package/lib/chunk-LYTNREAI.js +0 -0
- package/lib/chunk-MWYDWDR4.js +0 -0
- package/lib/chunk-QMSYS77M.js +38 -0
- package/lib/chunk-SEWEEPJN.js +0 -0
- package/lib/{chunk-JML6VYXN.js → chunk-SHLPPEAY.js} +13 -17
- package/lib/chunk-SHW6FHIB.js +10 -0
- package/lib/chunk-W4DBT7AD.js +0 -0
- package/lib/chunk-X75DW4KI.js +510 -0
- package/lib/chunk-XQWTJIT4.js +0 -0
- package/lib/chunk-Y3J3J5B2.js +124 -0
- package/lib/chunk-Z5I6A73Y.js +0 -0
- package/lib/common-Dw5l6Uud.d.ts +33 -0
- package/lib/define-BWuQ7acM.d.ts +131 -0
- package/lib/dir.d.ts +11 -13
- package/lib/dir.js +1 -1
- package/lib/exports/config/array.d.ts +1 -0
- package/lib/exports/config/array.js +7 -0
- package/lib/exports/config/config.d.ts +1 -0
- package/lib/exports/config/config.js +8 -0
- package/lib/exports/config/index.d.ts +2 -0
- package/lib/exports/config/index.js +14 -0
- package/lib/exports/config/types/config.d.ts +12 -0
- package/lib/exports/config/types/config.js +1 -0
- package/lib/exports/config/types/index.d.ts +1 -0
- package/lib/exports/config/types/index.js +2 -0
- package/lib/exports/database/database.d.ts +30 -0
- package/lib/exports/database/database.js +18 -0
- package/lib/exports/database/dbs/base.d.ts +23 -0
- package/lib/exports/database/dbs/base.js +15 -0
- package/lib/exports/database/dbs/index.d.ts +4 -0
- package/lib/exports/database/dbs/index.js +23 -0
- package/lib/exports/database/dbs/sqlite3.d.ts +23 -0
- package/lib/exports/database/dbs/sqlite3.js +19 -0
- package/lib/exports/database/dbs/table.d.ts +13 -0
- package/lib/exports/database/dbs/table.js +19 -0
- package/lib/exports/database/index.d.ts +12 -0
- package/lib/exports/database/index.js +62 -0
- package/lib/exports/database/tables/index.d.ts +9 -0
- package/lib/exports/database/tables/index.js +39 -0
- package/lib/exports/database/tables/mysAccountInfo.d.ts +9 -0
- package/lib/exports/database/tables/mysAccountInfo.js +23 -0
- package/lib/exports/database/tables/mysDeviceInfo.d.ts +9 -0
- package/lib/exports/database/tables/mysDeviceInfo.js +26 -0
- package/lib/exports/database/tables/mysUserInfo.d.ts +9 -0
- package/lib/exports/database/tables/mysUserInfo.js +23 -0
- package/lib/exports/database/types/database.d.ts +6 -0
- package/lib/exports/database/types/database.js +1 -0
- package/lib/exports/database/types/dbs/base.d.ts +114 -0
- package/lib/exports/database/types/dbs/base.js +11 -0
- package/lib/exports/database/types/dbs/index.d.ts +2 -0
- package/lib/exports/database/types/dbs/index.js +12 -0
- package/lib/exports/database/types/index.d.ts +6 -0
- package/lib/exports/database/types/index.js +24 -0
- package/lib/exports/database/types/tables/index.d.ts +5 -0
- package/lib/exports/database/types/tables/index.js +13 -0
- package/lib/exports/database/types/tables/mysAccountInfo.d.ts +14 -0
- package/lib/exports/database/types/tables/mysAccountInfo.js +7 -0
- package/lib/exports/database/types/tables/mysDeviceInfo.d.ts +19 -0
- package/lib/exports/database/types/tables/mysDeviceInfo.js +1 -0
- package/lib/exports/database/types/tables/mysUserInfo.d.ts +31 -0
- package/lib/exports/database/types/tables/mysUserInfo.js +7 -0
- package/lib/exports/mys/api/apis.d.ts +82 -0
- package/lib/exports/mys/api/apis.js +57 -0
- package/lib/exports/mys/api/app.d.ts +60 -0
- package/lib/exports/mys/api/app.js +31 -0
- package/lib/exports/mys/api/define.d.ts +6 -0
- package/lib/exports/mys/api/define.js +43 -0
- package/lib/exports/mys/api/index.d.ts +11 -0
- package/lib/exports/mys/api/index.js +64 -0
- package/lib/exports/mys/index.d.ts +13 -0
- package/lib/exports/mys/index.js +77 -0
- package/lib/exports/mys/types/api/define.d.ts +6 -0
- package/lib/exports/mys/types/api/define.js +1 -0
- package/lib/exports/mys/types/api/index.d.ts +6 -0
- package/lib/exports/mys/types/api/index.js +2 -0
- package/lib/exports/mys/types/index.d.ts +10 -0
- package/lib/exports/mys/types/index.js +12 -0
- package/lib/exports/mys/types/user/game.d.ts +10 -0
- package/lib/exports/mys/types/user/game.js +1 -0
- package/lib/exports/mys/types/user/index.d.ts +10 -0
- package/lib/exports/mys/types/user/index.js +9 -0
- package/lib/exports/mys/types/user/userInfo.d.ts +10 -0
- package/lib/exports/mys/types/user/userInfo.js +7 -0
- package/lib/exports/mys/user/deviceInfo.d.ts +11 -0
- package/lib/exports/mys/user/deviceInfo.js +29 -0
- package/lib/exports/mys/user/game.d.ts +20 -0
- package/lib/exports/mys/user/game.js +7 -0
- package/lib/exports/mys/user/index.d.ts +12 -0
- package/lib/exports/mys/user/index.js +51 -0
- package/lib/exports/mys/user/userInfo.d.ts +10 -0
- package/lib/exports/mys/user/userInfo.js +45 -0
- package/lib/exports/utils/common.d.ts +1 -0
- package/lib/exports/utils/common.js +13 -0
- package/lib/exports/utils/index.d.ts +2 -0
- package/lib/exports/utils/index.js +12 -0
- package/lib/exports/utils/render.d.ts +21 -0
- package/lib/exports/utils/render.js +7 -0
- package/lib/index-DEEWbZ0V.d.ts +102 -0
- package/lib/index.js +1 -1
- package/package.json +29 -16
- package/resources/fonts/HYWenHei-55W.ttf +0 -0
- package/resources/image/launcher-icon//345/216/237/347/245/236.png +0 -0
- package/resources/image/launcher-icon//345/264/251/345/235/2173.png +0 -0
- package/resources/image/launcher-icon//345/264/251/345/235/217/345/255/246/345/233/2552.png +0 -0
- 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
- 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
- package/resources/image/launcher-icon//346/230/237/345/270/203/350/260/267/345/234/260.png +0 -0
- package/resources/image/launcher-icon//346/234/252/345/256/232/344/272/213/344/273/266/347/260/277.png +0 -0
- package/resources/image/launcher-icon//347/273/235/345/214/272/351/233/266.png +0 -0
- package/resources/image/mys-logo.png +0 -0
- package/resources/template/ShowBindAccount/index.css +1 -0
- package/resources/template/ShowBindAccount/index.html +65 -0
- package/resources/template/ShowBindDevice/index.html +20 -0
- package/resources/template/ShowBindDevice/inex.css +1 -0
- package/resources/template/layout/default.css +1 -0
- package/resources/template/layout/default.html +27 -0
- package/config/config.json +0 -3
- package/lib/app.d.ts +0 -2
- package/lib/base-B1BvQ4ol.d.ts +0 -99
- package/lib/chunk-4JTLXC2G.js +0 -519
- package/lib/chunk-7QISGXVH.js +0 -347
- package/lib/chunk-JIO4GOQA.js +0 -31
- package/lib/database-BDHrI6Vm.d.ts +0 -5
- package/lib/define-CrfHwHnK.d.ts +0 -163
- package/lib/exports/core.d.ts +0 -228
- package/lib/exports/core.js +0 -39
- package/lib/exports/database.d.ts +0 -47
- package/lib/exports/database.js +0 -17
- package/lib/exports/types.d.ts +0 -10
- package/lib/exports/types.js +0 -11
- package/lib/index.d.ts +0 -2
- package/lib/web.config.d.ts +0 -5
- package/lib/web.config.js +0 -30
|
@@ -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 @@
|
|
|
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,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,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,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-X75DW4KI.js";
|
|
11
|
+
import "../../../chunk-3CNBOOKY.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-W4DBT7AD.js";
|
|
23
|
+
import "../../../chunk-Z5I6A73Y.js";
|
|
24
|
+
import "../../../chunk-7WESXE4X.js";
|
|
25
|
+
import "../../../chunk-KN5SHBVI.js";
|
|
26
|
+
import "../../../chunk-QMSYS77M.js";
|
|
27
|
+
import "../../../chunk-SEWEEPJN.js";
|
|
28
|
+
import "../../../chunk-5NA7ZPDS.js";
|
|
29
|
+
import "../../../chunk-G547WVGV.js";
|
|
30
|
+
import "../../../chunk-EMAUATE3.js";
|
|
31
|
+
import "../../../chunk-Y3J3J5B2.js";
|
|
32
|
+
import "../../../chunk-7KEG6SDX.js";
|
|
33
|
+
import "../../../chunk-FBWSEBAW.js";
|
|
34
|
+
import "../../../chunk-JVJQKRJ4.js";
|
|
35
|
+
import "../../../chunk-LYTNREAI.js";
|
|
36
|
+
import "../../../chunk-K5U2O3HH.js";
|
|
37
|
+
import "../../../chunk-I7XZONDN.js";
|
|
38
|
+
import "../../../chunk-SHW6FHIB.js";
|
|
39
|
+
import "../../../chunk-JRH4JC43.js";
|
|
40
|
+
import "../../../chunk-ARLTXJFJ.js";
|
|
41
|
+
import "../../../chunk-LG34FPBI.js";
|
|
42
|
+
import "../../../chunk-HVYNK5BN.js";
|
|
43
|
+
import "../../../chunk-2DHTKQ34.js";
|
|
44
|
+
import "../../../chunk-SHLPPEAY.js";
|
|
45
|
+
import "../../../chunk-7YZHHLS5.js";
|
|
46
|
+
import "../../../chunk-6PIXUPZ6.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
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const MysApp: Readonly<{
|
|
2
|
+
version: {
|
|
3
|
+
cn: string;
|
|
4
|
+
os: string;
|
|
5
|
+
};
|
|
6
|
+
appId: 2;
|
|
7
|
+
salt: {
|
|
8
|
+
os: string;
|
|
9
|
+
'4X': string;
|
|
10
|
+
'6X': string;
|
|
11
|
+
K2: string;
|
|
12
|
+
LK2: string;
|
|
13
|
+
PROD: string;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
declare const MysHosts: Readonly<{
|
|
17
|
+
bbs: {
|
|
18
|
+
mihoyo: string;
|
|
19
|
+
hoyolab: string;
|
|
20
|
+
};
|
|
21
|
+
web: {
|
|
22
|
+
mihoyo: string;
|
|
23
|
+
hoyolab: string;
|
|
24
|
+
/** new web host */
|
|
25
|
+
miyoushe: string;
|
|
26
|
+
};
|
|
27
|
+
static: "https://api-takumi-static.mihoyo.com/";
|
|
28
|
+
record: {
|
|
29
|
+
mihoyo: string;
|
|
30
|
+
hoyolab: string;
|
|
31
|
+
};
|
|
32
|
+
hk4e: {
|
|
33
|
+
mihoyo: string;
|
|
34
|
+
hoyolab: string;
|
|
35
|
+
};
|
|
36
|
+
hk4eGacha: "https://public-operation-hk4e.mihoyo.com/";
|
|
37
|
+
hk4eSdk: "https://hk4e-sdk.mihoyo.com/";
|
|
38
|
+
napGacha: {
|
|
39
|
+
mihoyo: string;
|
|
40
|
+
hoyolab: string;
|
|
41
|
+
};
|
|
42
|
+
publicData: {
|
|
43
|
+
mihoyo: string;
|
|
44
|
+
hoyolab: string;
|
|
45
|
+
};
|
|
46
|
+
napAct: {
|
|
47
|
+
mihoyo: string;
|
|
48
|
+
hoyolab: string;
|
|
49
|
+
};
|
|
50
|
+
passport: "https://passport-api.mihoyo.com/";
|
|
51
|
+
hk4eSg: {
|
|
52
|
+
hoyolab: string;
|
|
53
|
+
};
|
|
54
|
+
publicSg: {
|
|
55
|
+
hoyolab: string;
|
|
56
|
+
hoyoverse: string;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
|
|
60
|
+
export { MysApp, MysHosts };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MysApp,
|
|
3
|
+
MysHosts
|
|
4
|
+
} from "../../../chunk-G5W5WAY5.js";
|
|
5
|
+
import "../../../chunk-W4DBT7AD.js";
|
|
6
|
+
import "../../../chunk-Z5I6A73Y.js";
|
|
7
|
+
import "../../../chunk-7WESXE4X.js";
|
|
8
|
+
import "../../../chunk-KN5SHBVI.js";
|
|
9
|
+
import "../../../chunk-QMSYS77M.js";
|
|
10
|
+
import "../../../chunk-SEWEEPJN.js";
|
|
11
|
+
import "../../../chunk-5NA7ZPDS.js";
|
|
12
|
+
import "../../../chunk-G547WVGV.js";
|
|
13
|
+
import "../../../chunk-EMAUATE3.js";
|
|
14
|
+
import "../../../chunk-Y3J3J5B2.js";
|
|
15
|
+
import "../../../chunk-7KEG6SDX.js";
|
|
16
|
+
import "../../../chunk-FBWSEBAW.js";
|
|
17
|
+
import "../../../chunk-JVJQKRJ4.js";
|
|
18
|
+
import "../../../chunk-LYTNREAI.js";
|
|
19
|
+
import "../../../chunk-K5U2O3HH.js";
|
|
20
|
+
import "../../../chunk-I7XZONDN.js";
|
|
21
|
+
import "../../../chunk-SHW6FHIB.js";
|
|
22
|
+
import "../../../chunk-JRH4JC43.js";
|
|
23
|
+
import "../../../chunk-ARLTXJFJ.js";
|
|
24
|
+
import "../../../chunk-LG34FPBI.js";
|
|
25
|
+
import "../../../chunk-HVYNK5BN.js";
|
|
26
|
+
import "../../../chunk-SHLPPEAY.js";
|
|
27
|
+
import "../../../chunk-MLKGABMK.js";
|
|
28
|
+
export {
|
|
29
|
+
MysApp,
|
|
30
|
+
MysHosts
|
|
31
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DefineApi
|
|
3
|
+
} from "../../../chunk-X75DW4KI.js";
|
|
4
|
+
import "../../../chunk-3CNBOOKY.js";
|
|
5
|
+
import "../../../chunk-3BIQN6QA.js";
|
|
6
|
+
import "../../../chunk-G5W5WAY5.js";
|
|
7
|
+
import "../../../chunk-7VAWV6ZE.js";
|
|
8
|
+
import "../../../chunk-LJSDSOY6.js";
|
|
9
|
+
import "../../../chunk-CFS2WFOO.js";
|
|
10
|
+
import "../../../chunk-MWYDWDR4.js";
|
|
11
|
+
import "../../../chunk-FOAQZIZ2.js";
|
|
12
|
+
import "../../../chunk-IVZICDGW.js";
|
|
13
|
+
import "../../../chunk-XQWTJIT4.js";
|
|
14
|
+
import "../../../chunk-7SZX3RBZ.js";
|
|
15
|
+
import "../../../chunk-W4DBT7AD.js";
|
|
16
|
+
import "../../../chunk-Z5I6A73Y.js";
|
|
17
|
+
import "../../../chunk-7WESXE4X.js";
|
|
18
|
+
import "../../../chunk-KN5SHBVI.js";
|
|
19
|
+
import "../../../chunk-QMSYS77M.js";
|
|
20
|
+
import "../../../chunk-SEWEEPJN.js";
|
|
21
|
+
import "../../../chunk-5NA7ZPDS.js";
|
|
22
|
+
import "../../../chunk-G547WVGV.js";
|
|
23
|
+
import "../../../chunk-EMAUATE3.js";
|
|
24
|
+
import "../../../chunk-Y3J3J5B2.js";
|
|
25
|
+
import "../../../chunk-7KEG6SDX.js";
|
|
26
|
+
import "../../../chunk-FBWSEBAW.js";
|
|
27
|
+
import "../../../chunk-JVJQKRJ4.js";
|
|
28
|
+
import "../../../chunk-LYTNREAI.js";
|
|
29
|
+
import "../../../chunk-K5U2O3HH.js";
|
|
30
|
+
import "../../../chunk-I7XZONDN.js";
|
|
31
|
+
import "../../../chunk-SHW6FHIB.js";
|
|
32
|
+
import "../../../chunk-JRH4JC43.js";
|
|
33
|
+
import "../../../chunk-ARLTXJFJ.js";
|
|
34
|
+
import "../../../chunk-LG34FPBI.js";
|
|
35
|
+
import "../../../chunk-HVYNK5BN.js";
|
|
36
|
+
import "../../../chunk-2DHTKQ34.js";
|
|
37
|
+
import "../../../chunk-SHLPPEAY.js";
|
|
38
|
+
import "../../../chunk-7YZHHLS5.js";
|
|
39
|
+
import "../../../chunk-6PIXUPZ6.js";
|
|
40
|
+
import "../../../chunk-MLKGABMK.js";
|
|
41
|
+
export {
|
|
42
|
+
DefineApi
|
|
43
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { A as ApiInfoFn, B as BaseMysRes, a as BaseltuidInfo, b as DefineApi, D as DeviceInfoType, R as RequestResult, U as UidInfo } from '../../../define-BWuQ7acM.js';
|
|
2
|
+
export { fetchQRcode, getCookieAccountInfoByGameToken, getCookieTokenBySToken, getDeviceFp, getTokenByGameToken, getUserFullInfo, getUserGameRolesByCookie, queryQRcode } from './apis.js';
|
|
3
|
+
export { MysApp, MysHosts } from './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 '../../../index-DEEWbZ0V.js';
|
|
9
|
+
import '../../database/types/tables/mysUserInfo.js';
|
|
10
|
+
import '../../database/types/dbs/base.js';
|
|
11
|
+
import 'sequelize';
|