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.
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 +181 -125
  4. package/lib/apps/MysDevice.d.ts +5 -0
  5. package/lib/apps/MysDevice.js +101 -0
  6. package/lib/apps/UIDManage.d.ts +10 -0
  7. package/lib/apps/UIDManage.js +52 -0
  8. package/lib/array-CZDr9qst.d.ts +62 -0
  9. package/lib/chunk-2DHTKQ34.js +0 -0
  10. package/lib/chunk-3BIQN6QA.js +27 -0
  11. package/lib/chunk-3CNBOOKY.js +31 -0
  12. package/lib/chunk-5NA7ZPDS.js +54 -0
  13. package/lib/chunk-6PIXUPZ6.js +82 -0
  14. package/lib/chunk-7KEG6SDX.js +0 -0
  15. package/lib/chunk-7SZX3RBZ.js +0 -0
  16. package/lib/chunk-7VAWV6ZE.js +0 -0
  17. package/lib/chunk-7WESXE4X.js +29 -0
  18. package/lib/chunk-7YZHHLS5.js +130 -0
  19. package/lib/chunk-ARLTXJFJ.js +0 -0
  20. package/lib/chunk-CFS2WFOO.js +0 -0
  21. package/lib/chunk-EMAUATE3.js +217 -0
  22. package/lib/chunk-FBWSEBAW.js +0 -0
  23. package/lib/chunk-FOAQZIZ2.js +0 -0
  24. package/lib/chunk-G547WVGV.js +73 -0
  25. package/lib/chunk-G5W5WAY5.js +64 -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-JBGXPVO2.js +179 -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-QMSYS77M.js +38 -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-W4DBT7AD.js +0 -0
  43. package/lib/chunk-X75DW4KI.js +510 -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 -16
  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/config/config.json +0 -3
  153. package/lib/app.d.ts +0 -2
  154. package/lib/base-B1BvQ4ol.d.ts +0 -99
  155. package/lib/chunk-4JTLXC2G.js +0 -519
  156. package/lib/chunk-7QISGXVH.js +0 -347
  157. package/lib/chunk-JIO4GOQA.js +0 -31
  158. package/lib/database-BDHrI6Vm.d.ts +0 -5
  159. package/lib/define-CrfHwHnK.d.ts +0 -163
  160. package/lib/exports/core.d.ts +0 -228
  161. package/lib/exports/core.js +0 -39
  162. package/lib/exports/database.d.ts +0 -47
  163. package/lib/exports/database.js +0 -17
  164. package/lib/exports/types.d.ts +0 -10
  165. package/lib/exports/types.js +0 -11
  166. package/lib/index.d.ts +0 -2
  167. package/lib/web.config.d.ts +0 -5
  168. package/lib/web.config.js +0 -30
@@ -0,0 +1,131 @@
1
+ import { MysAccountType } from './exports/database/types/tables/mysAccountInfo.js';
2
+ import { SendMessage } from 'node-karin';
3
+ import { AxiosRequestConfig, AxiosResponse } from 'node-karin/axios';
4
+ import { MysDeviceInfoDatabaseBaseType, MysDeviceInfoDatabaseIdFpType } from './exports/database/types/tables/mysDeviceInfo.js';
5
+ import { MysApp } from './exports/mys/api/app.js';
6
+
7
+ declare class DefineApi<R extends BaseMysRes & Record<string, any> | null = null, D extends Record<string, any> | null = null, U extends Record<string, any> | null = null> {
8
+ #private;
9
+ UserInfo: U;
10
+ DeviceInfo: MysDeviceInfoDatabaseBaseType & MysDeviceInfoDatabaseIdFpType & {
11
+ /** @description 重要参数 */
12
+ brand: string;
13
+ display: string;
14
+ };
15
+ constructor(apiInfo: ApiInfoFn<R, D, U>);
16
+ get isHoyolab(): boolean;
17
+ init(userInfo: U): {
18
+ request: (data: D) => Promise<RequestResult<R>>;
19
+ requestCache: (key: string, seconds: number, data: D) => Promise<RequestResult<R>>;
20
+ };
21
+ /** @description 使用CookieHeaders等需要device进行请求时使用 */
22
+ initDevice(userInfo: U, deviceFp?: boolean): Promise<{
23
+ request: (data: D) => Promise<RequestResult<R>>;
24
+ requestCache: (key: string, seconds: number, data: D) => Promise<RequestResult<R>>;
25
+ }>;
26
+ getDS1(saltKey: keyof typeof MysApp.salt, query?: string, body?: string): string;
27
+ getDS2(saltKey: keyof typeof MysApp.salt, query?: string, body?: string): string;
28
+ NoHeaders: (options?: {
29
+ query?: string;
30
+ body?: any;
31
+ }) => {};
32
+ BaseCnHeaders: () => {
33
+ 'x-rpc-app_version': string;
34
+ 'x-rpc-client_type': string;
35
+ 'x-rpc-device_id': string;
36
+ 'User-Agent': string;
37
+ Referer: string;
38
+ };
39
+ BaseOsHeaders: () => {
40
+ 'x-rpc-app_version': string;
41
+ 'x-rpc-client_type': string;
42
+ 'x-rpc-language': string;
43
+ };
44
+ PassportHeaders: (options?: {
45
+ query?: string;
46
+ body?: any;
47
+ }) => {
48
+ 'x-rpc-app_version': string;
49
+ 'x-rpc-game_biz': string;
50
+ 'x-rpc-client_type': string;
51
+ 'User-Agent': string;
52
+ 'x-rpc-app_id': string;
53
+ DS: string;
54
+ };
55
+ CookieHeaders: (options?: {
56
+ query?: string;
57
+ body?: any;
58
+ }) => {
59
+ 'x-rpc-app_version': string;
60
+ 'x-rpc-client_type': string;
61
+ 'x-rpc-language': string;
62
+ Cookie: any;
63
+ } | {
64
+ 'x-rpc-app_version': string;
65
+ 'x-rpc-client_type': string;
66
+ 'x-rpc-device_id': string;
67
+ 'User-Agent': string;
68
+ Referer: string;
69
+ Cookie: any;
70
+ };
71
+ OkHttpHeaders: (options?: {
72
+ query?: string;
73
+ body?: any;
74
+ }) => {
75
+ 'User-Agent': string;
76
+ Connection: string;
77
+ 'Accept-Encoding': string;
78
+ 'Content-Type': string;
79
+ };
80
+ }
81
+
82
+ type RequestResult<R> = {
83
+ data: R;
84
+ check: () => Promise<RequestResult<R>>;
85
+ error: SendMessage[];
86
+ };
87
+ interface BaseMysRes {
88
+ retcode: number;
89
+ message: string;
90
+ }
91
+ type ApiInfoFn<
92
+ /** @description 请求参数 */
93
+ R extends BaseMysRes & Record<string, any> | null = null,
94
+ /** @description 响应数据 */
95
+ D extends Record<string, any> | null = null, U extends Record<string, any> | null = null> = (self: DefineApi<R, D, U>, data: D) => {
96
+ Url: URL;
97
+ Body?: any;
98
+ Method: 'GET' | 'POST';
99
+ Options?: Omit<AxiosRequestConfig, 'url' | 'method' | 'data' | 'headers'>;
100
+ HeaderFn: () => Record<string, string> | Promise<Record<string, string>>;
101
+ /** @description 对响应数据进行处理 */
102
+ Result?: (response: AxiosResponse) => Promise<{
103
+ data: R;
104
+ row: any;
105
+ }>;
106
+ };
107
+ interface BaseltuidInfo {
108
+ ltuid: string;
109
+ type: MysAccountType;
110
+ /** @description 未绑定则使用deviceList中首个设备 */
111
+ deviceMd5: string;
112
+ }
113
+ interface UidInfo extends BaseltuidInfo {
114
+ uid: string;
115
+ cookie: string;
116
+ stoken: string;
117
+ userId: string;
118
+ owner: boolean;
119
+ }
120
+ interface DeviceInfoType {
121
+ id: string;
122
+ name: string;
123
+ board: string;
124
+ model: string;
125
+ oaid: string;
126
+ androidVersion: string;
127
+ fingerprint: string;
128
+ product: string;
129
+ }
130
+
131
+ export { type ApiInfoFn as A, type BaseMysRes as B, type DeviceInfoType as D, type RequestResult as R, type UidInfo as U, type BaseltuidInfo as a, DefineApi as b };
package/lib/dir.d.ts CHANGED
@@ -2,26 +2,24 @@
2
2
  * 插件目录信息
3
3
  */
4
4
  declare const dir: {
5
- /** 根目录绝对路径 */
5
+ /** @description 根目录绝对路径 */
6
6
  pluginDir: string;
7
- /** 插件目录名称 */
7
+ /** @description 插件目录名称 */
8
8
  pluginName: string;
9
- /** package.json */
9
+ /** @description package.json */
10
10
  pkg: any;
11
- /** 插件版本 package.json 的 version */
11
+ /** @description 插件版本 package.json 的 version */
12
12
  readonly version: any;
13
- /** 插件名称 package.json 的 name */
13
+ /** @description 插件名称 package.json 的 name */
14
14
  readonly name: any;
15
- /** 插件默认配置目录 */
16
- readonly defConfigDir: string;
17
- /** 在`@karinjs`中的绝对路径 */
15
+ /** @description 在`@karinjs`中的绝对路径 */
18
16
  readonly karinPath: string;
19
- /** 插件配置目录 `@karinjs/karin-plugin-xxx/config` */
20
- readonly ConfigDir: string;
21
- /** 插件数据目录 `@karinjs/karin-plugin-xxx/data` */
17
+ /** @description 插件数据目录 `@karinjs/karin-plugin-xxx/data` */
22
18
  readonly DataDir: string;
23
- /** 插件资源目录 `@karinjs/karin-plugin-xxx/resources` */
24
- readonly defResourcesDir: string;
19
+ /** @description 插件配置目录 `@karinjs/karin-plugin-xxx/config` */
20
+ readonly ConfigDir: string;
21
+ /** @description 插件资源目录 `@karinjs/karin-plugin-xxx/resources` */
22
+ readonly ResourcesDir: string;
25
23
  };
26
24
 
27
25
  export { dir };
package/lib/dir.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dir
3
- } from "./chunk-JML6VYXN.js";
3
+ } from "./chunk-SHLPPEAY.js";
4
4
  import "./chunk-MLKGABMK.js";
5
5
  export {
6
6
  dir
@@ -0,0 +1 @@
1
+ export { E as EnhancedArray } from '../../array-CZDr9qst.js';
@@ -0,0 +1,7 @@
1
+ import {
2
+ EnhancedArray
3
+ } from "../../chunk-6PIXUPZ6.js";
4
+ import "../../chunk-MLKGABMK.js";
5
+ export {
6
+ EnhancedArray
7
+ };
@@ -0,0 +1 @@
1
+ export { C as Config } from '../../array-CZDr9qst.js';
@@ -0,0 +1,8 @@
1
+ import {
2
+ Config
3
+ } from "../../chunk-7YZHHLS5.js";
4
+ import "../../chunk-6PIXUPZ6.js";
5
+ import "../../chunk-MLKGABMK.js";
6
+ export {
7
+ Config
8
+ };
@@ -0,0 +1,2 @@
1
+ export { C as Config, E as EnhancedArray } from '../../array-CZDr9qst.js';
2
+ export { ConfigIgnore, ConfigIgnoreArray } from './types/config.js';
@@ -0,0 +1,14 @@
1
+ import "../../chunk-XQWTJIT4.js";
2
+ import "../../chunk-7SZX3RBZ.js";
3
+ import "../../chunk-2DHTKQ34.js";
4
+ import {
5
+ Config
6
+ } from "../../chunk-7YZHHLS5.js";
7
+ import {
8
+ EnhancedArray
9
+ } from "../../chunk-6PIXUPZ6.js";
10
+ import "../../chunk-MLKGABMK.js";
11
+ export {
12
+ Config,
13
+ EnhancedArray
14
+ };
@@ -0,0 +1,12 @@
1
+ interface ConfigIgnore<T> {
2
+ defaultConfig: T;
3
+ }
4
+ interface ConfigIgnoreArray<T> {
5
+ defaultConfig: T[];
6
+ defaultConfigItem: {
7
+ defaultConfig: T;
8
+ required?: T extends Record<string, any> ? (keyof T)[] : never;
9
+ };
10
+ }
11
+
12
+ export type { ConfigIgnore, ConfigIgnoreArray };
@@ -0,0 +1 @@
1
+ import "../../../chunk-2DHTKQ34.js";
@@ -0,0 +1 @@
1
+ export { ConfigIgnore, ConfigIgnoreArray } from './config.js';
@@ -0,0 +1,2 @@
1
+ import "../../../chunk-7SZX3RBZ.js";
2
+ import "../../../chunk-2DHTKQ34.js";
@@ -0,0 +1,30 @@
1
+ import { DatabaseFn } from './types/database.js';
2
+ import { Dialect, DatabaseClassStatic, DatabaseType, DatabaseClassInstance } from './types/dbs/base.js';
3
+ import { DataTypes, ModelAttributeColumnOptions, Model } from 'sequelize';
4
+
5
+ declare const Database: {
6
+ "__#private@#defaultDialect": Dialect;
7
+ "__#private@#DatabaseMap": Map<Dialect, {
8
+ Database: DatabaseFn;
9
+ Static: DatabaseClassStatic;
10
+ }>;
11
+ default(dialect: Dialect): void;
12
+ /** @description 添加数据库 */
13
+ Add(Db: DatabaseFn, Static: DatabaseClassStatic): Promise<void>;
14
+ get Db(): {
15
+ Database: DatabaseFn;
16
+ Static: DatabaseClassStatic;
17
+ };
18
+ get details(): {
19
+ dialect: Dialect;
20
+ desc: string;
21
+ }[];
22
+ /** @description 获取当前使用的数据库 */
23
+ get<T extends Record<string, any>, D extends DatabaseType>(): DatabaseClassInstance<T, D>;
24
+ get PkColumn(): (type: keyof typeof DataTypes, option?: Partial<ModelAttributeColumnOptions<Model>>) => ModelAttributeColumnOptions<Model>;
25
+ get Column(): DatabaseClassStatic["Column"];
26
+ get ArrayColumn(): DatabaseClassStatic["ArrayColumn"];
27
+ get JsonColumn(): DatabaseClassStatic["JsonColumn"];
28
+ };
29
+
30
+ export { Database };
@@ -0,0 +1,18 @@
1
+ import {
2
+ Database
3
+ } from "../../chunk-G547WVGV.js";
4
+ import "../../chunk-EMAUATE3.js";
5
+ import "../../chunk-Y3J3J5B2.js";
6
+ import "../../chunk-7KEG6SDX.js";
7
+ import "../../chunk-FBWSEBAW.js";
8
+ import "../../chunk-JVJQKRJ4.js";
9
+ import "../../chunk-LYTNREAI.js";
10
+ import "../../chunk-K5U2O3HH.js";
11
+ import "../../chunk-I7XZONDN.js";
12
+ import "../../chunk-SHW6FHIB.js";
13
+ import "../../chunk-JRH4JC43.js";
14
+ import "../../chunk-SHLPPEAY.js";
15
+ import "../../chunk-MLKGABMK.js";
16
+ export {
17
+ Database
18
+ };
@@ -0,0 +1,23 @@
1
+ import { ModelStatic, Model } from 'sequelize';
2
+ import { DatabaseType, ModelAttributes, DatabaseReturn } from '../types/dbs/base.js';
3
+
4
+ declare class DbBase<T extends Record<string, any>, D extends DatabaseType> {
5
+ model: ModelStatic<Model>;
6
+ databasePath: string;
7
+ databaseType: D;
8
+ modelName: string;
9
+ modelSchema: ModelAttributes<Model>;
10
+ initBase(DataDir: string, modelName: string, modelSchema: ModelAttributes<Model>, type: D): void;
11
+ schemaToJSON(pk: string): T;
12
+ userPath(pk: string): string;
13
+ readSync(path: string, pk: string): DatabaseReturn<T>[DatabaseType.File];
14
+ readDirSync(pk: string): DatabaseReturn<T>[DatabaseType.Dir];
15
+ writeDirSync(pk: string, data: Record<string, any>): boolean;
16
+ saveFile(pk: string): (data: T) => Promise<DatabaseReturn<T>[DatabaseType.File]>;
17
+ saveDir(pk: string): (data: T) => Promise<DatabaseReturn<T>[DatabaseType.Dir]>;
18
+ destroyPath(pk: string): Promise<boolean>;
19
+ saveSql(model: Model<any, any>, pk: string): (data: Partial<T>) => Promise<DatabaseReturn<T>[DatabaseType.Db]>;
20
+ destroySql(pk: string): Promise<boolean>;
21
+ }
22
+
23
+ export { DbBase };
@@ -0,0 +1,15 @@
1
+ import {
2
+ DbBase
3
+ } from "../../../chunk-Y3J3J5B2.js";
4
+ import "../../../chunk-7KEG6SDX.js";
5
+ import "../../../chunk-FBWSEBAW.js";
6
+ import "../../../chunk-JVJQKRJ4.js";
7
+ import "../../../chunk-LYTNREAI.js";
8
+ import "../../../chunk-K5U2O3HH.js";
9
+ import "../../../chunk-I7XZONDN.js";
10
+ import "../../../chunk-SHW6FHIB.js";
11
+ import "../../../chunk-JRH4JC43.js";
12
+ import "../../../chunk-MLKGABMK.js";
13
+ export {
14
+ DbBase
15
+ };
@@ -0,0 +1,4 @@
1
+ export { DbBase } from './base.js';
2
+ export { Table } from './table.js';
3
+ import 'sequelize';
4
+ import '../types/dbs/base.js';
@@ -0,0 +1,23 @@
1
+ import "../../../chunk-SEWEEPJN.js";
2
+ import {
3
+ Table
4
+ } from "../../../chunk-5NA7ZPDS.js";
5
+ import "../../../chunk-G547WVGV.js";
6
+ import "../../../chunk-EMAUATE3.js";
7
+ import {
8
+ DbBase
9
+ } from "../../../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
+ DbBase,
22
+ Table
23
+ };
@@ -0,0 +1,23 @@
1
+ import { Model, DataTypes, ModelAttributeColumnOptions } from 'sequelize';
2
+ import { DatabaseType, DatabaseClassInstance, Dialect, ModelAttributes, DatabaseReturn, DatabaseArray } from '../types/dbs/base.js';
3
+ import { DbBase } from './base.js';
4
+
5
+ declare class Sqlite3<T extends Record<string, any>, D extends DatabaseType> extends DbBase<T, D> implements DatabaseClassInstance<T, D> {
6
+ dialect: Dialect;
7
+ check(): Promise<boolean>;
8
+ init(DataDir: string, modelName: string, modelSchema: ModelAttributes<Model>, type: D): Promise<DatabaseClassInstance<T, D>>;
9
+ findByPk(pk: string, create: true): Promise<DatabaseReturn<T>[D]>;
10
+ findByPk(pk: string, create?: false): Promise<DatabaseReturn<T>[D] | undefined>;
11
+ findAllByPks(pks: string[]): Promise<DatabaseReturn<T>[D][]>;
12
+ findAll(excludePks?: string[]): Promise<DatabaseReturn<T>[D][]>;
13
+ destroy(pk: string): Promise<boolean>;
14
+ }
15
+ declare const Sqlite3Static: {
16
+ dialect: Dialect;
17
+ description: string;
18
+ Column<T>(type: keyof typeof DataTypes, def: T, option?: Partial<ModelAttributeColumnOptions<Model>>): ModelAttributeColumnOptions<Model>;
19
+ ArrayColumn<T>(key: string, fn?: (data: DatabaseArray<T>) => T[]): ModelAttributeColumnOptions<Model>;
20
+ JsonColumn<T>(key: string, def: T): ModelAttributeColumnOptions<Model>;
21
+ };
22
+
23
+ export { Sqlite3, Sqlite3Static };
@@ -0,0 +1,19 @@
1
+ import {
2
+ Sqlite3,
3
+ Sqlite3Static
4
+ } from "../../../chunk-EMAUATE3.js";
5
+ import "../../../chunk-Y3J3J5B2.js";
6
+ import "../../../chunk-7KEG6SDX.js";
7
+ import "../../../chunk-FBWSEBAW.js";
8
+ import "../../../chunk-JVJQKRJ4.js";
9
+ import "../../../chunk-LYTNREAI.js";
10
+ import "../../../chunk-K5U2O3HH.js";
11
+ import "../../../chunk-I7XZONDN.js";
12
+ import "../../../chunk-SHW6FHIB.js";
13
+ import "../../../chunk-JRH4JC43.js";
14
+ import "../../../chunk-SHLPPEAY.js";
15
+ import "../../../chunk-MLKGABMK.js";
16
+ export {
17
+ Sqlite3,
18
+ Sqlite3Static
19
+ };
@@ -0,0 +1,13 @@
1
+ import { ModelAttributeColumnOptions, Model } from 'sequelize';
2
+ import { DatabaseType, DatabaseClassInstance } from '../types/dbs/base.js';
3
+
4
+ declare class Table<TableType extends Record<string, any>, DBType extends DatabaseType, ExtraTableType extends Record<string, any>> {
5
+ #private;
6
+ initCache: DatabaseClassInstance<TableType, DBType>;
7
+ modelSchema: Record<keyof TableType, ModelAttributeColumnOptions<Model>>;
8
+ constructor(DataDir: string, tableName: string, type: DBType);
9
+ init(Schema: Record<keyof TableType, ModelAttributeColumnOptions<Model>>): Promise<() => Promise<DatabaseClassInstance<TableType, DBType>>>;
10
+ addSchem<newTableType extends ExtraTableType>(newSchema: Record<keyof newTableType, ModelAttributeColumnOptions<Model>>): Promise<() => Promise<DatabaseClassInstance<TableType & newTableType, DBType>>>;
11
+ }
12
+
13
+ export { Table };
@@ -0,0 +1,19 @@
1
+ import {
2
+ Table
3
+ } from "../../../chunk-5NA7ZPDS.js";
4
+ import "../../../chunk-G547WVGV.js";
5
+ import "../../../chunk-EMAUATE3.js";
6
+ import "../../../chunk-Y3J3J5B2.js";
7
+ import "../../../chunk-7KEG6SDX.js";
8
+ import "../../../chunk-FBWSEBAW.js";
9
+ import "../../../chunk-JVJQKRJ4.js";
10
+ import "../../../chunk-LYTNREAI.js";
11
+ import "../../../chunk-K5U2O3HH.js";
12
+ import "../../../chunk-I7XZONDN.js";
13
+ import "../../../chunk-SHW6FHIB.js";
14
+ import "../../../chunk-JRH4JC43.js";
15
+ import "../../../chunk-SHLPPEAY.js";
16
+ import "../../../chunk-MLKGABMK.js";
17
+ export {
18
+ Table
19
+ };
@@ -0,0 +1,12 @@
1
+ export { Database } from './database.js';
2
+ export { DbBase } from './dbs/base.js';
3
+ export { Table } from './dbs/table.js';
4
+ export { MysAccountInfoDB, MysAccountInfoTable } from './tables/mysAccountInfo.js';
5
+ export { MysDeviceInfoDB, MysDeviceInfoTable } from './tables/mysDeviceInfo.js';
6
+ export { MysUserInfoDB, MysUserInfoTable } from './tables/mysUserInfo.js';
7
+ export { DatabaseFn } from './types/database.js';
8
+ export { DatabaseArray, DatabaseClassInstance, DatabaseClassStatic, DatabaseReturn, DatabaseType, Dialect, ModelAttributes } from './types/dbs/base.js';
9
+ export { MysAccountInfoTableType, MysAccountType } from './types/tables/mysAccountInfo.js';
10
+ export { MysDeviceInfoDatabaseBaseType, MysDeviceInfoDatabaseIdFpType, MysDeviceInfoTableType } from './types/tables/mysDeviceInfo.js';
11
+ export { BaseGameUIDInfoTableType, BaseUserInfoTableType, UidPermission } from './types/tables/mysUserInfo.js';
12
+ import 'sequelize';
@@ -0,0 +1,62 @@
1
+ import "../../chunk-W4DBT7AD.js";
2
+ import "../../chunk-Z5I6A73Y.js";
3
+ import {
4
+ MysUserInfoDB,
5
+ MysUserInfoTable
6
+ } from "../../chunk-7WESXE4X.js";
7
+ import {
8
+ MysAccountInfoDB,
9
+ MysAccountInfoTable
10
+ } from "../../chunk-KN5SHBVI.js";
11
+ import {
12
+ MysDeviceInfoDB,
13
+ MysDeviceInfoTable
14
+ } from "../../chunk-QMSYS77M.js";
15
+ import "../../chunk-SEWEEPJN.js";
16
+ import {
17
+ Table
18
+ } from "../../chunk-5NA7ZPDS.js";
19
+ import {
20
+ Database
21
+ } from "../../chunk-G547WVGV.js";
22
+ import "../../chunk-EMAUATE3.js";
23
+ import {
24
+ DbBase
25
+ } from "../../chunk-Y3J3J5B2.js";
26
+ import "../../chunk-7KEG6SDX.js";
27
+ import "../../chunk-FBWSEBAW.js";
28
+ import {
29
+ DatabaseArray,
30
+ DatabaseType,
31
+ Dialect
32
+ } from "../../chunk-JVJQKRJ4.js";
33
+ import "../../chunk-LYTNREAI.js";
34
+ import "../../chunk-K5U2O3HH.js";
35
+ import {
36
+ UidPermission
37
+ } from "../../chunk-I7XZONDN.js";
38
+ import {
39
+ MysAccountType
40
+ } from "../../chunk-SHW6FHIB.js";
41
+ import "../../chunk-JRH4JC43.js";
42
+ import "../../chunk-ARLTXJFJ.js";
43
+ import "../../chunk-LG34FPBI.js";
44
+ import "../../chunk-HVYNK5BN.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
+ MysUserInfoDB,
4
+ MysUserInfoTable
5
+ } from "../../../chunk-7WESXE4X.js";
6
+ import {
7
+ MysAccountInfoDB,
8
+ MysAccountInfoTable
9
+ } from "../../../chunk-KN5SHBVI.js";
10
+ import {
11
+ MysDeviceInfoDB,
12
+ MysDeviceInfoTable
13
+ } from "../../../chunk-QMSYS77M.js";
14
+ import "../../../chunk-SEWEEPJN.js";
15
+ import "../../../chunk-5NA7ZPDS.js";
16
+ import "../../../chunk-G547WVGV.js";
17
+ import "../../../chunk-EMAUATE3.js";
18
+ import "../../../chunk-Y3J3J5B2.js";
19
+ import "../../../chunk-7KEG6SDX.js";
20
+ import "../../../chunk-FBWSEBAW.js";
21
+ import "../../../chunk-JVJQKRJ4.js";
22
+ import "../../../chunk-LYTNREAI.js";
23
+ import "../../../chunk-K5U2O3HH.js";
24
+ import "../../../chunk-I7XZONDN.js";
25
+ import "../../../chunk-SHW6FHIB.js";
26
+ import "../../../chunk-JRH4JC43.js";
27
+ import "../../../chunk-ARLTXJFJ.js";
28
+ import "../../../chunk-LG34FPBI.js";
29
+ import "../../../chunk-HVYNK5BN.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-QMSYS77M.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-ARLTXJFJ.js";
19
+ import "../../../chunk-LG34FPBI.js";
20
+ import "../../../chunk-HVYNK5BN.js";
21
+ import "../../../chunk-SHLPPEAY.js";
22
+ import "../../../chunk-MLKGABMK.js";
23
+ export {
24
+ MysDeviceInfoDB,
25
+ MysDeviceInfoTable
26
+ };