sa2kit 1.6.8 → 1.6.10

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 (125) hide show
  1. package/dist/calendar/index.js +10 -8
  2. package/dist/calendar/index.js.map +1 -1
  3. package/dist/calendar/index.mjs +3 -1
  4. package/dist/calendar/index.mjs.map +1 -1
  5. package/dist/calendar/routes/index.js +21 -21
  6. package/dist/calendar/routes/index.mjs +1 -1
  7. package/dist/calendar/server.js +13 -13
  8. package/dist/calendar/server.mjs +2 -2
  9. package/dist/{chunk-VHU2YGRQ.mjs → chunk-4FOBBWXW.mjs} +25 -11
  10. package/dist/chunk-4FOBBWXW.mjs.map +1 -0
  11. package/dist/{chunk-ZDRBMSTS.js → chunk-G6WRJ2H2.js} +25 -11
  12. package/dist/chunk-G6WRJ2H2.js.map +1 -0
  13. package/dist/{chunk-6WXOA4BE.mjs → chunk-GVVS4IMM.mjs} +2 -2
  14. package/dist/chunk-GVVS4IMM.mjs.map +1 -0
  15. package/dist/{chunk-AXP7KROR.js → chunk-WC5QFO3T.js} +2 -2
  16. package/dist/chunk-WC5QFO3T.js.map +1 -0
  17. package/dist/index.js +5 -5
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +2 -2
  20. package/dist/index.mjs.map +1 -1
  21. package/package.json +41 -7
  22. package/dist/ConfigService-BxK06xP6.d.mts +0 -262
  23. package/dist/ConfigService-BxK06xP6.d.ts +0 -262
  24. package/dist/UniversalFileService-BuHN-jrR.d.ts +0 -515
  25. package/dist/UniversalFileService-CGGzYeeF.d.mts +0 -515
  26. package/dist/analytics/index.d.mts +0 -1084
  27. package/dist/analytics/index.d.ts +0 -1084
  28. package/dist/analytics/server/index.d.mts +0 -499
  29. package/dist/analytics/server/index.d.ts +0 -499
  30. package/dist/api/index.d.mts +0 -248
  31. package/dist/api/index.d.ts +0 -248
  32. package/dist/audioDetection/index.d.mts +0 -449
  33. package/dist/audioDetection/index.d.ts +0 -449
  34. package/dist/auth/client/index.d.mts +0 -153
  35. package/dist/auth/client/index.d.ts +0 -153
  36. package/dist/auth/components/index.d.mts +0 -227
  37. package/dist/auth/components/index.d.ts +0 -227
  38. package/dist/auth/hooks/index.d.mts +0 -31
  39. package/dist/auth/hooks/index.d.ts +0 -31
  40. package/dist/auth/index.d.mts +0 -40
  41. package/dist/auth/index.d.ts +0 -40
  42. package/dist/auth/middleware/index.d.mts +0 -75
  43. package/dist/auth/middleware/index.d.ts +0 -75
  44. package/dist/auth/routes/index.d.mts +0 -261
  45. package/dist/auth/routes/index.d.ts +0 -261
  46. package/dist/auth/schema/index.d.mts +0 -789
  47. package/dist/auth/schema/index.d.ts +0 -789
  48. package/dist/auth/services/index.d.mts +0 -48
  49. package/dist/auth/services/index.d.ts +0 -48
  50. package/dist/calendar/index.d.mts +0 -1197
  51. package/dist/calendar/index.d.ts +0 -1197
  52. package/dist/calendar/routes/index.d.mts +0 -118
  53. package/dist/calendar/routes/index.d.ts +0 -118
  54. package/dist/calendar/server.d.mts +0 -1184
  55. package/dist/calendar/server.d.ts +0 -1184
  56. package/dist/chunk-6WXOA4BE.mjs.map +0 -1
  57. package/dist/chunk-AXP7KROR.js.map +0 -1
  58. package/dist/chunk-VHU2YGRQ.mjs.map +0 -1
  59. package/dist/chunk-ZDRBMSTS.js.map +0 -1
  60. package/dist/config/index.d.mts +0 -64
  61. package/dist/config/index.d.ts +0 -64
  62. package/dist/config/server/index.d.mts +0 -1533
  63. package/dist/config/server/index.d.ts +0 -1533
  64. package/dist/drizzle-auth-service-Bxlovhv8.d.ts +0 -145
  65. package/dist/drizzle-auth-service-DZY2F1sv.d.mts +0 -145
  66. package/dist/drizzle-schema-BNhqj2AZ.d.mts +0 -1114
  67. package/dist/drizzle-schema-BNhqj2AZ.d.ts +0 -1114
  68. package/dist/enums-Dume-V5Y.d.mts +0 -16
  69. package/dist/enums-Dume-V5Y.d.ts +0 -16
  70. package/dist/i18n/index.d.mts +0 -417
  71. package/dist/i18n/index.d.ts +0 -417
  72. package/dist/imageCrop/index.d.mts +0 -165
  73. package/dist/imageCrop/index.d.ts +0 -165
  74. package/dist/index-DSel44Ke.d.mts +0 -93
  75. package/dist/index-DSel44Ke.d.ts +0 -93
  76. package/dist/index.d.mts +0 -693
  77. package/dist/index.d.ts +0 -693
  78. package/dist/logger/index.d.mts +0 -125
  79. package/dist/logger/index.d.ts +0 -125
  80. package/dist/mmd/admin/index.d.mts +0 -487
  81. package/dist/mmd/admin/index.d.ts +0 -487
  82. package/dist/mmd/index.d.mts +0 -599
  83. package/dist/mmd/index.d.ts +0 -599
  84. package/dist/mmd/server/index.d.mts +0 -138
  85. package/dist/mmd/server/index.d.ts +0 -138
  86. package/dist/music/index.d.mts +0 -74
  87. package/dist/music/index.d.ts +0 -74
  88. package/dist/music/server/index.d.mts +0 -1
  89. package/dist/music/server/index.d.ts +0 -1
  90. package/dist/request/index.d.mts +0 -51
  91. package/dist/request/index.d.ts +0 -51
  92. package/dist/storage/index.d.mts +0 -75
  93. package/dist/storage/index.d.ts +0 -75
  94. package/dist/testYourself/admin/index.d.mts +0 -58
  95. package/dist/testYourself/admin/index.d.ts +0 -58
  96. package/dist/testYourself/index.d.mts +0 -53
  97. package/dist/testYourself/index.d.ts +0 -53
  98. package/dist/testYourself/server/index.d.mts +0 -1029
  99. package/dist/testYourself/server/index.d.ts +0 -1029
  100. package/dist/types-B60F7EZZ.d.mts +0 -248
  101. package/dist/types-B60F7EZZ.d.ts +0 -248
  102. package/dist/types-BINlP9MK.d.mts +0 -286
  103. package/dist/types-BINlP9MK.d.ts +0 -286
  104. package/dist/types-BaZccpvk.d.mts +0 -48
  105. package/dist/types-BaZccpvk.d.ts +0 -48
  106. package/dist/types-CK4We_aI.d.mts +0 -270
  107. package/dist/types-CK4We_aI.d.ts +0 -270
  108. package/dist/types-CbTsi9CZ.d.mts +0 -31
  109. package/dist/types-CbTsi9CZ.d.ts +0 -31
  110. package/dist/types-CroexXnI.d.ts +0 -99
  111. package/dist/types-DmsXCWvm.d.mts +0 -99
  112. package/dist/types-Dt0oqeFM.d.mts +0 -70
  113. package/dist/types-zK6kDzDQ.d.ts +0 -70
  114. package/dist/universalExport/index.d.mts +0 -235
  115. package/dist/universalExport/index.d.ts +0 -235
  116. package/dist/universalExport/server/index.d.mts +0 -1270
  117. package/dist/universalExport/server/index.d.ts +0 -1270
  118. package/dist/universalFile/index.d.mts +0 -480
  119. package/dist/universalFile/index.d.ts +0 -480
  120. package/dist/universalFile/server/index.d.mts +0 -4516
  121. package/dist/universalFile/server/index.d.ts +0 -4516
  122. package/dist/useElectronStorage-Dj0rcorG.d.mts +0 -65
  123. package/dist/useElectronStorage-DwnNfIhl.d.ts +0 -65
  124. package/dist/utils/index.d.mts +0 -192
  125. package/dist/utils/index.d.ts +0 -192
@@ -1,145 +0,0 @@
1
- import { U as UserRole } from './enums-Dume-V5Y.js';
2
-
3
- /**
4
- * Auth Services - Types
5
- * 认证服务类型定义
6
- */
7
-
8
- /**
9
- * 认证服务配置
10
- */
11
- interface AuthServiceConfig {
12
- /**
13
- * Drizzle 数据库实例
14
- */
15
- db: any;
16
- /**
17
- * JWT 密钥
18
- */
19
- jwtSecret: string;
20
- /**
21
- * JWT 过期时间 (默认: '7d')
22
- */
23
- jwtExpiresIn?: string;
24
- /**
25
- * bcrypt 加密轮数 (默认: 12)
26
- */
27
- saltRounds?: number;
28
- /**
29
- * 是否在生产环境检查密钥强度 (默认: true)
30
- */
31
- checkSecretStrength?: boolean;
32
- }
33
- /**
34
- * 用户信息(返回给客户端的精简版)
35
- */
36
- interface UserInfo {
37
- id: string;
38
- email: string;
39
- username: string;
40
- role: UserRole;
41
- }
42
- /**
43
- * 认证结果
44
- */
45
- interface AuthResult {
46
- user: UserInfo;
47
- token: string;
48
- }
49
- /**
50
- * 会话信息
51
- */
52
- interface SessionInfo {
53
- id: string;
54
- userId: string;
55
- token: string;
56
- expiresAt: string;
57
- ipAddress?: string | null;
58
- userAgent?: string | null;
59
- }
60
- /**
61
- * 验证结果
62
- */
63
- interface VerifyResult {
64
- user: UserInfo;
65
- session: SessionInfo;
66
- }
67
-
68
- /**
69
- * Auth Services - Drizzle Auth Service
70
- * 基于 Drizzle ORM 的认证服务
71
- */
72
-
73
- /**
74
- * Drizzle 认证服务类
75
- *
76
- * @example
77
- * ```typescript
78
- * import { DrizzleAuthService } from '@qhr123/sa2kit/auth/services';
79
- * import { db } from './db';
80
- *
81
- * const authService = new DrizzleAuthService({
82
- * db,
83
- * jwtSecret: process.env.JWT_SECRET!,
84
- * jwtExpiresIn: '7d',
85
- * });
86
- *
87
- * // 用户注册
88
- * const result = await authService.signUp('user@example.com', 'password123', 'username');
89
- *
90
- * // 用户登录
91
- * const loginResult = await authService.signIn('user@example.com', 'password123');
92
- * ```
93
- */
94
- declare class DrizzleAuthService {
95
- private config;
96
- constructor(config: AuthServiceConfig);
97
- /**
98
- * 验证配置
99
- */
100
- private validateConfig;
101
- /**
102
- * 用户注册
103
- */
104
- signUp(email: string, password: string, username?: string, role?: UserRole): Promise<AuthResult>;
105
- /**
106
- * 用户登录
107
- */
108
- signIn(email: string, password: string): Promise<AuthResult>;
109
- /**
110
- * 验证 Token
111
- */
112
- verifyToken(token: string): Promise<VerifyResult>;
113
- /**
114
- * 创建会话
115
- */
116
- createSession(userId: string, token: string, ipAddress?: string, userAgent?: string): Promise<void>;
117
- /**
118
- * 删除会话(登出)
119
- */
120
- signOut(token: string): Promise<{
121
- success: boolean;
122
- }>;
123
- /**
124
- * 获取会话
125
- */
126
- getSession(token: string): Promise<VerifyResult | null>;
127
- /**
128
- * 检查管理员权限
129
- */
130
- requireAdmin(token: string): Promise<VerifyResult>;
131
- /**
132
- * 检查超级管理员权限
133
- */
134
- requireSuperAdmin(token: string): Promise<VerifyResult>;
135
- /**
136
- * 通过用户 ID 获取用户信息
137
- */
138
- getUserById(userId: string): Promise<UserInfo | null>;
139
- /**
140
- * 通过邮箱获取用户信息
141
- */
142
- getUserByEmail(email: string): Promise<UserInfo | null>;
143
- }
144
-
145
- export { type AuthResult as A, DrizzleAuthService as D, type SessionInfo as S, type UserInfo as U, type VerifyResult as V, type AuthServiceConfig as a };
@@ -1,145 +0,0 @@
1
- import { U as UserRole } from './enums-Dume-V5Y.mjs';
2
-
3
- /**
4
- * Auth Services - Types
5
- * 认证服务类型定义
6
- */
7
-
8
- /**
9
- * 认证服务配置
10
- */
11
- interface AuthServiceConfig {
12
- /**
13
- * Drizzle 数据库实例
14
- */
15
- db: any;
16
- /**
17
- * JWT 密钥
18
- */
19
- jwtSecret: string;
20
- /**
21
- * JWT 过期时间 (默认: '7d')
22
- */
23
- jwtExpiresIn?: string;
24
- /**
25
- * bcrypt 加密轮数 (默认: 12)
26
- */
27
- saltRounds?: number;
28
- /**
29
- * 是否在生产环境检查密钥强度 (默认: true)
30
- */
31
- checkSecretStrength?: boolean;
32
- }
33
- /**
34
- * 用户信息(返回给客户端的精简版)
35
- */
36
- interface UserInfo {
37
- id: string;
38
- email: string;
39
- username: string;
40
- role: UserRole;
41
- }
42
- /**
43
- * 认证结果
44
- */
45
- interface AuthResult {
46
- user: UserInfo;
47
- token: string;
48
- }
49
- /**
50
- * 会话信息
51
- */
52
- interface SessionInfo {
53
- id: string;
54
- userId: string;
55
- token: string;
56
- expiresAt: string;
57
- ipAddress?: string | null;
58
- userAgent?: string | null;
59
- }
60
- /**
61
- * 验证结果
62
- */
63
- interface VerifyResult {
64
- user: UserInfo;
65
- session: SessionInfo;
66
- }
67
-
68
- /**
69
- * Auth Services - Drizzle Auth Service
70
- * 基于 Drizzle ORM 的认证服务
71
- */
72
-
73
- /**
74
- * Drizzle 认证服务类
75
- *
76
- * @example
77
- * ```typescript
78
- * import { DrizzleAuthService } from '@qhr123/sa2kit/auth/services';
79
- * import { db } from './db';
80
- *
81
- * const authService = new DrizzleAuthService({
82
- * db,
83
- * jwtSecret: process.env.JWT_SECRET!,
84
- * jwtExpiresIn: '7d',
85
- * });
86
- *
87
- * // 用户注册
88
- * const result = await authService.signUp('user@example.com', 'password123', 'username');
89
- *
90
- * // 用户登录
91
- * const loginResult = await authService.signIn('user@example.com', 'password123');
92
- * ```
93
- */
94
- declare class DrizzleAuthService {
95
- private config;
96
- constructor(config: AuthServiceConfig);
97
- /**
98
- * 验证配置
99
- */
100
- private validateConfig;
101
- /**
102
- * 用户注册
103
- */
104
- signUp(email: string, password: string, username?: string, role?: UserRole): Promise<AuthResult>;
105
- /**
106
- * 用户登录
107
- */
108
- signIn(email: string, password: string): Promise<AuthResult>;
109
- /**
110
- * 验证 Token
111
- */
112
- verifyToken(token: string): Promise<VerifyResult>;
113
- /**
114
- * 创建会话
115
- */
116
- createSession(userId: string, token: string, ipAddress?: string, userAgent?: string): Promise<void>;
117
- /**
118
- * 删除会话(登出)
119
- */
120
- signOut(token: string): Promise<{
121
- success: boolean;
122
- }>;
123
- /**
124
- * 获取会话
125
- */
126
- getSession(token: string): Promise<VerifyResult | null>;
127
- /**
128
- * 检查管理员权限
129
- */
130
- requireAdmin(token: string): Promise<VerifyResult>;
131
- /**
132
- * 检查超级管理员权限
133
- */
134
- requireSuperAdmin(token: string): Promise<VerifyResult>;
135
- /**
136
- * 通过用户 ID 获取用户信息
137
- */
138
- getUserById(userId: string): Promise<UserInfo | null>;
139
- /**
140
- * 通过邮箱获取用户信息
141
- */
142
- getUserByEmail(email: string): Promise<UserInfo | null>;
143
- }
144
-
145
- export { type AuthResult as A, DrizzleAuthService as D, type SessionInfo as S, type UserInfo as U, type VerifyResult as V, type AuthServiceConfig as a };