@huyooo/ui 0.7.26 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/{AuthkitAuthModal-C1Kgu1TA.js → AuthkitAuthModal-CX6-EB-D.js} +563 -628
  2. package/dist/{AuthkitSignInPhone-BG7r63dN.js → AuthkitSignInPhone-D3hR0dGZ.js} +100 -100
  3. package/dist/{Clipboard-8rWlOPTZ.js → Clipboard-CI4IUrMw.js} +13 -14
  4. package/dist/{Contact-Bpl7sIjY.js → Contact-mQa-gB4k.js} +3 -3
  5. package/dist/{CustomTable-BCOwLyRJ.js → CustomTable-D8ubfrWL.js} +2 -2
  6. package/dist/{FeedbackItem-DMpvHrOD.js → FeedbackItem-qaxaQ8gu.js} +4 -4
  7. package/dist/{FeedbackModal-DIhSPUPO.js → FeedbackModal-CUSOWVn5.js} +268 -303
  8. package/dist/{LandingPageSectionTabs-DYNXKElT.js → LandingPageSectionTabs-BOX6nVdh.js} +2 -2
  9. package/dist/MessageHandle-WcCeYl7E.js +1147 -0
  10. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BRficqbp.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BwZM2SQn.js} +38 -37
  11. package/dist/{PaySubscriptions-F5sNex0h.js → PaySubscriptions-DO2W3Y5v.js} +131 -171
  12. package/dist/ReferrerReferees-CXVi2pUl.js +106 -0
  13. package/dist/{Upload.vue_vue_type_script_setup_true_lang-D7ZGc2ZS.js → Upload.vue_vue_type_script_setup_true_lang-CY_Pk57x.js} +2 -2
  14. package/dist/{UserAccountMenu-CkUtqNxY.js → UserAccountMenu-CHkdka0u.js} +8 -8
  15. package/dist/{WidthContainer-DSQui1pX.js → WidthContainer-BBoIS50Z.js} +10 -10
  16. package/dist/apiClients-CChPISR0.js +1805 -0
  17. package/dist/authkit.js +6 -6
  18. package/dist/common.js +2 -2
  19. package/dist/components/Authkit/Auth/AuthkitAuthContainer.vue.d.ts +1 -1
  20. package/dist/components/Authkit/Auth/AuthkitAuthorize.vue.d.ts +1 -1
  21. package/dist/components/LandingPage/LandingPageLogo.vue.d.ts +1 -1
  22. package/dist/components/LandingPage/LandingPageStats.vue.d.ts +1 -1
  23. package/dist/components/Logo.vue.d.ts +1 -1
  24. package/dist/components/MenuItem.vue.d.ts +1 -1
  25. package/dist/components/Message/MessageTabs.vue.d.ts +2 -2
  26. package/dist/components/Upload/Upload.vue.d.ts +2 -2
  27. package/dist/components/User/UserBasicInformation.vue.d.ts +1 -1
  28. package/dist/components/User/UserPanel.vue.d.ts +2 -2
  29. package/dist/composables/Authkit/useAuthkitAuth.d.ts +1 -1
  30. package/dist/composables.js +9 -9
  31. package/dist/feedback.js +3 -3
  32. package/dist/{index-Bb-d5pBq.js → index-4_tj9bS1.js} +1 -1
  33. package/dist/index-96pA3ONI.js +30 -0
  34. package/dist/index.js +191 -189
  35. package/dist/landingPage.js +1 -1
  36. package/dist/main.d.ts +1 -2
  37. package/dist/message.js +3 -3
  38. package/dist/pay.js +1 -1
  39. package/dist/privateCom.js +1 -1
  40. package/dist/referrer.js +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/types/api/auth.generated.d.ts +2747 -0
  43. package/dist/types/api/billing.generated.d.ts +1964 -0
  44. package/dist/types/api/ones.generated.d.ts +5567 -0
  45. package/dist/upload.js +2 -2
  46. package/dist/{useAuthkitAppsAuthPageInfo-CtsTqri7.js → useAuthkitAppsAuthPageInfo-gn2zm_NY.js} +13 -27
  47. package/dist/{useAuthkitCreateAndUpdate-BUyZbiBj.js → useAuthkitCreateAndUpdate-yNpIyVXV.js} +2 -2
  48. package/dist/useAuthkitUsersProfile-D32zPSn2.js +174 -0
  49. package/dist/{useDownloads-Cl_-B4sP.js → useDownloads-MF9rK9J_.js} +2 -2
  50. package/dist/useMessageNotifications-CCfM6W6J.js +78 -0
  51. package/dist/{useSEO-C_4yDk7S.js → useSEO-DivOwPWc.js} +2 -2
  52. package/dist/{useTableHandle-6ekhLVbK.js → useTableHandle-DpemWl6Y.js} +2 -2
  53. package/dist/{useUploadCos-dYc8op7M.js → useUploadCos-BVvRc0BW.js} +159 -181
  54. package/dist/user.js +1 -1
  55. package/dist/utils/apiClients.d.ts +6 -0
  56. package/dist/utils/apiMiddlewares.d.ts +16 -0
  57. package/package.json +8 -3
  58. package/dist/MessageHandle-WA95I84_.js +0 -1207
  59. package/dist/MessageNotifications-DmgFNjH7.js +0 -35
  60. package/dist/ReferrerReferees-DMA8Tj5i.js +0 -113
  61. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  62. package/dist/api/Authkit/Users.d.ts +0 -15
  63. package/dist/api/Authkit/apps.d.ts +0 -2
  64. package/dist/api/Authkit/auth.d.ts +0 -50
  65. package/dist/api/Authkit/oauth.d.ts +0 -12
  66. package/dist/api/Authkit/verify.d.ts +0 -25
  67. package/dist/api/Buckets/Files.d.ts +0 -7
  68. package/dist/api/Buckets.d.ts +0 -2
  69. package/dist/api/Invoices.d.ts +0 -32
  70. package/dist/api/Message/ChangelogNotifications.d.ts +0 -17
  71. package/dist/api/Message/EventNotifications.d.ts +0 -16
  72. package/dist/api/Message/MessageNotifications.d.ts +0 -25
  73. package/dist/api/Message/NoticeNotifications.d.ts +0 -37
  74. package/dist/api/Messages.d.ts +0 -2
  75. package/dist/api/Orders.d.ts +0 -9
  76. package/dist/api/Products.d.ts +0 -20
  77. package/dist/api/Quotas.d.ts +0 -21
  78. package/dist/api/Referrer.d.ts +0 -1
  79. package/dist/api/Subscriptions.d.ts +0 -35
  80. package/dist/api/index.d.ts +0 -8
  81. package/dist/request-B4CMspsP.js +0 -196
  82. package/dist/useAuthkitUsersProfile-B7wHZwe-.js +0 -257
  83. package/dist/useMessageNotifications-CP7gi893.js +0 -78
  84. package/dist/utils/request.d.ts +0 -26
@@ -0,0 +1,2747 @@
1
+ import { ApiResponse, RequestConfig, Client, EdenClient } from '@vafast/api-client';
2
+ /** API 契约类型 */
3
+ export type Api = {
4
+ health: {
5
+ /** 检查服务健康状态 */
6
+ get: {
7
+ return: any;
8
+ };
9
+ };
10
+ 'api-spec': {
11
+ /** 获取 API 规范,用于类型同步 */
12
+ get: {
13
+ return: any;
14
+ };
15
+ };
16
+ apiKeys: {
17
+ verify: {
18
+ /** 验证 API Key 有效性 */
19
+ post: {
20
+ body: {
21
+ apiKeyId: string;
22
+ secretKey: string;
23
+ };
24
+ return: any;
25
+ };
26
+ };
27
+ create: {
28
+ /** 创建新的 API Key */
29
+ post: {
30
+ body: {
31
+ name: string;
32
+ description?: string;
33
+ expiration: "permanent" | "1h" | "1d" | "7d" | "30d" | "90d" | "180d" | "1y";
34
+ permissions?: string[];
35
+ };
36
+ return: any;
37
+ };
38
+ };
39
+ update: {
40
+ /** 更新 API Key 信息 */
41
+ post: {
42
+ body: {
43
+ id: string;
44
+ name: string;
45
+ expiration: "permanent" | "1h" | "1d" | "7d" | "30d" | "90d" | "180d" | "1y";
46
+ };
47
+ return: any;
48
+ };
49
+ };
50
+ delete: {
51
+ /** 删除 API Key */
52
+ post: {
53
+ body: {
54
+ id: string;
55
+ };
56
+ return: any;
57
+ };
58
+ };
59
+ find: {
60
+ /** 分页查询 API Key 列表 */
61
+ post: {
62
+ body: {
63
+ current: number;
64
+ pageSize: number;
65
+ where: {
66
+ id?: string;
67
+ name?: string;
68
+ expiration?: string;
69
+ };
70
+ };
71
+ return: any;
72
+ };
73
+ };
74
+ findOne: {
75
+ /** 根据 ID 查询 API Key 详情 */
76
+ post: {
77
+ body: {
78
+ id: string;
79
+ };
80
+ return: any;
81
+ };
82
+ };
83
+ updateStatus: {
84
+ /** 启用或禁用 API Key */
85
+ post: {
86
+ body: {
87
+ apiKeyId: string;
88
+ status: "active" | "disabled";
89
+ };
90
+ return: any;
91
+ };
92
+ };
93
+ regenerate: {
94
+ /** 密钥轮换,生成新的 Secret Key */
95
+ post: {
96
+ body: {
97
+ id: string;
98
+ };
99
+ return: any;
100
+ };
101
+ };
102
+ };
103
+ verify: {
104
+ jwt: {
105
+ /** 供其他服务验证用户 JWT 并获取用户信息 */
106
+ post: {
107
+ body: {
108
+ token: string;
109
+ appId?: string;
110
+ };
111
+ return: any;
112
+ };
113
+ };
114
+ apiKey: {
115
+ /** 验证 API Key 有效性 */
116
+ post: {
117
+ body: {
118
+ apiKeyId: string;
119
+ secretKey: string;
120
+ };
121
+ return: any;
122
+ };
123
+ };
124
+ email: {
125
+ /** 验证邮箱验证码 */
126
+ post: {
127
+ body: {
128
+ userToken: string;
129
+ email: string;
130
+ emailVerifyId: string;
131
+ };
132
+ return: any;
133
+ };
134
+ retry: {
135
+ /** 重新发送邮箱验证码 */
136
+ post: {
137
+ body: {
138
+ email: string;
139
+ };
140
+ return: any;
141
+ };
142
+ };
143
+ };
144
+ sms: {
145
+ send: {
146
+ /** 发送短信验证码 */
147
+ post: {
148
+ body: {
149
+ phone: string;
150
+ };
151
+ return: any;
152
+ };
153
+ };
154
+ verify: {
155
+ /** 验证短信验证码 */
156
+ post: {
157
+ body: {
158
+ phone: string;
159
+ code: string;
160
+ };
161
+ return: any;
162
+ };
163
+ };
164
+ };
165
+ password: {
166
+ /** 验证用户密码 */
167
+ post: {
168
+ body: {
169
+ password: string;
170
+ };
171
+ return: any;
172
+ };
173
+ };
174
+ };
175
+ users: {
176
+ batch: {
177
+ /** 根据 ID 列表批量查询用户 */
178
+ post: {
179
+ body: {
180
+ userIds: string[];
181
+ appId?: string;
182
+ };
183
+ return: any;
184
+ };
185
+ };
186
+ subscription: {
187
+ /** 供 billing-server 更新用户的订阅信息和权益 */
188
+ post: {
189
+ body: {
190
+ userId: string;
191
+ appId: string;
192
+ subscriptionId?: string | null;
193
+ subscriptionStatus?: string | null;
194
+ entitlements?: Record<string, unknown>;
195
+ };
196
+ return: any;
197
+ };
198
+ };
199
+ search: {
200
+ /** 供其他服务按昵称/邮箱/手机号搜索用户 */
201
+ post: {
202
+ body: {
203
+ appId: string;
204
+ keyword: string;
205
+ limit?: number;
206
+ };
207
+ return: any;
208
+ };
209
+ };
210
+ stats: {
211
+ /** 供其他服务获取用户数量统计 */
212
+ post: {
213
+ body: {
214
+ appId?: string;
215
+ appIds?: string[];
216
+ startTime?: string;
217
+ endTime?: string;
218
+ };
219
+ return: any;
220
+ };
221
+ };
222
+ trend: {
223
+ /** 供 analytics 服务获取用户增长趋势 */
224
+ post: {
225
+ body: {
226
+ appId: string;
227
+ startTime: string;
228
+ endTime: string;
229
+ granularity: "hour" | "day" | "month";
230
+ };
231
+ return: any;
232
+ };
233
+ };
234
+ organizations: {
235
+ /** 供 ones-server 更新用户的组织列表 */
236
+ post: {
237
+ body: {
238
+ userId: string;
239
+ action: "add" | "remove";
240
+ organizationId: string;
241
+ };
242
+ return: any;
243
+ };
244
+ };
245
+ delete: {
246
+ /** 管理员删除用户账号 */
247
+ post: {
248
+ body: {
249
+ id: string;
250
+ };
251
+ return: any;
252
+ };
253
+ };
254
+ update: {
255
+ /** 管理员更新用户信息 */
256
+ post: {
257
+ body: {
258
+ id: string;
259
+ phone: string;
260
+ roleId: string;
261
+ email: string;
262
+ status: "normal" | "forbidden";
263
+ };
264
+ return: any;
265
+ };
266
+ phone: {
267
+ /** 管理员更新用户手机号 */
268
+ post: {
269
+ body: {
270
+ id: string;
271
+ phone: string;
272
+ };
273
+ return: any;
274
+ };
275
+ };
276
+ status: {
277
+ /** 管理员更新用户启用状态 */
278
+ post: {
279
+ body: {
280
+ id: string;
281
+ status: "normal" | "forbidden";
282
+ };
283
+ return: any;
284
+ };
285
+ };
286
+ baseInfo: {
287
+ /** 管理员更新用户基本信息 */
288
+ post: {
289
+ body: {
290
+ id: string;
291
+ avatar?: string;
292
+ nickname?: string;
293
+ description?: string;
294
+ roleId?: string;
295
+ };
296
+ return: any;
297
+ };
298
+ };
299
+ email: {
300
+ /** 用户更新自己的邮箱 */
301
+ post: {
302
+ body: {
303
+ userToken: string;
304
+ emailVerifyId: string;
305
+ email: string;
306
+ password: string;
307
+ };
308
+ return: any;
309
+ };
310
+ };
311
+ password: {
312
+ /** 用户更新自己的密码 */
313
+ post: {
314
+ body: {
315
+ password: string;
316
+ };
317
+ return: any;
318
+ };
319
+ };
320
+ };
321
+ deleteAccount: {
322
+ /** 用户主动注销自己的账号 */
323
+ post: {
324
+ body: {
325
+ password: string;
326
+ userToken: string;
327
+ emailVerifyId: string;
328
+ confirmText?: string;
329
+ };
330
+ return: any;
331
+ };
332
+ };
333
+ unbind: {
334
+ email: {
335
+ /** 用户解绑自己的邮箱 */
336
+ post: {
337
+ return: any;
338
+ };
339
+ };
340
+ };
341
+ profile: {
342
+ /** 用户更新自己的个人资料 */
343
+ post: {
344
+ return: any;
345
+ };
346
+ };
347
+ me: {
348
+ /** 获取当前登录用户的信息 */
349
+ get: {
350
+ return: any;
351
+ };
352
+ };
353
+ find: {
354
+ /** 分页查询用户列表 */
355
+ post: {
356
+ body: {
357
+ current: number;
358
+ pageSize: number;
359
+ where: {
360
+ id?: string;
361
+ email?: string;
362
+ phone?: string;
363
+ status?: "normal" | "forbidden";
364
+ };
365
+ };
366
+ return: any;
367
+ };
368
+ };
369
+ findOne: {
370
+ /** 根据 ID 查询用户详情 */
371
+ post: {
372
+ body: {
373
+ id: string;
374
+ };
375
+ return: any;
376
+ };
377
+ };
378
+ getUsers: {
379
+ /** 根据 ID 列表批量获取用户 */
380
+ post: {
381
+ body: {
382
+ userIds: string[];
383
+ };
384
+ return: any;
385
+ };
386
+ };
387
+ 'with-points': {
388
+ /** 查询用户详情含积分信息 */
389
+ post: {
390
+ body: {
391
+ userId: string;
392
+ appId: string;
393
+ };
394
+ return: any;
395
+ };
396
+ };
397
+ 'referral-tree': {
398
+ /** 查询用户推荐关系树 */
399
+ post: {
400
+ body: {
401
+ userId: string;
402
+ appId: string;
403
+ depth?: number;
404
+ };
405
+ return: any;
406
+ };
407
+ };
408
+ 'activity-analysis': {
409
+ /** 分析用户活跃度 */
410
+ post: {
411
+ body: {
412
+ userId: string;
413
+ appId: string;
414
+ days?: number;
415
+ };
416
+ return: any;
417
+ };
418
+ };
419
+ 'batch-stats': {
420
+ /** 批量获取用户统计数据 */
421
+ post: {
422
+ body: {
423
+ userIds: string[];
424
+ appId: string;
425
+ };
426
+ return: any;
427
+ };
428
+ };
429
+ export: {
430
+ points: {
431
+ /** 导出用户积分报告 */
432
+ post: {
433
+ body: {
434
+ appId: string;
435
+ startDate?: string;
436
+ endDate?: string;
437
+ format?: "json" | "csv";
438
+ };
439
+ return: any;
440
+ };
441
+ };
442
+ activity: {
443
+ /** 导出用户活跃度报告 */
444
+ post: {
445
+ body: {
446
+ appId: string;
447
+ days?: number;
448
+ format?: "json" | "csv";
449
+ };
450
+ return: any;
451
+ };
452
+ };
453
+ referral: {
454
+ /** 导出用户推荐关系报告 */
455
+ post: {
456
+ body: {
457
+ appId: string;
458
+ format?: "json" | "csv";
459
+ };
460
+ return: any;
461
+ };
462
+ };
463
+ };
464
+ sync: {
465
+ /** 获取待同步的用户数据 */
466
+ post: {
467
+ body: {
468
+ lastSyncTime?: string;
469
+ limit?: number;
470
+ appId?: string;
471
+ };
472
+ return: any;
473
+ };
474
+ };
475
+ events: {
476
+ /** 获取用户数据变更事件 */
477
+ post: {
478
+ body: {
479
+ since: string;
480
+ appId?: string;
481
+ };
482
+ return: any;
483
+ };
484
+ };
485
+ statistics: {
486
+ /** 获取用户整体统计数据 */
487
+ post: {
488
+ body: {
489
+ appId?: string;
490
+ };
491
+ return: any;
492
+ };
493
+ };
494
+ };
495
+ oauth: {
496
+ github: {
497
+ login: {
498
+ /** 跳转到 GitHub 授权登录 */
499
+ get: {
500
+ query: {
501
+ appId: string;
502
+ referrerId?: string;
503
+ redirectUri?: string;
504
+ };
505
+ return: any;
506
+ };
507
+ };
508
+ callback: {
509
+ /** GitHub 授权回调 */
510
+ get: {
511
+ query: {
512
+ code: string;
513
+ state: string;
514
+ };
515
+ return: any;
516
+ };
517
+ };
518
+ };
519
+ google: {
520
+ login: {
521
+ /** 跳转到 Google 授权登录 */
522
+ get: {
523
+ query: {
524
+ appId: string;
525
+ referrerId?: string;
526
+ redirectUri?: string;
527
+ };
528
+ return: any;
529
+ };
530
+ };
531
+ callback: {
532
+ /** Google 授权回调 */
533
+ get: {
534
+ query: {
535
+ code: string;
536
+ state: string;
537
+ };
538
+ return: any;
539
+ };
540
+ };
541
+ };
542
+ microsoft: {
543
+ login: {
544
+ /** 跳转到 Microsoft 授权登录 */
545
+ get: {
546
+ query: {
547
+ appId: string;
548
+ referrerId?: string;
549
+ redirectUri?: string;
550
+ };
551
+ return: any;
552
+ };
553
+ };
554
+ callback: {
555
+ /** Microsoft 授权回调 */
556
+ get: {
557
+ query: {
558
+ code: string;
559
+ state: string;
560
+ };
561
+ return: any;
562
+ };
563
+ };
564
+ };
565
+ };
566
+ oauth2: {
567
+ authorize: {
568
+ /** 获取 OAuth2 授权码 */
569
+ post: {
570
+ body: {
571
+ client_id: string;
572
+ redirect_uri: string;
573
+ scope: string;
574
+ state: string;
575
+ response_type: "code" | "token";
576
+ };
577
+ return: any;
578
+ };
579
+ };
580
+ token: {
581
+ /** 使用授权码获取访问令牌 */
582
+ post: {
583
+ body: {
584
+ grant_type: string;
585
+ code: string;
586
+ redirect_uri: string;
587
+ client_id: string;
588
+ client_secret?: string;
589
+ };
590
+ return: any;
591
+ };
592
+ };
593
+ refresh: {
594
+ /** 刷新访问令牌 */
595
+ post: {
596
+ body: {
597
+ refresh_token: string;
598
+ client_id: string;
599
+ };
600
+ return: any;
601
+ };
602
+ };
603
+ revoke: {
604
+ /** 撤销访问令牌 */
605
+ post: {
606
+ body: {
607
+ token: string;
608
+ client_id: string;
609
+ };
610
+ return: any;
611
+ };
612
+ };
613
+ };
614
+ auth: {
615
+ signIn: {
616
+ /** 用户通过邮箱和密码登录 */
617
+ post: {
618
+ body: {
619
+ email: string;
620
+ password: string;
621
+ };
622
+ return: any;
623
+ };
624
+ unified: {
625
+ /** 用户通过邮箱/手机号登录(自动识别) */
626
+ post: {
627
+ body: {
628
+ identifier: string;
629
+ password?: string;
630
+ code?: string;
631
+ method: "password" | "code";
632
+ };
633
+ return: any;
634
+ };
635
+ };
636
+ };
637
+ signUp: {
638
+ /** 用户通过邮箱注册账号 */
639
+ post: {
640
+ body: {
641
+ email: string;
642
+ password: string;
643
+ referrerId?: string;
644
+ userToken: string;
645
+ emailVerifyId: string;
646
+ };
647
+ return: any;
648
+ };
649
+ phone: {
650
+ /** 用户通过手机号注册账号 */
651
+ post: {
652
+ body: {
653
+ phone: string;
654
+ code: string;
655
+ password?: string;
656
+ referrerId?: string;
657
+ };
658
+ return: any;
659
+ };
660
+ };
661
+ };
662
+ refresh: {
663
+ /** 使用 refreshToken 刷新 JWT */
664
+ post: {
665
+ body: {
666
+ refreshToken: string;
667
+ };
668
+ return: any;
669
+ };
670
+ };
671
+ signOut: {
672
+ /** 用户主动登出当前会话 */
673
+ post: {
674
+ return: any;
675
+ };
676
+ };
677
+ logout: {
678
+ /** 登出指定设备的会话 */
679
+ post: {
680
+ return: any;
681
+ };
682
+ };
683
+ logoutAll: {
684
+ /** 登出所有设备的会话 */
685
+ post: {
686
+ return: any;
687
+ };
688
+ };
689
+ sessions: {
690
+ /** 获取用户所有登录会话 */
691
+ get: {
692
+ return: any;
693
+ };
694
+ cleanup: {
695
+ /** 清理用户过期的会话 */
696
+ post: {
697
+ return: any;
698
+ };
699
+ };
700
+ ':id': {
701
+ revoke: {
702
+ /** 撤销指定的登录会话 */
703
+ post: {
704
+ params: {
705
+ sessionId: string;
706
+ };
707
+ return: any;
708
+ };
709
+ };
710
+ };
711
+ };
712
+ passwordVerify: {
713
+ /** 验证用户当前密码 */
714
+ post: {
715
+ body: {
716
+ password: string;
717
+ };
718
+ return: any;
719
+ };
720
+ };
721
+ resetPassword: {
722
+ /** 用户通过验证码重置密码 */
723
+ post: {
724
+ body: {
725
+ userToken: string;
726
+ emailVerifyId: string;
727
+ email: string;
728
+ password: string;
729
+ };
730
+ return: any;
731
+ };
732
+ };
733
+ verify: {
734
+ token: {
735
+ /** 验证 JWT Token 有效性 */
736
+ post: {
737
+ body: {
738
+ token: string;
739
+ };
740
+ return: any;
741
+ };
742
+ };
743
+ };
744
+ bind: {
745
+ email: {
746
+ /** 用户绑定邮箱地址 */
747
+ post: {
748
+ body: {
749
+ email: string;
750
+ userToken: string;
751
+ emailVerifyId: string;
752
+ };
753
+ return: any;
754
+ };
755
+ };
756
+ phone: {
757
+ /** 用户绑定手机号 */
758
+ post: {
759
+ body: {
760
+ phone: string;
761
+ code: string;
762
+ };
763
+ return: any;
764
+ };
765
+ };
766
+ };
767
+ };
768
+ passkey: {
769
+ auth: {
770
+ options: {
771
+ /** 获取 Passkey 登录认证选项 */
772
+ post: {
773
+ body: {
774
+ email?: string;
775
+ };
776
+ return: any;
777
+ };
778
+ };
779
+ verify: {
780
+ /** 用户通过 Passkey 无密码登录 */
781
+ post: {
782
+ body: {
783
+ response: unknown;
784
+ };
785
+ return: any;
786
+ };
787
+ };
788
+ };
789
+ register: {
790
+ options: {
791
+ /** 获取 Passkey 注册选项 */
792
+ post: {
793
+ return: any;
794
+ };
795
+ };
796
+ verify: {
797
+ /** 用户注册新的 Passkey 凭证 */
798
+ post: {
799
+ body: {
800
+ response: unknown;
801
+ name?: string;
802
+ };
803
+ return: any;
804
+ };
805
+ };
806
+ };
807
+ list: {
808
+ /** 获取用户已注册的 Passkey 列表 */
809
+ post: {
810
+ return: any;
811
+ };
812
+ };
813
+ delete: {
814
+ /** 用户删除 Passkey 凭证 */
815
+ post: {
816
+ body: {
817
+ credentialId: string;
818
+ };
819
+ return: any;
820
+ };
821
+ };
822
+ rename: {
823
+ /** 修改 Passkey 名称 */
824
+ post: {
825
+ body: {
826
+ credentialId: string;
827
+ name: string;
828
+ };
829
+ return: any;
830
+ };
831
+ };
832
+ };
833
+ apps: {
834
+ authPageInfo: {
835
+ /** 获取应用认证页面配置信息 */
836
+ post: {
837
+ return: any;
838
+ };
839
+ };
840
+ create: {
841
+ /** 创建新应用 */
842
+ post: {
843
+ body: {
844
+ appKey: string;
845
+ name: string;
846
+ homePageUrl?: string;
847
+ authorizationCallback?: string;
848
+ applicationLogo?: string;
849
+ description?: string;
850
+ extensions?: Record<string, string>;
851
+ };
852
+ return: any;
853
+ };
854
+ };
855
+ delete: {
856
+ /** 删除应用 */
857
+ post: {
858
+ body: {
859
+ id: string;
860
+ };
861
+ return: any;
862
+ };
863
+ };
864
+ update: {
865
+ /** 更新应用信息 */
866
+ post: {
867
+ body: {
868
+ id: string;
869
+ appKey?: string;
870
+ name?: string;
871
+ homePageUrl?: string;
872
+ authorizationCallback?: string;
873
+ applicationLogo?: string;
874
+ description?: string;
875
+ defaultRoleId?: string;
876
+ };
877
+ return: any;
878
+ };
879
+ emailConfig: {
880
+ /** 更新应用邮件发送配置 */
881
+ post: {
882
+ body: {
883
+ supportEmail?: string;
884
+ };
885
+ return: any;
886
+ };
887
+ };
888
+ brand: {
889
+ /** 更新应用品牌展示配置 */
890
+ post: {
891
+ body: {
892
+ theme: "dark" | "light";
893
+ logo: string;
894
+ favicon: string;
895
+ backgroundType: "color" | "image";
896
+ backgroundImage: string;
897
+ backgroundColor: string;
898
+ };
899
+ return: any;
900
+ };
901
+ };
902
+ emailAuth: {
903
+ /** 更新邮箱认证相关配置 */
904
+ post: {
905
+ body: {
906
+ enabled: boolean;
907
+ confirmEmail: boolean;
908
+ expiration: number;
909
+ };
910
+ return: any;
911
+ };
912
+ };
913
+ passwordAuth: {
914
+ /** 更新密码认证相关配置 */
915
+ post: {
916
+ body: {
917
+ minPasswordComplexity: number;
918
+ rejectBreachedPasswords: boolean;
919
+ };
920
+ return: any;
921
+ };
922
+ };
923
+ sessionsAuth: {
924
+ /** 更新登录会话相关配置 */
925
+ post: {
926
+ body: {
927
+ maximumSessionLength: number;
928
+ accessTokenDuration: number;
929
+ maximumSessionLengthUnit: string;
930
+ accessTokenDurationUnit: string;
931
+ };
932
+ return: any;
933
+ };
934
+ };
935
+ signUpAuth: {
936
+ /** 更新用户注册相关配置 */
937
+ post: {
938
+ body: {
939
+ enabled: boolean;
940
+ };
941
+ return: any;
942
+ };
943
+ };
944
+ singleSignOn: {
945
+ /** 更新单点登录 (SSO) 配置 */
946
+ post: {
947
+ body: {
948
+ enabled: boolean;
949
+ };
950
+ return: any;
951
+ };
952
+ };
953
+ oauth: {
954
+ /** 更新第三方 OAuth 登录配置 */
955
+ post: {
956
+ body: {
957
+ type: "google" | "microsoft" | "github" | "wechat";
958
+ enabled: boolean;
959
+ };
960
+ return: any;
961
+ };
962
+ };
963
+ aboutUs: {
964
+ personalInformationCollectionList: {
965
+ /** 更新个人信息收集清单配置 */
966
+ post: {
967
+ body: {
968
+ value: {
969
+ type: "doc";
970
+ content: unknown[];
971
+ };
972
+ };
973
+ return: any;
974
+ };
975
+ };
976
+ thirdPartyInformationSharingList: {
977
+ /** 更新第三方信息共享清单配置 */
978
+ post: {
979
+ body: {
980
+ value: {
981
+ type: "doc";
982
+ content: unknown[];
983
+ };
984
+ };
985
+ return: any;
986
+ };
987
+ };
988
+ userServiceAgreement: {
989
+ /** 更新用户服务协议配置 */
990
+ post: {
991
+ body: {
992
+ value: {
993
+ type: "doc";
994
+ content: unknown[];
995
+ };
996
+ };
997
+ return: any;
998
+ };
999
+ };
1000
+ privacyPolicy: {
1001
+ /** 更新隐私政策配置 */
1002
+ post: {
1003
+ body: {
1004
+ value: {
1005
+ type: "doc";
1006
+ content: unknown[];
1007
+ };
1008
+ };
1009
+ return: any;
1010
+ };
1011
+ };
1012
+ licenseInformation: {
1013
+ /** 更新许可信息配置 */
1014
+ post: {
1015
+ body: {
1016
+ value: {
1017
+ type: "doc";
1018
+ content: unknown[];
1019
+ };
1020
+ };
1021
+ return: any;
1022
+ };
1023
+ };
1024
+ };
1025
+ };
1026
+ find: {
1027
+ /** 分页查询应用列表 */
1028
+ post: {
1029
+ body: {
1030
+ current: number;
1031
+ pageSize: number;
1032
+ where: {
1033
+ id?: string;
1034
+ appKey?: string;
1035
+ name?: string;
1036
+ homePageUrl?: string;
1037
+ extensions?: Record<string, string>;
1038
+ };
1039
+ };
1040
+ return: any;
1041
+ };
1042
+ };
1043
+ findAll: {
1044
+ /** 查询用户所有应用 */
1045
+ post: {
1046
+ body: {
1047
+ where: {
1048
+ id?: string;
1049
+ appKey?: string;
1050
+ name?: string;
1051
+ homePageUrl?: string;
1052
+ extensions?: Record<string, string>;
1053
+ };
1054
+ };
1055
+ return: any;
1056
+ };
1057
+ };
1058
+ findOne: {
1059
+ /** 根据 ID 查询应用详情 */
1060
+ post: {
1061
+ body: {
1062
+ id: string;
1063
+ };
1064
+ return: any;
1065
+ };
1066
+ };
1067
+ findByIds: {
1068
+ /** 根据 ID 列表批量查询应用 */
1069
+ post: {
1070
+ body: {
1071
+ ids: string[];
1072
+ };
1073
+ return: any;
1074
+ };
1075
+ };
1076
+ emailConfigInfo: {
1077
+ /** 获取应用邮件配置信息 */
1078
+ post: {
1079
+ return: any;
1080
+ };
1081
+ };
1082
+ };
1083
+ roles: {
1084
+ create: {
1085
+ /** 创建新角色 */
1086
+ post: {
1087
+ body: {
1088
+ name: string;
1089
+ roleKey: string;
1090
+ permissions?: string[];
1091
+ description: string;
1092
+ };
1093
+ return: any;
1094
+ };
1095
+ };
1096
+ delete: {
1097
+ /** 删除角色 */
1098
+ post: {
1099
+ body: {
1100
+ id: string;
1101
+ };
1102
+ return: any;
1103
+ };
1104
+ };
1105
+ update: {
1106
+ /** 更新角色信息 */
1107
+ post: {
1108
+ body: {
1109
+ id: string;
1110
+ name: string;
1111
+ roleKey: string;
1112
+ permissions?: string[];
1113
+ description: string;
1114
+ };
1115
+ return: any;
1116
+ };
1117
+ };
1118
+ find: {
1119
+ /** 分页查询角色列表 */
1120
+ post: {
1121
+ body: {
1122
+ current: number;
1123
+ pageSize: number;
1124
+ where: {
1125
+ name?: string;
1126
+ roleKey?: string;
1127
+ description?: string;
1128
+ };
1129
+ };
1130
+ return: any;
1131
+ };
1132
+ };
1133
+ findOne: {
1134
+ /** 根据 ID 查询角色详情 */
1135
+ post: {
1136
+ body: {
1137
+ id: string;
1138
+ };
1139
+ return: any;
1140
+ };
1141
+ };
1142
+ options: {
1143
+ /** 获取角色下拉选项 */
1144
+ post: {
1145
+ return: any;
1146
+ };
1147
+ };
1148
+ };
1149
+ permissions: {
1150
+ create: {
1151
+ /** 创建新权限 */
1152
+ post: {
1153
+ body: {
1154
+ name: string;
1155
+ permissionKey: string;
1156
+ description: string;
1157
+ isPublic: boolean;
1158
+ };
1159
+ return: any;
1160
+ };
1161
+ };
1162
+ delete: {
1163
+ /** 删除权限 */
1164
+ post: {
1165
+ body: {
1166
+ id: string;
1167
+ };
1168
+ return: any;
1169
+ };
1170
+ };
1171
+ update: {
1172
+ /** 更新权限信息 */
1173
+ post: {
1174
+ body: {
1175
+ id: string;
1176
+ name: string;
1177
+ permissionKey: string;
1178
+ description: string;
1179
+ isPublic: boolean;
1180
+ };
1181
+ return: any;
1182
+ };
1183
+ };
1184
+ find: {
1185
+ /** 分页查询权限列表 */
1186
+ post: {
1187
+ body: {
1188
+ current: number;
1189
+ pageSize: number;
1190
+ where: {
1191
+ name?: string;
1192
+ permissionKey?: string;
1193
+ description?: string;
1194
+ };
1195
+ };
1196
+ return: any;
1197
+ };
1198
+ };
1199
+ findOne: {
1200
+ /** 根据 ID 查询权限详情 */
1201
+ post: {
1202
+ body: {
1203
+ id: string;
1204
+ };
1205
+ return: any;
1206
+ };
1207
+ };
1208
+ options: {
1209
+ /** 获取权限下拉选项 */
1210
+ post: {
1211
+ body: {
1212
+ excludePublic?: boolean;
1213
+ };
1214
+ return: any;
1215
+ };
1216
+ };
1217
+ };
1218
+ referrer: {
1219
+ find: {
1220
+ /** 分页查询推荐人列表 */
1221
+ post: {
1222
+ body: {
1223
+ current: number;
1224
+ pageSize: number;
1225
+ where: {
1226
+ referrerId?: string;
1227
+ referrerEmail?: string;
1228
+ referrerPhone?: string;
1229
+ };
1230
+ };
1231
+ return: any;
1232
+ };
1233
+ };
1234
+ findOne: {
1235
+ /** 根据 ID 查询推荐人详情 */
1236
+ post: {
1237
+ body: {
1238
+ id: string;
1239
+ };
1240
+ return: any;
1241
+ };
1242
+ };
1243
+ referees: {
1244
+ /** 查询推荐人邀请的用户列表 */
1245
+ post: {
1246
+ body: {
1247
+ current: number;
1248
+ pageSize: number;
1249
+ };
1250
+ return: any;
1251
+ };
1252
+ };
1253
+ delete: {
1254
+ /** 删除推荐记录 */
1255
+ post: {
1256
+ body: {
1257
+ id: string;
1258
+ };
1259
+ return: any;
1260
+ };
1261
+ };
1262
+ getReferrerStatistics: {
1263
+ /** 获取推荐统计数据 */
1264
+ post: {
1265
+ return: any;
1266
+ };
1267
+ };
1268
+ getReferralCountChart: {
1269
+ /** 获取推荐数量趋势图表 */
1270
+ post: {
1271
+ body: {
1272
+ startTime: string;
1273
+ endTime: string;
1274
+ granularity: "minute" | "hour" | "day" | "month" | "year";
1275
+ };
1276
+ return: any;
1277
+ };
1278
+ };
1279
+ getReferralConversionChart: {
1280
+ /** 获取推荐转化率趋势图表 */
1281
+ post: {
1282
+ body: {
1283
+ startTime: string;
1284
+ endTime: string;
1285
+ granularity: "minute" | "hour" | "day" | "month" | "year";
1286
+ };
1287
+ return: any;
1288
+ };
1289
+ };
1290
+ getAvgReferralsChart: {
1291
+ /** 获取平均推荐数趋势图表 */
1292
+ post: {
1293
+ body: {
1294
+ startTime: string;
1295
+ endTime: string;
1296
+ granularity: "minute" | "hour" | "day" | "month" | "year";
1297
+ };
1298
+ return: any;
1299
+ };
1300
+ };
1301
+ getReferralOrderAmountChart: {
1302
+ /** 获取推荐订单金额趋势图表 */
1303
+ post: {
1304
+ body: {
1305
+ startTime: string;
1306
+ endTime: string;
1307
+ granularity: "minute" | "hour" | "day" | "month" | "year";
1308
+ };
1309
+ return: any;
1310
+ };
1311
+ };
1312
+ getReferralOrderCountChart: {
1313
+ /** 获取推荐订单数量趋势图表 */
1314
+ post: {
1315
+ body: {
1316
+ startTime: string;
1317
+ endTime: string;
1318
+ granularity: "minute" | "hour" | "day" | "month" | "year";
1319
+ };
1320
+ return: any;
1321
+ };
1322
+ };
1323
+ };
1324
+ authLogs: {
1325
+ list: {
1326
+ /** 分页获取认证审计日志列表 */
1327
+ post: {
1328
+ body: {
1329
+ page?: number;
1330
+ pageSize?: number;
1331
+ userId?: string;
1332
+ event?: string;
1333
+ method?: string;
1334
+ success?: boolean;
1335
+ startTime?: string;
1336
+ endTime?: string;
1337
+ clientIp?: string;
1338
+ email?: string;
1339
+ };
1340
+ return: any;
1341
+ };
1342
+ };
1343
+ stats: {
1344
+ /** 获取认证审计日志统计数据 */
1345
+ post: {
1346
+ body: {
1347
+ startTime?: string;
1348
+ endTime?: string;
1349
+ };
1350
+ return: any;
1351
+ };
1352
+ };
1353
+ ':id': {
1354
+ /** 根据 ID 获取认证审计日志详情 */
1355
+ get: {
1356
+ params: {
1357
+ id: string;
1358
+ };
1359
+ return: any;
1360
+ };
1361
+ };
1362
+ };
1363
+ inviteCodes: {
1364
+ create: {
1365
+ /** 创建新邀请码 */
1366
+ post: {
1367
+ body: {
1368
+ name: string;
1369
+ type: "personal" | "channel" | "campaign";
1370
+ channel?: string;
1371
+ maxUses?: number;
1372
+ expiresAt?: string;
1373
+ description?: string;
1374
+ };
1375
+ return: any;
1376
+ };
1377
+ };
1378
+ delete: {
1379
+ /** 删除邀请码 */
1380
+ post: {
1381
+ body: {
1382
+ id: string;
1383
+ };
1384
+ return: any;
1385
+ };
1386
+ };
1387
+ update: {
1388
+ /** 更新邀请码信息 */
1389
+ post: {
1390
+ body: {
1391
+ id: string;
1392
+ name: string;
1393
+ channel?: string;
1394
+ maxUses?: number;
1395
+ expiresAt?: string;
1396
+ status: "active" | "inactive" | "expired";
1397
+ description?: string;
1398
+ };
1399
+ return: any;
1400
+ };
1401
+ };
1402
+ find: {
1403
+ /** 分页查询邀请码列表 */
1404
+ post: {
1405
+ body: {
1406
+ current: number;
1407
+ pageSize: number;
1408
+ where: {
1409
+ name?: string;
1410
+ code?: string;
1411
+ type?: string;
1412
+ channel?: string;
1413
+ status?: string;
1414
+ };
1415
+ };
1416
+ return: any;
1417
+ };
1418
+ };
1419
+ findOne: {
1420
+ /** 根据 ID 查询邀请码详情 */
1421
+ post: {
1422
+ body: {
1423
+ id: string;
1424
+ };
1425
+ return: any;
1426
+ };
1427
+ };
1428
+ validate: {
1429
+ /** 验证邀请码是否有效 */
1430
+ post: {
1431
+ body: {
1432
+ code: string;
1433
+ };
1434
+ return: any;
1435
+ };
1436
+ };
1437
+ options: {
1438
+ type: {
1439
+ /** 获取邀请码类型下拉选项 */
1440
+ post: {
1441
+ return: any;
1442
+ };
1443
+ };
1444
+ status: {
1445
+ /** 获取邀请码状态下拉选项 */
1446
+ post: {
1447
+ return: any;
1448
+ };
1449
+ };
1450
+ };
1451
+ };
1452
+ security: {
1453
+ ip: {
1454
+ list: {
1455
+ /** 获取 IP 黑白名单规则列表 */
1456
+ post: {
1457
+ body: {
1458
+ appId?: string;
1459
+ type?: "whitelist" | "blacklist";
1460
+ page?: number;
1461
+ pageSize?: number;
1462
+ };
1463
+ return: any;
1464
+ };
1465
+ };
1466
+ add: {
1467
+ /** 添加 IP 黑白名单规则 */
1468
+ post: {
1469
+ body: {
1470
+ appId?: string;
1471
+ ip: string;
1472
+ type: "whitelist" | "blacklist";
1473
+ reason?: string;
1474
+ expiresInMinutes?: number;
1475
+ };
1476
+ return: any;
1477
+ };
1478
+ };
1479
+ remove: {
1480
+ /** 删除 IP 黑白名单规则 */
1481
+ post: {
1482
+ body: {
1483
+ id: string;
1484
+ };
1485
+ return: any;
1486
+ };
1487
+ };
1488
+ block: {
1489
+ /** 将 IP 加入黑名单 */
1490
+ post: {
1491
+ body: {
1492
+ ip: string;
1493
+ reason: string;
1494
+ durationMinutes?: number;
1495
+ appId?: string;
1496
+ };
1497
+ return: any;
1498
+ };
1499
+ };
1500
+ unblock: {
1501
+ /** 将 IP 从黑名单移除 */
1502
+ post: {
1503
+ body: {
1504
+ ip: string;
1505
+ appId?: string;
1506
+ };
1507
+ return: any;
1508
+ };
1509
+ };
1510
+ };
1511
+ alerts: {
1512
+ list: {
1513
+ /** 获取可疑登录告警列表 */
1514
+ post: {
1515
+ body: {
1516
+ appId?: string;
1517
+ type?: string;
1518
+ riskLevel?: "low" | "medium" | "high" | "critical";
1519
+ resolved?: boolean;
1520
+ page?: number;
1521
+ pageSize?: number;
1522
+ };
1523
+ return: any;
1524
+ };
1525
+ };
1526
+ resolve: {
1527
+ /** 标记安全告警为已处理 */
1528
+ post: {
1529
+ body: {
1530
+ alertId: string;
1531
+ };
1532
+ return: any;
1533
+ };
1534
+ };
1535
+ stats: {
1536
+ /** 获取安全告警统计数据 */
1537
+ post: {
1538
+ body: {
1539
+ appId?: string;
1540
+ };
1541
+ return: any;
1542
+ };
1543
+ };
1544
+ };
1545
+ detection: {
1546
+ config: {
1547
+ /** 获取可疑登录检测配置 */
1548
+ get: {
1549
+ return: any;
1550
+ };
1551
+ };
1552
+ };
1553
+ };
1554
+ webhooks: {
1555
+ events: {
1556
+ /** 获取所有可用的 Webhook 事件类型 */
1557
+ get: {
1558
+ return: any;
1559
+ };
1560
+ ':id': {
1561
+ /** 获取指定分类的 Webhook 事件 */
1562
+ get: {
1563
+ params: {
1564
+ category: string;
1565
+ };
1566
+ return: any;
1567
+ };
1568
+ };
1569
+ };
1570
+ categories: {
1571
+ /** 获取所有 Webhook 事件分类 */
1572
+ get: {
1573
+ return: any;
1574
+ };
1575
+ };
1576
+ };
1577
+ };
1578
+ /** API 客户端类型(提供完整的 IDE 智能提示) */
1579
+ export interface ApiClient {
1580
+ health: {
1581
+ /** 检查服务健康状态 */
1582
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1583
+ };
1584
+ 'api-spec': {
1585
+ /** 获取 API 规范,用于类型同步 */
1586
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1587
+ };
1588
+ apiKeys: {
1589
+ verify: {
1590
+ /** 验证 API Key 有效性 */
1591
+ post: (body: {
1592
+ apiKeyId: string;
1593
+ secretKey: string;
1594
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1595
+ };
1596
+ create: {
1597
+ /** 创建新的 API Key */
1598
+ post: (body: {
1599
+ name: string;
1600
+ description?: string;
1601
+ expiration: "permanent" | "1h" | "1d" | "7d" | "30d" | "90d" | "180d" | "1y";
1602
+ permissions?: string[];
1603
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1604
+ };
1605
+ update: {
1606
+ /** 更新 API Key 信息 */
1607
+ post: (body: {
1608
+ id: string;
1609
+ name: string;
1610
+ expiration: "permanent" | "1h" | "1d" | "7d" | "30d" | "90d" | "180d" | "1y";
1611
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1612
+ };
1613
+ delete: {
1614
+ /** 删除 API Key */
1615
+ post: (body: {
1616
+ id: string;
1617
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1618
+ };
1619
+ find: {
1620
+ /** 分页查询 API Key 列表 */
1621
+ post: (body: {
1622
+ current: number;
1623
+ pageSize: number;
1624
+ where: {
1625
+ id?: string;
1626
+ name?: string;
1627
+ expiration?: string;
1628
+ };
1629
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1630
+ };
1631
+ findOne: {
1632
+ /** 根据 ID 查询 API Key 详情 */
1633
+ post: (body: {
1634
+ id: string;
1635
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1636
+ };
1637
+ updateStatus: {
1638
+ /** 启用或禁用 API Key */
1639
+ post: (body: {
1640
+ apiKeyId: string;
1641
+ status: "active" | "disabled";
1642
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1643
+ };
1644
+ regenerate: {
1645
+ /** 密钥轮换,生成新的 Secret Key */
1646
+ post: (body: {
1647
+ id: string;
1648
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1649
+ };
1650
+ };
1651
+ verify: {
1652
+ jwt: {
1653
+ /** 供其他服务验证用户 JWT 并获取用户信息 */
1654
+ post: (body: {
1655
+ token: string;
1656
+ appId?: string;
1657
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1658
+ };
1659
+ apiKey: {
1660
+ /** 验证 API Key 有效性 */
1661
+ post: (body: {
1662
+ apiKeyId: string;
1663
+ secretKey: string;
1664
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1665
+ };
1666
+ email: {
1667
+ /** 验证邮箱验证码 */
1668
+ post: (body: {
1669
+ userToken: string;
1670
+ email: string;
1671
+ emailVerifyId: string;
1672
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1673
+ retry: {
1674
+ /** 重新发送邮箱验证码 */
1675
+ post: (body: {
1676
+ email: string;
1677
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1678
+ };
1679
+ };
1680
+ sms: {
1681
+ send: {
1682
+ /** 发送短信验证码 */
1683
+ post: (body: {
1684
+ phone: string;
1685
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1686
+ };
1687
+ verify: {
1688
+ /** 验证短信验证码 */
1689
+ post: (body: {
1690
+ phone: string;
1691
+ code: string;
1692
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1693
+ };
1694
+ };
1695
+ password: {
1696
+ /** 验证用户密码 */
1697
+ post: (body: {
1698
+ password: string;
1699
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1700
+ };
1701
+ };
1702
+ users: {
1703
+ batch: {
1704
+ /** 根据 ID 列表批量查询用户 */
1705
+ post: (body: {
1706
+ userIds: string[];
1707
+ appId?: string;
1708
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1709
+ };
1710
+ subscription: {
1711
+ /** 供 billing-server 更新用户的订阅信息和权益 */
1712
+ post: (body: {
1713
+ userId: string;
1714
+ appId: string;
1715
+ subscriptionId?: string | null;
1716
+ subscriptionStatus?: string | null;
1717
+ entitlements?: Record<string, unknown>;
1718
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1719
+ };
1720
+ search: {
1721
+ /** 供其他服务按昵称/邮箱/手机号搜索用户 */
1722
+ post: (body: {
1723
+ appId: string;
1724
+ keyword: string;
1725
+ limit?: number;
1726
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1727
+ };
1728
+ stats: {
1729
+ /** 供其他服务获取用户数量统计 */
1730
+ post: (body: {
1731
+ appId?: string;
1732
+ appIds?: string[];
1733
+ startTime?: string;
1734
+ endTime?: string;
1735
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1736
+ };
1737
+ trend: {
1738
+ /** 供 analytics 服务获取用户增长趋势 */
1739
+ post: (body: {
1740
+ appId: string;
1741
+ startTime: string;
1742
+ endTime: string;
1743
+ granularity: "hour" | "day" | "month";
1744
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1745
+ };
1746
+ organizations: {
1747
+ /** 供 ones-server 更新用户的组织列表 */
1748
+ post: (body: {
1749
+ userId: string;
1750
+ action: "add" | "remove";
1751
+ organizationId: string;
1752
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1753
+ };
1754
+ delete: {
1755
+ /** 管理员删除用户账号 */
1756
+ post: (body: {
1757
+ id: string;
1758
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1759
+ };
1760
+ update: {
1761
+ /** 管理员更新用户信息 */
1762
+ post: (body: {
1763
+ id: string;
1764
+ phone: string;
1765
+ roleId: string;
1766
+ email: string;
1767
+ status: "normal" | "forbidden";
1768
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1769
+ phone: {
1770
+ /** 管理员更新用户手机号 */
1771
+ post: (body: {
1772
+ id: string;
1773
+ phone: string;
1774
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1775
+ };
1776
+ status: {
1777
+ /** 管理员更新用户启用状态 */
1778
+ post: (body: {
1779
+ id: string;
1780
+ status: "normal" | "forbidden";
1781
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1782
+ };
1783
+ baseInfo: {
1784
+ /** 管理员更新用户基本信息 */
1785
+ post: (body: {
1786
+ id: string;
1787
+ avatar?: string;
1788
+ nickname?: string;
1789
+ description?: string;
1790
+ roleId?: string;
1791
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1792
+ };
1793
+ email: {
1794
+ /** 用户更新自己的邮箱 */
1795
+ post: (body: {
1796
+ userToken: string;
1797
+ emailVerifyId: string;
1798
+ email: string;
1799
+ password: string;
1800
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1801
+ };
1802
+ password: {
1803
+ /** 用户更新自己的密码 */
1804
+ post: (body: {
1805
+ password: string;
1806
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1807
+ };
1808
+ };
1809
+ deleteAccount: {
1810
+ /** 用户主动注销自己的账号 */
1811
+ post: (body: {
1812
+ password: string;
1813
+ userToken: string;
1814
+ emailVerifyId: string;
1815
+ confirmText?: string;
1816
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1817
+ };
1818
+ unbind: {
1819
+ email: {
1820
+ /** 用户解绑自己的邮箱 */
1821
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1822
+ };
1823
+ };
1824
+ profile: {
1825
+ /** 用户更新自己的个人资料 */
1826
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1827
+ };
1828
+ me: {
1829
+ /** 获取当前登录用户的信息 */
1830
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1831
+ };
1832
+ find: {
1833
+ /** 分页查询用户列表 */
1834
+ post: (body: {
1835
+ current: number;
1836
+ pageSize: number;
1837
+ where: {
1838
+ id?: string;
1839
+ email?: string;
1840
+ phone?: string;
1841
+ status?: "normal" | "forbidden";
1842
+ };
1843
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1844
+ };
1845
+ findOne: {
1846
+ /** 根据 ID 查询用户详情 */
1847
+ post: (body: {
1848
+ id: string;
1849
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1850
+ };
1851
+ getUsers: {
1852
+ /** 根据 ID 列表批量获取用户 */
1853
+ post: (body: {
1854
+ userIds: string[];
1855
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1856
+ };
1857
+ 'with-points': {
1858
+ /** 查询用户详情含积分信息 */
1859
+ post: (body: {
1860
+ userId: string;
1861
+ appId: string;
1862
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1863
+ };
1864
+ 'referral-tree': {
1865
+ /** 查询用户推荐关系树 */
1866
+ post: (body: {
1867
+ userId: string;
1868
+ appId: string;
1869
+ depth?: number;
1870
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1871
+ };
1872
+ 'activity-analysis': {
1873
+ /** 分析用户活跃度 */
1874
+ post: (body: {
1875
+ userId: string;
1876
+ appId: string;
1877
+ days?: number;
1878
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1879
+ };
1880
+ 'batch-stats': {
1881
+ /** 批量获取用户统计数据 */
1882
+ post: (body: {
1883
+ userIds: string[];
1884
+ appId: string;
1885
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1886
+ };
1887
+ export: {
1888
+ points: {
1889
+ /** 导出用户积分报告 */
1890
+ post: (body: {
1891
+ appId: string;
1892
+ startDate?: string;
1893
+ endDate?: string;
1894
+ format?: "json" | "csv";
1895
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1896
+ };
1897
+ activity: {
1898
+ /** 导出用户活跃度报告 */
1899
+ post: (body: {
1900
+ appId: string;
1901
+ days?: number;
1902
+ format?: "json" | "csv";
1903
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1904
+ };
1905
+ referral: {
1906
+ /** 导出用户推荐关系报告 */
1907
+ post: (body: {
1908
+ appId: string;
1909
+ format?: "json" | "csv";
1910
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1911
+ };
1912
+ };
1913
+ sync: {
1914
+ /** 获取待同步的用户数据 */
1915
+ post: (body: {
1916
+ lastSyncTime?: string;
1917
+ limit?: number;
1918
+ appId?: string;
1919
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1920
+ };
1921
+ events: {
1922
+ /** 获取用户数据变更事件 */
1923
+ post: (body: {
1924
+ since: string;
1925
+ appId?: string;
1926
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1927
+ };
1928
+ statistics: {
1929
+ /** 获取用户整体统计数据 */
1930
+ post: (body: {
1931
+ appId?: string;
1932
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1933
+ };
1934
+ };
1935
+ oauth: {
1936
+ github: {
1937
+ login: {
1938
+ /** 跳转到 GitHub 授权登录 */
1939
+ get: (query?: {
1940
+ appId: string;
1941
+ referrerId?: string;
1942
+ redirectUri?: string;
1943
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1944
+ };
1945
+ callback: {
1946
+ /** GitHub 授权回调 */
1947
+ get: (query?: {
1948
+ code: string;
1949
+ state: string;
1950
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1951
+ };
1952
+ };
1953
+ google: {
1954
+ login: {
1955
+ /** 跳转到 Google 授权登录 */
1956
+ get: (query?: {
1957
+ appId: string;
1958
+ referrerId?: string;
1959
+ redirectUri?: string;
1960
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1961
+ };
1962
+ callback: {
1963
+ /** Google 授权回调 */
1964
+ get: (query?: {
1965
+ code: string;
1966
+ state: string;
1967
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1968
+ };
1969
+ };
1970
+ microsoft: {
1971
+ login: {
1972
+ /** 跳转到 Microsoft 授权登录 */
1973
+ get: (query?: {
1974
+ appId: string;
1975
+ referrerId?: string;
1976
+ redirectUri?: string;
1977
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1978
+ };
1979
+ callback: {
1980
+ /** Microsoft 授权回调 */
1981
+ get: (query?: {
1982
+ code: string;
1983
+ state: string;
1984
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1985
+ };
1986
+ };
1987
+ };
1988
+ oauth2: {
1989
+ authorize: {
1990
+ /** 获取 OAuth2 授权码 */
1991
+ post: (body: {
1992
+ client_id: string;
1993
+ redirect_uri: string;
1994
+ scope: string;
1995
+ state: string;
1996
+ response_type: "code" | "token";
1997
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1998
+ };
1999
+ token: {
2000
+ /** 使用授权码获取访问令牌 */
2001
+ post: (body: {
2002
+ grant_type: string;
2003
+ code: string;
2004
+ redirect_uri: string;
2005
+ client_id: string;
2006
+ client_secret?: string;
2007
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2008
+ };
2009
+ refresh: {
2010
+ /** 刷新访问令牌 */
2011
+ post: (body: {
2012
+ refresh_token: string;
2013
+ client_id: string;
2014
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2015
+ };
2016
+ revoke: {
2017
+ /** 撤销访问令牌 */
2018
+ post: (body: {
2019
+ token: string;
2020
+ client_id: string;
2021
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2022
+ };
2023
+ };
2024
+ auth: {
2025
+ signIn: {
2026
+ /** 用户通过邮箱和密码登录 */
2027
+ post: (body: {
2028
+ email: string;
2029
+ password: string;
2030
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2031
+ unified: {
2032
+ /** 用户通过邮箱/手机号登录(自动识别) */
2033
+ post: (body: {
2034
+ identifier: string;
2035
+ password?: string;
2036
+ code?: string;
2037
+ method: "password" | "code";
2038
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2039
+ };
2040
+ };
2041
+ signUp: {
2042
+ /** 用户通过邮箱注册账号 */
2043
+ post: (body: {
2044
+ email: string;
2045
+ password: string;
2046
+ referrerId?: string;
2047
+ userToken: string;
2048
+ emailVerifyId: string;
2049
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2050
+ phone: {
2051
+ /** 用户通过手机号注册账号 */
2052
+ post: (body: {
2053
+ phone: string;
2054
+ code: string;
2055
+ password?: string;
2056
+ referrerId?: string;
2057
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2058
+ };
2059
+ };
2060
+ refresh: {
2061
+ /** 使用 refreshToken 刷新 JWT */
2062
+ post: (body: {
2063
+ refreshToken: string;
2064
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2065
+ };
2066
+ signOut: {
2067
+ /** 用户主动登出当前会话 */
2068
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2069
+ };
2070
+ logout: {
2071
+ /** 登出指定设备的会话 */
2072
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2073
+ };
2074
+ logoutAll: {
2075
+ /** 登出所有设备的会话 */
2076
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2077
+ };
2078
+ sessions: {
2079
+ /** 获取用户所有登录会话 */
2080
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2081
+ cleanup: {
2082
+ /** 清理用户过期的会话 */
2083
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2084
+ };
2085
+ ':id': {
2086
+ revoke: {
2087
+ /** 撤销指定的登录会话 */
2088
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2089
+ };
2090
+ };
2091
+ };
2092
+ passwordVerify: {
2093
+ /** 验证用户当前密码 */
2094
+ post: (body: {
2095
+ password: string;
2096
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2097
+ };
2098
+ resetPassword: {
2099
+ /** 用户通过验证码重置密码 */
2100
+ post: (body: {
2101
+ userToken: string;
2102
+ emailVerifyId: string;
2103
+ email: string;
2104
+ password: string;
2105
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2106
+ };
2107
+ verify: {
2108
+ token: {
2109
+ /** 验证 JWT Token 有效性 */
2110
+ post: (body: {
2111
+ token: string;
2112
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2113
+ };
2114
+ };
2115
+ bind: {
2116
+ email: {
2117
+ /** 用户绑定邮箱地址 */
2118
+ post: (body: {
2119
+ email: string;
2120
+ userToken: string;
2121
+ emailVerifyId: string;
2122
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2123
+ };
2124
+ phone: {
2125
+ /** 用户绑定手机号 */
2126
+ post: (body: {
2127
+ phone: string;
2128
+ code: string;
2129
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2130
+ };
2131
+ };
2132
+ };
2133
+ passkey: {
2134
+ auth: {
2135
+ options: {
2136
+ /** 获取 Passkey 登录认证选项 */
2137
+ post: (body: {
2138
+ email?: string;
2139
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2140
+ };
2141
+ verify: {
2142
+ /** 用户通过 Passkey 无密码登录 */
2143
+ post: (body: {
2144
+ response: unknown;
2145
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2146
+ };
2147
+ };
2148
+ register: {
2149
+ options: {
2150
+ /** 获取 Passkey 注册选项 */
2151
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2152
+ };
2153
+ verify: {
2154
+ /** 用户注册新的 Passkey 凭证 */
2155
+ post: (body: {
2156
+ response: unknown;
2157
+ name?: string;
2158
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2159
+ };
2160
+ };
2161
+ list: {
2162
+ /** 获取用户已注册的 Passkey 列表 */
2163
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2164
+ };
2165
+ delete: {
2166
+ /** 用户删除 Passkey 凭证 */
2167
+ post: (body: {
2168
+ credentialId: string;
2169
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2170
+ };
2171
+ rename: {
2172
+ /** 修改 Passkey 名称 */
2173
+ post: (body: {
2174
+ credentialId: string;
2175
+ name: string;
2176
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2177
+ };
2178
+ };
2179
+ apps: {
2180
+ authPageInfo: {
2181
+ /** 获取应用认证页面配置信息 */
2182
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2183
+ };
2184
+ create: {
2185
+ /** 创建新应用 */
2186
+ post: (body: {
2187
+ appKey: string;
2188
+ name: string;
2189
+ homePageUrl?: string;
2190
+ authorizationCallback?: string;
2191
+ applicationLogo?: string;
2192
+ description?: string;
2193
+ extensions?: Record<string, string>;
2194
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2195
+ };
2196
+ delete: {
2197
+ /** 删除应用 */
2198
+ post: (body: {
2199
+ id: string;
2200
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2201
+ };
2202
+ update: {
2203
+ /** 更新应用信息 */
2204
+ post: (body: {
2205
+ id: string;
2206
+ appKey?: string;
2207
+ name?: string;
2208
+ homePageUrl?: string;
2209
+ authorizationCallback?: string;
2210
+ applicationLogo?: string;
2211
+ description?: string;
2212
+ defaultRoleId?: string;
2213
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2214
+ emailConfig: {
2215
+ /** 更新应用邮件发送配置 */
2216
+ post: (body: {
2217
+ supportEmail?: string;
2218
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2219
+ };
2220
+ brand: {
2221
+ /** 更新应用品牌展示配置 */
2222
+ post: (body: {
2223
+ theme: "dark" | "light";
2224
+ logo: string;
2225
+ favicon: string;
2226
+ backgroundType: "color" | "image";
2227
+ backgroundImage: string;
2228
+ backgroundColor: string;
2229
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2230
+ };
2231
+ emailAuth: {
2232
+ /** 更新邮箱认证相关配置 */
2233
+ post: (body: {
2234
+ enabled: boolean;
2235
+ confirmEmail: boolean;
2236
+ expiration: number;
2237
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2238
+ };
2239
+ passwordAuth: {
2240
+ /** 更新密码认证相关配置 */
2241
+ post: (body: {
2242
+ minPasswordComplexity: number;
2243
+ rejectBreachedPasswords: boolean;
2244
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2245
+ };
2246
+ sessionsAuth: {
2247
+ /** 更新登录会话相关配置 */
2248
+ post: (body: {
2249
+ maximumSessionLength: number;
2250
+ accessTokenDuration: number;
2251
+ maximumSessionLengthUnit: string;
2252
+ accessTokenDurationUnit: string;
2253
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2254
+ };
2255
+ signUpAuth: {
2256
+ /** 更新用户注册相关配置 */
2257
+ post: (body: {
2258
+ enabled: boolean;
2259
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2260
+ };
2261
+ singleSignOn: {
2262
+ /** 更新单点登录 (SSO) 配置 */
2263
+ post: (body: {
2264
+ enabled: boolean;
2265
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2266
+ };
2267
+ oauth: {
2268
+ /** 更新第三方 OAuth 登录配置 */
2269
+ post: (body: {
2270
+ type: "google" | "microsoft" | "github" | "wechat";
2271
+ enabled: boolean;
2272
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2273
+ };
2274
+ aboutUs: {
2275
+ personalInformationCollectionList: {
2276
+ /** 更新个人信息收集清单配置 */
2277
+ post: (body: {
2278
+ value: {
2279
+ type: "doc";
2280
+ content: unknown[];
2281
+ };
2282
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2283
+ };
2284
+ thirdPartyInformationSharingList: {
2285
+ /** 更新第三方信息共享清单配置 */
2286
+ post: (body: {
2287
+ value: {
2288
+ type: "doc";
2289
+ content: unknown[];
2290
+ };
2291
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2292
+ };
2293
+ userServiceAgreement: {
2294
+ /** 更新用户服务协议配置 */
2295
+ post: (body: {
2296
+ value: {
2297
+ type: "doc";
2298
+ content: unknown[];
2299
+ };
2300
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2301
+ };
2302
+ privacyPolicy: {
2303
+ /** 更新隐私政策配置 */
2304
+ post: (body: {
2305
+ value: {
2306
+ type: "doc";
2307
+ content: unknown[];
2308
+ };
2309
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2310
+ };
2311
+ licenseInformation: {
2312
+ /** 更新许可信息配置 */
2313
+ post: (body: {
2314
+ value: {
2315
+ type: "doc";
2316
+ content: unknown[];
2317
+ };
2318
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2319
+ };
2320
+ };
2321
+ };
2322
+ find: {
2323
+ /** 分页查询应用列表 */
2324
+ post: (body: {
2325
+ current: number;
2326
+ pageSize: number;
2327
+ where: {
2328
+ id?: string;
2329
+ appKey?: string;
2330
+ name?: string;
2331
+ homePageUrl?: string;
2332
+ extensions?: Record<string, string>;
2333
+ };
2334
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2335
+ };
2336
+ findAll: {
2337
+ /** 查询用户所有应用 */
2338
+ post: (body: {
2339
+ where: {
2340
+ id?: string;
2341
+ appKey?: string;
2342
+ name?: string;
2343
+ homePageUrl?: string;
2344
+ extensions?: Record<string, string>;
2345
+ };
2346
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2347
+ };
2348
+ findOne: {
2349
+ /** 根据 ID 查询应用详情 */
2350
+ post: (body: {
2351
+ id: string;
2352
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2353
+ };
2354
+ findByIds: {
2355
+ /** 根据 ID 列表批量查询应用 */
2356
+ post: (body: {
2357
+ ids: string[];
2358
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2359
+ };
2360
+ emailConfigInfo: {
2361
+ /** 获取应用邮件配置信息 */
2362
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2363
+ };
2364
+ };
2365
+ roles: {
2366
+ create: {
2367
+ /** 创建新角色 */
2368
+ post: (body: {
2369
+ name: string;
2370
+ roleKey: string;
2371
+ permissions?: string[];
2372
+ description: string;
2373
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2374
+ };
2375
+ delete: {
2376
+ /** 删除角色 */
2377
+ post: (body: {
2378
+ id: string;
2379
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2380
+ };
2381
+ update: {
2382
+ /** 更新角色信息 */
2383
+ post: (body: {
2384
+ id: string;
2385
+ name: string;
2386
+ roleKey: string;
2387
+ permissions?: string[];
2388
+ description: string;
2389
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2390
+ };
2391
+ find: {
2392
+ /** 分页查询角色列表 */
2393
+ post: (body: {
2394
+ current: number;
2395
+ pageSize: number;
2396
+ where: {
2397
+ name?: string;
2398
+ roleKey?: string;
2399
+ description?: string;
2400
+ };
2401
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2402
+ };
2403
+ findOne: {
2404
+ /** 根据 ID 查询角色详情 */
2405
+ post: (body: {
2406
+ id: string;
2407
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2408
+ };
2409
+ options: {
2410
+ /** 获取角色下拉选项 */
2411
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2412
+ };
2413
+ };
2414
+ permissions: {
2415
+ create: {
2416
+ /** 创建新权限 */
2417
+ post: (body: {
2418
+ name: string;
2419
+ permissionKey: string;
2420
+ description: string;
2421
+ isPublic: boolean;
2422
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2423
+ };
2424
+ delete: {
2425
+ /** 删除权限 */
2426
+ post: (body: {
2427
+ id: string;
2428
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2429
+ };
2430
+ update: {
2431
+ /** 更新权限信息 */
2432
+ post: (body: {
2433
+ id: string;
2434
+ name: string;
2435
+ permissionKey: string;
2436
+ description: string;
2437
+ isPublic: boolean;
2438
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2439
+ };
2440
+ find: {
2441
+ /** 分页查询权限列表 */
2442
+ post: (body: {
2443
+ current: number;
2444
+ pageSize: number;
2445
+ where: {
2446
+ name?: string;
2447
+ permissionKey?: string;
2448
+ description?: string;
2449
+ };
2450
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2451
+ };
2452
+ findOne: {
2453
+ /** 根据 ID 查询权限详情 */
2454
+ post: (body: {
2455
+ id: string;
2456
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2457
+ };
2458
+ options: {
2459
+ /** 获取权限下拉选项 */
2460
+ post: (body: {
2461
+ excludePublic?: boolean;
2462
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2463
+ };
2464
+ };
2465
+ referrer: {
2466
+ find: {
2467
+ /** 分页查询推荐人列表 */
2468
+ post: (body: {
2469
+ current: number;
2470
+ pageSize: number;
2471
+ where: {
2472
+ referrerId?: string;
2473
+ referrerEmail?: string;
2474
+ referrerPhone?: string;
2475
+ };
2476
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2477
+ };
2478
+ findOne: {
2479
+ /** 根据 ID 查询推荐人详情 */
2480
+ post: (body: {
2481
+ id: string;
2482
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2483
+ };
2484
+ referees: {
2485
+ /** 查询推荐人邀请的用户列表 */
2486
+ post: (body: {
2487
+ current: number;
2488
+ pageSize: number;
2489
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2490
+ };
2491
+ delete: {
2492
+ /** 删除推荐记录 */
2493
+ post: (body: {
2494
+ id: string;
2495
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2496
+ };
2497
+ getReferrerStatistics: {
2498
+ /** 获取推荐统计数据 */
2499
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2500
+ };
2501
+ getReferralCountChart: {
2502
+ /** 获取推荐数量趋势图表 */
2503
+ post: (body: {
2504
+ startTime: string;
2505
+ endTime: string;
2506
+ granularity: "minute" | "hour" | "day" | "month" | "year";
2507
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2508
+ };
2509
+ getReferralConversionChart: {
2510
+ /** 获取推荐转化率趋势图表 */
2511
+ post: (body: {
2512
+ startTime: string;
2513
+ endTime: string;
2514
+ granularity: "minute" | "hour" | "day" | "month" | "year";
2515
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2516
+ };
2517
+ getAvgReferralsChart: {
2518
+ /** 获取平均推荐数趋势图表 */
2519
+ post: (body: {
2520
+ startTime: string;
2521
+ endTime: string;
2522
+ granularity: "minute" | "hour" | "day" | "month" | "year";
2523
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2524
+ };
2525
+ getReferralOrderAmountChart: {
2526
+ /** 获取推荐订单金额趋势图表 */
2527
+ post: (body: {
2528
+ startTime: string;
2529
+ endTime: string;
2530
+ granularity: "minute" | "hour" | "day" | "month" | "year";
2531
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2532
+ };
2533
+ getReferralOrderCountChart: {
2534
+ /** 获取推荐订单数量趋势图表 */
2535
+ post: (body: {
2536
+ startTime: string;
2537
+ endTime: string;
2538
+ granularity: "minute" | "hour" | "day" | "month" | "year";
2539
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2540
+ };
2541
+ };
2542
+ authLogs: {
2543
+ list: {
2544
+ /** 分页获取认证审计日志列表 */
2545
+ post: (body: {
2546
+ page?: number;
2547
+ pageSize?: number;
2548
+ userId?: string;
2549
+ event?: string;
2550
+ method?: string;
2551
+ success?: boolean;
2552
+ startTime?: string;
2553
+ endTime?: string;
2554
+ clientIp?: string;
2555
+ email?: string;
2556
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2557
+ };
2558
+ stats: {
2559
+ /** 获取认证审计日志统计数据 */
2560
+ post: (body: {
2561
+ startTime?: string;
2562
+ endTime?: string;
2563
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2564
+ };
2565
+ ':id': {
2566
+ /** 根据 ID 获取认证审计日志详情 */
2567
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2568
+ };
2569
+ };
2570
+ inviteCodes: {
2571
+ create: {
2572
+ /** 创建新邀请码 */
2573
+ post: (body: {
2574
+ name: string;
2575
+ type: "personal" | "channel" | "campaign";
2576
+ channel?: string;
2577
+ maxUses?: number;
2578
+ expiresAt?: string;
2579
+ description?: string;
2580
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2581
+ };
2582
+ delete: {
2583
+ /** 删除邀请码 */
2584
+ post: (body: {
2585
+ id: string;
2586
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2587
+ };
2588
+ update: {
2589
+ /** 更新邀请码信息 */
2590
+ post: (body: {
2591
+ id: string;
2592
+ name: string;
2593
+ channel?: string;
2594
+ maxUses?: number;
2595
+ expiresAt?: string;
2596
+ status: "active" | "inactive" | "expired";
2597
+ description?: string;
2598
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2599
+ };
2600
+ find: {
2601
+ /** 分页查询邀请码列表 */
2602
+ post: (body: {
2603
+ current: number;
2604
+ pageSize: number;
2605
+ where: {
2606
+ name?: string;
2607
+ code?: string;
2608
+ type?: string;
2609
+ channel?: string;
2610
+ status?: string;
2611
+ };
2612
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2613
+ };
2614
+ findOne: {
2615
+ /** 根据 ID 查询邀请码详情 */
2616
+ post: (body: {
2617
+ id: string;
2618
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2619
+ };
2620
+ validate: {
2621
+ /** 验证邀请码是否有效 */
2622
+ post: (body: {
2623
+ code: string;
2624
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2625
+ };
2626
+ options: {
2627
+ type: {
2628
+ /** 获取邀请码类型下拉选项 */
2629
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2630
+ };
2631
+ status: {
2632
+ /** 获取邀请码状态下拉选项 */
2633
+ post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2634
+ };
2635
+ };
2636
+ };
2637
+ security: {
2638
+ ip: {
2639
+ list: {
2640
+ /** 获取 IP 黑白名单规则列表 */
2641
+ post: (body: {
2642
+ appId?: string;
2643
+ type?: "whitelist" | "blacklist";
2644
+ page?: number;
2645
+ pageSize?: number;
2646
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2647
+ };
2648
+ add: {
2649
+ /** 添加 IP 黑白名单规则 */
2650
+ post: (body: {
2651
+ appId?: string;
2652
+ ip: string;
2653
+ type: "whitelist" | "blacklist";
2654
+ reason?: string;
2655
+ expiresInMinutes?: number;
2656
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2657
+ };
2658
+ remove: {
2659
+ /** 删除 IP 黑白名单规则 */
2660
+ post: (body: {
2661
+ id: string;
2662
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2663
+ };
2664
+ block: {
2665
+ /** 将 IP 加入黑名单 */
2666
+ post: (body: {
2667
+ ip: string;
2668
+ reason: string;
2669
+ durationMinutes?: number;
2670
+ appId?: string;
2671
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2672
+ };
2673
+ unblock: {
2674
+ /** 将 IP 从黑名单移除 */
2675
+ post: (body: {
2676
+ ip: string;
2677
+ appId?: string;
2678
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2679
+ };
2680
+ };
2681
+ alerts: {
2682
+ list: {
2683
+ /** 获取可疑登录告警列表 */
2684
+ post: (body: {
2685
+ appId?: string;
2686
+ type?: string;
2687
+ riskLevel?: "low" | "medium" | "high" | "critical";
2688
+ resolved?: boolean;
2689
+ page?: number;
2690
+ pageSize?: number;
2691
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2692
+ };
2693
+ resolve: {
2694
+ /** 标记安全告警为已处理 */
2695
+ post: (body: {
2696
+ alertId: string;
2697
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2698
+ };
2699
+ stats: {
2700
+ /** 获取安全告警统计数据 */
2701
+ post: (body: {
2702
+ appId?: string;
2703
+ }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2704
+ };
2705
+ };
2706
+ detection: {
2707
+ config: {
2708
+ /** 获取可疑登录检测配置 */
2709
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2710
+ };
2711
+ };
2712
+ };
2713
+ webhooks: {
2714
+ events: {
2715
+ /** 获取所有可用的 Webhook 事件类型 */
2716
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2717
+ ':id': {
2718
+ /** 获取指定分类的 Webhook 事件 */
2719
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2720
+ };
2721
+ };
2722
+ categories: {
2723
+ /** 获取所有 Webhook 事件分类 */
2724
+ get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2725
+ };
2726
+ };
2727
+ }
2728
+ /** API 客户端类型别名(基于 EdenClient 推断,提供完整类型检查) */
2729
+ export type ApiClientType = EdenClient<Api>;
2730
+ /**
2731
+ * 创建类型安全的 API 客户端
2732
+ *
2733
+ * @example
2734
+ * ```typescript
2735
+ * import { createClient } from '@vafast/api-client'
2736
+ * import { createApiClient } from './api.generated'
2737
+ *
2738
+ * const client = createClient('/api').use(authMiddleware)
2739
+ * const api = createApiClient(client)
2740
+ *
2741
+ * // 完整的 IDE 智能提示和类型检查
2742
+ * const { data, error } = await api.users.find.post({ current: 1, pageSize: 10 })
2743
+ * // ❌ 错误路径会被 TypeScript 检测到
2744
+ * // api.nonExistent.post() // Error: Property 'nonExistent' does not exist
2745
+ * ```
2746
+ */
2747
+ export declare function createApiClient(client: Client): EdenClient<Api>;