@huyooo/ui 3.0.0 → 4.0.1

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 (64) hide show
  1. package/dist/{AuthkitAppSetting-DhLRYlL_.js → AuthkitAppSetting-Cg8j3nES.js} +41 -42
  2. package/dist/{Contact-CNLjyOCR.js → Contact-D9NRguTE.js} +4 -4
  3. package/dist/{CustomTable-B1KjkixL.js → CustomTable-C15Dgbks.js} +4 -4
  4. package/dist/{FeedbackItem-BP-SiJ2u.js → FeedbackItem-hnJ7YXdE.js} +1 -1
  5. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-Ddy1jcdL.js +1526 -0
  6. package/dist/{LandingPageSectionTabs-BEAnU8B0.js → LandingPageSectionTabs-BJQeq3V5.js} +515 -402
  7. package/dist/{LegalDocViewer-DkVW9tCh.js → LegalDocViewer-BuzKCAfO.js} +44 -45
  8. package/dist/{Menu-uCexrsKP.js → Menu-C6NA8hCs.js} +1 -1
  9. package/dist/{MessageHandle-BKMBtqZM.js → MessageHandle-Cu23QspL.js} +13 -14
  10. package/dist/{MessageList-BK4u5DCH.js → MessageList-DdDKl9wk.js} +6 -7
  11. package/dist/{PaySubscriptions-tJSQUmhE.js → PaySubscriptions-ZSvRTG2i.js} +14 -15
  12. package/dist/{PricingPlans-BhcDv8uk.js → PricingPlans-DTGJ-_us.js} +13 -14
  13. package/dist/{ReferrerReferees-QTZnOCJB.js → ReferrerReferees-gkKtDau-.js} +25 -26
  14. package/dist/{Upload.vue_vue_type_script_setup_true_lang-CZjNlns_.js → Upload.vue_vue_type_script_setup_true_lang-C6B5_Hjo.js} +2 -2
  15. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BQgy_CeZ.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BH6l-SKs.js} +34 -35
  16. package/dist/{WidthContainer-BEeYYOat.js → WidthContainer-DXwIiG2x.js} +32 -32
  17. package/dist/{apiClients-8_c5cDW5.js → apiClients-5u4_uxFE.js} +47 -48
  18. package/dist/authkit.js +10 -10
  19. package/dist/common/globalConfig.d.ts +4 -4
  20. package/dist/common.js +3 -3
  21. package/dist/components/LandingPage/LandingPageHero.vue.d.ts +22 -0
  22. package/dist/components/Pay/PricingPlans.vue.d.ts +1 -1
  23. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +21 -0
  24. package/dist/composables/useAccessPosture.d.ts +31 -0
  25. package/dist/composables.d.ts +1 -0
  26. package/dist/composables.js +53 -49
  27. package/dist/feedback.js +3 -3
  28. package/dist/{fetchAuthPageAboutUs--dArFYk6.js → fetchAuthPageAboutUs-C-jQ44QK.js} +2 -2
  29. package/dist/{index-D9YtlhTa.js → index-5OR_BVTz.js} +4 -5
  30. package/dist/{index-D56hUMeD.js → index-BIxwv9Xs.js} +1 -1
  31. package/dist/landingPage.js +1 -1
  32. package/dist/legalDocs/constants.d.ts +1 -0
  33. package/dist/main.js +266 -262
  34. package/dist/message.js +36 -37
  35. package/dist/pay.js +5 -5
  36. package/dist/privateCom.js +1 -1
  37. package/dist/referrer.js +1 -1
  38. package/dist/{runtime-CDEl4QQl.js → runtime-B-tHI8-q.js} +191 -186
  39. package/dist/style.css +1 -1
  40. package/dist/types/api/auth.generated.d.ts +188 -37
  41. package/dist/types/api/ones.generated.d.ts +1512 -364
  42. package/dist/types/app.d.ts +9 -0
  43. package/dist/types/auth.d.ts +2 -1
  44. package/dist/upload.js +2 -2
  45. package/dist/useAccessPosture-DBNTLWQn.js +219 -0
  46. package/dist/{useAuthkitAppsAuthPageInfo-mv7hOnhi.js → useAuthkitAppsAuthPageInfo-CsivtUQH.js} +40 -33
  47. package/dist/{useAuthkitAuth-CO61XogP.js → useAuthkitAuth-CV60Hc3o.js} +56 -51
  48. package/dist/useAuthkitCreateAndUpdate-DJIn96EE.js +24 -0
  49. package/dist/{useAuthkitUsersProfile-CF7t2Y7T.js → useAuthkitUsersProfile-CQOLEAxC.js} +3 -3
  50. package/dist/{useBillingStatusOptions-C8fwW-AI.js → useBillingStatusOptions-BHVLZhEB.js} +1 -1
  51. package/dist/{useBillingSubscriptionSummary-C2E3p68U.js → useBillingSubscriptionSummary-DakAVL-3.js} +1 -1
  52. package/dist/{useEnsureAuthenticated-Q7EHguY4.js → useEnsureAuthenticated-BYGI2uYZ.js} +2 -2
  53. package/dist/{useLegalDocs-DUbab5R9.js → useLegalDocs-BrYWCDh3.js} +6 -5
  54. package/dist/{useMessageNotifications-BXimltcx.js → useMessageNotifications-Dcl8TXr-.js} +1 -1
  55. package/dist/{usePageSEO-D8CocvOJ.js → usePageSEO-BHYaXnDU.js} +12 -13
  56. package/dist/useRoutePermission-BkWHsFxN.js +212 -0
  57. package/dist/{useSubscriptionCheckout-Bic8vKgm.js → useSubscriptionCheckout-QSNro05_.js} +17 -18
  58. package/dist/user.js +1 -1
  59. package/dist/{userMenuModal-D-nDaYqM.js → userMenuModal-B4m4CHlW.js} +1 -1
  60. package/package.json +1 -1
  61. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-BXqxUXuu.js +0 -1516
  62. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  63. package/dist/useAuthkitCreateAndUpdate-CYIcEuub.js +0 -25
  64. package/dist/useRoutePermission-Bvn-J8bp.js +0 -249
@@ -1,22 +1,189 @@
1
- import { ApiResponse, RequestConfig, Client, EdenClient } from '@vafast/api-client';
1
+ import { RequestConfig, Client, EdenClient, RequestBuilder } from '@vafast/api-client';
2
2
  /** API 契约类型 */
3
3
  export type Api = {
4
4
  health: {
5
- /** 检查服务健康状态 */
6
5
  get: {
7
6
  return: any;
8
7
  };
9
8
  };
10
9
  'api-spec': {
11
- /** 获取 API 规范,用于类型同步 */
12
10
  get: {
13
11
  return: any;
14
12
  };
15
13
  };
16
- webhook: {
17
- /** Webhook 接收测试端点 */
18
- post: {
19
- return: any;
14
+ internal: {
15
+ queue: {
16
+ storage: {
17
+ 'cos-settlement': {
18
+ /** 按价目表日窗口结算 COS 存储 GB·天用量(队列每日北京时间 0:05 触发) */
19
+ post: {
20
+ body: {
21
+ appId: string;
22
+ queueKey: string;
23
+ queueDefinitionId: string;
24
+ taskRunId: string;
25
+ queueServiceKey: string;
26
+ context: {
27
+ triggerSource: "manual" | "internal" | "scheduler" | "planner" | "retry";
28
+ actor: {
29
+ type: "user" | "service" | "system" | "queue";
30
+ id?: string;
31
+ };
32
+ businessContext: {
33
+ resourceType?: string;
34
+ resourceId?: string;
35
+ operation?: string;
36
+ };
37
+ traceContext: {
38
+ requestId?: string;
39
+ traceId?: string;
40
+ parentTaskRunId?: string;
41
+ };
42
+ };
43
+ } & {
44
+ payload: {
45
+ scheduledAt?: string;
46
+ source?: string;
47
+ schedulerJobId?: string;
48
+ };
49
+ };
50
+ return: any;
51
+ };
52
+ };
53
+ 'cos-settlement-scan': {
54
+ /** 供 queue-server 平台调度触发,按有文件的 app 逐个入队结算任务 */
55
+ post: {
56
+ body: {
57
+ queueServiceKey?: string;
58
+ scheduledAt?: string;
59
+ source?: string;
60
+ };
61
+ return: any;
62
+ };
63
+ };
64
+ };
65
+ };
66
+ notificationGroups: {
67
+ resolve: {
68
+ /** 按 ID 列表解析并合并通知组投递配置 */
69
+ post: {
70
+ body: {
71
+ appId: string;
72
+ groupIds: string[];
73
+ };
74
+ return: any;
75
+ };
76
+ };
77
+ dispatch: {
78
+ /** 解析通知组并合并投递邮件与 Webhook */
79
+ post: {
80
+ body: {
81
+ appId: string;
82
+ groupIds: string[];
83
+ alertEvent?: {
84
+ kind: "triggered" | "test" | "preview";
85
+ ruleId?: string;
86
+ ruleName: string;
87
+ metric: string;
88
+ metricLabel: string;
89
+ operator: string;
90
+ operatorLabel: string;
91
+ threshold: number;
92
+ thresholdText: string;
93
+ currentValue?: number;
94
+ currentValueText?: string;
95
+ path?: string;
96
+ appId?: string;
97
+ windowMinutes?: number;
98
+ requestCount?: number;
99
+ minRequests?: number;
100
+ triggeredAt: string;
101
+ evaluationReason?: string;
102
+ conditionText?: string;
103
+ wouldTrigger?: boolean;
104
+ };
105
+ securityAlert?: {
106
+ alertId: string;
107
+ appId: string;
108
+ type: string;
109
+ typeLabel: string;
110
+ riskLevel: string;
111
+ riskLevelLabel: string;
112
+ clientIp: string;
113
+ email?: string;
114
+ userId?: string;
115
+ relatedAccountSummary?: string | null;
116
+ resolved: boolean;
117
+ autoBlocked: boolean;
118
+ triggeredAt: string;
119
+ details: Record<string, unknown>;
120
+ };
121
+ businessEvent?: {
122
+ eventKey: string;
123
+ eventId: string;
124
+ data: unknown;
125
+ subscriptionSecret?: string | null;
126
+ };
127
+ };
128
+ return: any;
129
+ };
130
+ };
131
+ dispatchNotify: {
132
+ /** 按目标类型向多个端点投递告警 Webhook 通知 */
133
+ post: {
134
+ body: {
135
+ targets: ({
136
+ type: "generic" | "feishu" | "dingtalk" | "wecom" | "slack" | "email";
137
+ url: string;
138
+ secret?: string | null;
139
+ })[];
140
+ event: {
141
+ kind: "triggered" | "test" | "preview";
142
+ ruleId?: string;
143
+ ruleName: string;
144
+ metric: string;
145
+ metricLabel: string;
146
+ operator: string;
147
+ operatorLabel: string;
148
+ threshold: number;
149
+ thresholdText: string;
150
+ currentValue?: number;
151
+ currentValueText?: string;
152
+ path?: string;
153
+ appId?: string;
154
+ windowMinutes?: number;
155
+ requestCount?: number;
156
+ minRequests?: number;
157
+ triggeredAt: string;
158
+ evaluationReason?: string;
159
+ conditionText?: string;
160
+ wouldTrigger?: boolean;
161
+ };
162
+ };
163
+ return: any;
164
+ };
165
+ };
166
+ };
167
+ messageNotifications: {
168
+ publish: {
169
+ /** 写入消息中心并可选发送邮件 */
170
+ post: {
171
+ body: {
172
+ appId: string;
173
+ targetType: "all" | "role" | "user";
174
+ targetIds: string[];
175
+ title: string;
176
+ description: string;
177
+ type: string;
178
+ priority: "urgent" | "high" | "normal" | "low";
179
+ content: unknown;
180
+ sendEmail?: boolean;
181
+ appName?: string;
182
+ emailLink?: string;
183
+ };
184
+ return: any;
185
+ };
186
+ };
20
187
  };
21
188
  };
22
189
  users: {
@@ -50,6 +217,8 @@ export type Api = {
50
217
  status?: "draft" | "published";
51
218
  targetType?: "all" | "role" | "user";
52
219
  targetIds?: string[];
220
+ sendEmail?: boolean;
221
+ emailLink?: string;
53
222
  };
54
223
  return: any;
55
224
  };
@@ -130,6 +299,7 @@ export type Api = {
130
299
  type?: string;
131
300
  priority?: "urgent" | "high" | "normal" | "low";
132
301
  status?: "draft" | "published";
302
+ targetType?: "all" | "role" | "user";
133
303
  };
134
304
  };
135
305
  return: any;
@@ -167,6 +337,73 @@ export type Api = {
167
337
  };
168
338
  };
169
339
  };
340
+ messageNotificationTypes: {
341
+ list: {
342
+ /** 分页查询当前应用可见的消息通知类型 */
343
+ post: {
344
+ body: {
345
+ type?: string;
346
+ label?: string;
347
+ accessScope?: "private" | "all_apps";
348
+ page?: number;
349
+ pageSize?: number;
350
+ };
351
+ return: any;
352
+ };
353
+ };
354
+ selectable: {
355
+ /** 消息中心创建通知时可绑定的类型列表 */
356
+ post: {
357
+ body: Record<string, unknown>;
358
+ return: any;
359
+ };
360
+ };
361
+ findOne: {
362
+ post: {
363
+ body: {
364
+ id: string;
365
+ };
366
+ return: any;
367
+ };
368
+ };
369
+ create: {
370
+ post: {
371
+ body: {
372
+ type: string;
373
+ label: string;
374
+ description: string;
375
+ contentShape?: "text" | "descriptions";
376
+ contentSchema: unknown;
377
+ sampleContent: unknown;
378
+ accessScope?: "private" | "all_apps";
379
+ };
380
+ return: any;
381
+ };
382
+ };
383
+ update: {
384
+ post: {
385
+ body: {
386
+ id: string;
387
+ type: string;
388
+ label: string;
389
+ description: string;
390
+ contentShape?: "text" | "descriptions";
391
+ contentSchema?: unknown;
392
+ sampleContent: unknown;
393
+ accessScope?: "private" | "all_apps";
394
+ };
395
+ return: any;
396
+ };
397
+ };
398
+ delete: {
399
+ post: {
400
+ body: {
401
+ id: string;
402
+ };
403
+ return: any;
404
+ };
405
+ };
406
+ };
170
407
  changelogNotifications: {
171
408
  create: {
172
409
  /** 创建新的更新日志 */
@@ -487,6 +724,115 @@ export type Api = {
487
724
  };
488
725
  };
489
726
  };
727
+ notificationGroups: {
728
+ list: {
729
+ post: {
730
+ body: {
731
+ id?: string;
732
+ name?: string;
733
+ description?: string;
734
+ notifyChannel?: "email" | "webhook" | "message";
735
+ enabled?: boolean;
736
+ page?: number;
737
+ pageSize?: number;
738
+ };
739
+ return: any;
740
+ };
741
+ };
742
+ findOne: {
743
+ post: {
744
+ body: {
745
+ id: string;
746
+ };
747
+ return: any;
748
+ };
749
+ };
750
+ create: {
751
+ post: {
752
+ body: {
753
+ name: string;
754
+ description?: string;
755
+ enabled?: boolean;
756
+ notifyChannels: ("email" | "webhook" | "message")[];
757
+ notifyEmails?: string[];
758
+ webhookTargets?: ({
759
+ type: "generic" | "feishu" | "dingtalk" | "wecom" | "slack";
760
+ url: string;
761
+ secret?: string | null;
762
+ })[];
763
+ notifyMessage?: {
764
+ targetType: "all" | "role" | "user";
765
+ targetIds: string[];
766
+ type: string;
767
+ priority: "urgent" | "high" | "normal" | "low";
768
+ };
769
+ };
770
+ return: any;
771
+ };
772
+ };
773
+ update: {
774
+ post: {
775
+ body: {
776
+ id: string;
777
+ name?: string;
778
+ description?: string;
779
+ enabled?: boolean;
780
+ notifyChannels?: ("email" | "webhook" | "message")[];
781
+ notifyEmails?: string[];
782
+ webhookTargets?: ({
783
+ type: "generic" | "feishu" | "dingtalk" | "wecom" | "slack";
784
+ url: string;
785
+ secret?: string | null;
786
+ })[];
787
+ notifyMessage?: {
788
+ targetType: "all" | "role" | "user";
789
+ targetIds: string[];
790
+ type: string;
791
+ priority: "urgent" | "high" | "normal" | "low";
792
+ };
793
+ };
794
+ return: any;
795
+ };
796
+ };
797
+ delete: {
798
+ post: {
799
+ body: {
800
+ id: string;
801
+ };
802
+ return: any;
803
+ };
804
+ };
805
+ options: {
806
+ post: {
807
+ body: {
808
+ enabledOnly?: boolean;
809
+ };
810
+ return: any;
811
+ };
812
+ };
813
+ sendTest: {
814
+ post: {
815
+ body: {
816
+ id: string;
817
+ subject?: string;
818
+ text?: string;
819
+ };
820
+ return: any;
821
+ };
822
+ };
823
+ validate: {
824
+ /** 验证邮件或 Webhook 端点是否可达 */
825
+ post: {
826
+ body: {
827
+ endpointUrl?: string;
828
+ deliveryType?: "generic" | "feishu" | "dingtalk" | "wecom" | "slack" | "email";
829
+ signSecret?: string;
830
+ notifyEmails?: string[];
831
+ };
832
+ return: any;
833
+ };
834
+ };
835
+ };
490
836
  webhooks: {
491
837
  events: {
492
838
  /** 获取所有可用的 Webhook 事件类型 */
@@ -525,6 +871,7 @@ export type Api = {
525
871
  useQuota?: boolean;
526
872
  maxTotalSize?: number;
527
873
  maxFileCount?: number;
874
+ accessScope?: "private" | "all_apps";
528
875
  };
529
876
  return: any;
530
877
  };
@@ -553,6 +900,7 @@ export type Api = {
553
900
  useQuota?: boolean;
554
901
  maxTotalSize?: number;
555
902
  maxFileCount?: number;
903
+ accessScope?: "private" | "all_apps";
556
904
  };
557
905
  return: any;
558
906
  };
@@ -565,6 +913,13 @@ export type Api = {
565
913
  pageSize: number;
566
914
  where: {
567
915
  name?: string;
916
+ bucketId?: string;
917
+ accessScope?: "private" | "all_apps";
918
+ accessMode?: "owned" | "granted";
919
+ useFileExtensions?: boolean;
920
+ useLimitContentLength?: boolean;
921
+ useLimitContentTypes?: boolean;
922
+ fileExtension?: string;
568
923
  };
569
924
  };
570
925
  return: any;
@@ -637,6 +992,7 @@ export type Api = {
637
992
  current: number;
638
993
  pageSize: number;
639
994
  where: {
995
+ id?: string;
640
996
  bucketId?: string;
641
997
  name?: string;
642
998
  filename?: string;
@@ -645,11 +1001,21 @@ export type Api = {
645
1001
  keyword?: string;
646
1002
  fileCategory?: string;
647
1003
  creatorKeyword?: string;
1004
+ bucketAccessScope?: "private" | "all_apps";
648
1005
  };
649
1006
  };
650
1007
  return: any;
651
1008
  };
652
1009
  };
1010
+ findMany: {
1011
+ /** 根据 ID 列表批量查询文件详情 */
1012
+ post: {
1013
+ body: {
1014
+ ids: string[];
1015
+ };
1016
+ return: any;
1017
+ };
1018
+ };
653
1019
  findOne: {
654
1020
  /** 根据 ID 查询文件详情 */
655
1021
  post: {
@@ -691,143 +1057,22 @@ export type Api = {
691
1057
  };
692
1058
  };
693
1059
  };
694
- events: {
695
- create: {
696
- /** 创建新事件 */
697
- post: {
698
- body: {
699
- name: string;
700
- eventKey: string;
701
- type: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
702
- description: string;
703
- };
704
- return: any;
705
- };
706
- };
707
- delete: {
708
- /** 删除事件 */
709
- post: {
710
- body: {
711
- id: string;
712
- };
713
- return: any;
714
- };
715
- };
716
- update: {
717
- /** 更新事件信息 */
718
- post: {
719
- body: {
720
- id: string;
721
- name: string;
722
- eventKey: string;
723
- type: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
724
- description: string;
725
- };
726
- return: any;
727
- };
728
- };
729
- find: {
730
- /** 分页查询事件列表 */
731
- post: {
732
- body: {
733
- current: number;
734
- pageSize: number;
735
- where: {
736
- name?: string;
737
- type?: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
738
- eventKey?: string;
739
- description?: string;
740
- };
741
- };
742
- return: any;
743
- };
744
- };
745
- findOne: {
746
- /** 根据 ID 查询事件详情 */
747
- post: {
748
- body: {
749
- id: string;
750
- };
751
- return: any;
752
- };
753
- };
754
- };
755
- eventLogs: {
756
- create: {
757
- /** 创建新事件日志 */
758
- post: {
759
- body: {
760
- payload: unknown;
761
- name: string;
762
- eventKey: string;
763
- type: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
764
- };
765
- return: any;
766
- };
767
- };
768
- delete: {
769
- /** 删除事件日志 */
770
- post: {
771
- body: {
772
- id: string;
773
- };
774
- return: any;
775
- };
776
- };
777
- update: {
778
- /** 更新事件日志 */
779
- post: {
780
- body: {
781
- id: string;
782
- payload: unknown;
783
- name: string;
784
- eventKey: string;
785
- type: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
786
- };
787
- return: any;
788
- };
789
- };
790
- find: {
791
- /** 分页查询事件日志列表 */
792
- post: {
793
- body: {
794
- current: number;
795
- pageSize: number;
796
- where: {
797
- name?: string;
798
- type?: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
799
- eventKey?: string;
800
- };
801
- };
802
- return: any;
803
- };
804
- };
805
- findOne: {
806
- /** 根据 ID 查询事件日志详情 */
807
- post: {
808
- body: {
809
- id: string;
810
- };
811
- return: any;
812
- };
813
- };
814
- };
815
1060
  feedbackCenter: {
816
1061
  create: {
817
1062
  /** 用户提交反馈 */
818
1063
  post: {
819
1064
  body: {
820
1065
  title: string;
821
- type: "bugReports" | "featureSuggestions" | "technicalSupportRequests" | "generalOpinions";
1066
+ type: "bugReports" | "featureSuggestions" | "technicalSupportRequests" | "generalOpinions" | "illegalContentReports";
822
1067
  description: string;
823
1068
  priority?: "urgent" | "high" | "normal" | "low";
824
- attachments?: {
1069
+ attachments?: ({
825
1070
  key: string;
826
1071
  name: string;
827
1072
  size: number;
828
1073
  mimeType: string;
829
1074
  kind: "image" | "video" | "file";
830
- }[];
1075
+ })[];
831
1076
  };
832
1077
  return: any;
833
1078
  };
@@ -870,13 +1115,13 @@ export type Api = {
870
1115
  message: {
871
1116
  type: "text";
872
1117
  content?: string;
873
- attachments?: {
1118
+ attachments?: ({
874
1119
  key: string;
875
1120
  name: string;
876
1121
  size: number;
877
1122
  mimeType: string;
878
1123
  kind: "image" | "video" | "file";
879
- }[];
1124
+ })[];
880
1125
  senderRole: "user" | "support" | "system";
881
1126
  };
882
1127
  };
@@ -942,7 +1187,7 @@ export type Api = {
942
1187
  };
943
1188
  };
944
1189
  unreadReplyCount: {
945
- /** 统计末条客服消息尚未阅读的未关闭反馈数 */
1190
+ /** 统计当前用户反馈中末条客服消息尚未阅读的会话数量 */
946
1191
  post: {
947
1192
  return: any;
948
1193
  };
@@ -959,6 +1204,10 @@ export type Api = {
959
1204
  getTrafficStatistics: {
960
1205
  /** 获取反馈流量统计数据 */
961
1206
  post: {
1207
+ body: {
1208
+ startTime: string;
1209
+ endTime: string;
1210
+ };
962
1211
  return: any;
963
1212
  };
964
1213
  };
@@ -983,13 +1232,13 @@ export type Api = {
983
1232
  message: {
984
1233
  type: "text";
985
1234
  content?: string;
986
- attachments?: {
1235
+ attachments?: ({
987
1236
  key: string;
988
1237
  name: string;
989
1238
  size: number;
990
1239
  mimeType: string;
991
1240
  kind: "image" | "video" | "file";
992
- }[];
1241
+ })[];
993
1242
  senderRole: "user" | "support" | "system";
994
1243
  };
995
1244
  };
@@ -1022,7 +1271,16 @@ export type Api = {
1022
1271
  post: {
1023
1272
  body: {
1024
1273
  repositorieId: string;
1025
- content: string;
1274
+ content: {
1275
+ type: string;
1276
+ attrs?: Record<string, string | number | boolean | null | unknown[] | Record<string, unknown>>;
1277
+ content?: unknown[];
1278
+ marks?: ({
1279
+ type: string;
1280
+ attrs?: Record<string, string | number | boolean | null | unknown[] | Record<string, unknown>>;
1281
+ })[];
1282
+ text?: string;
1283
+ };
1026
1284
  };
1027
1285
  return: any;
1028
1286
  };
@@ -1041,7 +1299,16 @@ export type Api = {
1041
1299
  post: {
1042
1300
  body: {
1043
1301
  id: string;
1044
- content: string;
1302
+ content: {
1303
+ type: string;
1304
+ attrs?: Record<string, string | number | boolean | null | unknown[] | Record<string, unknown>>;
1305
+ content?: unknown[];
1306
+ marks?: ({
1307
+ type: string;
1308
+ attrs?: Record<string, string | number | boolean | null | unknown[] | Record<string, unknown>>;
1309
+ })[];
1310
+ text?: string;
1311
+ };
1045
1312
  };
1046
1313
  return: any;
1047
1314
  };
@@ -1060,7 +1327,16 @@ export type Api = {
1060
1327
  };
1061
1328
  };
1062
1329
  findOne: {
1063
- /** 根据 ID 查询文档详情 */
1330
+ /** 根据 ID 查询当前应用的文档管理详情 */
1331
+ post: {
1332
+ body: {
1333
+ id: string;
1334
+ };
1335
+ return: any;
1336
+ };
1337
+ };
1338
+ findPublicOne: {
1339
+ /** 仅查询已公开知识库中的文档详情 */
1064
1340
  post: {
1065
1341
  body: {
1066
1342
  id: string;
@@ -1075,10 +1351,10 @@ export type Api = {
1075
1351
  post: {
1076
1352
  body: {
1077
1353
  path: string;
1078
- components: {
1354
+ components: ({
1079
1355
  type: "pageFaq" | "pageHero" | "pageFeature";
1080
1356
  config: unknown;
1081
- }[];
1357
+ })[];
1082
1358
  description: string;
1083
1359
  };
1084
1360
  return: any;
@@ -1099,10 +1375,10 @@ export type Api = {
1099
1375
  body: {
1100
1376
  id: string;
1101
1377
  path: string;
1102
- components: {
1378
+ components: ({
1103
1379
  type: "pageFaq" | "pageHero" | "pageFeature";
1104
1380
  config: unknown;
1105
- }[];
1381
+ })[];
1106
1382
  description: string;
1107
1383
  };
1108
1384
  return: any;
@@ -1159,7 +1435,34 @@ export type Api = {
1159
1435
  post: {
1160
1436
  body: {
1161
1437
  id: string;
1162
- catalogues: unknown[];
1438
+ catalogues: {
1439
+ name: string;
1440
+ key: string;
1441
+ children?: unknown[];
1442
+ }[];
1443
+ };
1444
+ return: any;
1445
+ };
1446
+ };
1447
+ };
1448
+ documents: {
1449
+ create: {
1450
+ /** 创建文档并原子化写入知识库目录 */
1451
+ post: {
1452
+ body: {
1453
+ repositoryId: string;
1454
+ parentId?: string;
1455
+ name: string;
1456
+ };
1457
+ return: any;
1458
+ };
1459
+ };
1460
+ delete: {
1461
+ /** 删除目录节点、子节点及对应文档 */
1462
+ post: {
1463
+ body: {
1464
+ repositoryId: string;
1465
+ documentId: string;
1163
1466
  };
1164
1467
  return: any;
1165
1468
  };
@@ -1181,7 +1484,16 @@ export type Api = {
1181
1484
  };
1182
1485
  };
1183
1486
  findOne: {
1184
- /** 根据 ID 查询知识库详情 */
1487
+ /** 根据 ID 查询当前应用的知识库管理详情 */
1488
+ post: {
1489
+ body: {
1490
+ id: string;
1491
+ };
1492
+ return: any;
1493
+ };
1494
+ };
1495
+ findPublicOne: {
1496
+ /** 根据 ID 查询当前应用已公开的知识库详情 */
1185
1497
  post: {
1186
1498
  body: {
1187
1499
  id: string;
@@ -1300,7 +1612,314 @@ export type Api = {
1300
1612
  body: {
1301
1613
  id: string;
1302
1614
  };
1303
- return: any;
1615
+ return: any;
1616
+ };
1617
+ };
1618
+ };
1619
+ releases: {
1620
+ getUploadToken: {
1621
+ /** STS 临时凭证(30 分钟)。对 electron/production/{appId}/{platform}/{arch}/versions/{version}/ 或 latest/ 目录授权。 */
1622
+ post: {
1623
+ body: {
1624
+ version: string;
1625
+ platformId: string;
1626
+ target?: "version" | "latest";
1627
+ filename: string;
1628
+ };
1629
+ return: any;
1630
+ };
1631
+ };
1632
+ uploadComplete: {
1633
+ /** 各平台打包上传完成后调用。服务端自动创建/更新版本记录。 */
1634
+ post: {
1635
+ body: {
1636
+ version: string;
1637
+ platformId: string;
1638
+ downloadUrl: string;
1639
+ artifactUrl?: string;
1640
+ zipUrl?: string;
1641
+ artifactKey?: string;
1642
+ latestKey?: string;
1643
+ zipKey?: string;
1644
+ fileSize?: number;
1645
+ releaseNotes?: string;
1646
+ channel?: string;
1647
+ };
1648
+ return: any;
1649
+ };
1650
+ };
1651
+ latest: {
1652
+ /** 公开接口。通过 app-id header 传入。 */
1653
+ post: {
1654
+ return: any;
1655
+ };
1656
+ };
1657
+ list: {
1658
+ /** 管理端查询 Electron 发布版本列表。 */
1659
+ post: {
1660
+ body: {
1661
+ current: number;
1662
+ pageSize: number;
1663
+ where?: {
1664
+ version?: string;
1665
+ status?: "draft" | "published" | "disabled" | "archived";
1666
+ platformId?: string;
1667
+ channel?: string;
1668
+ };
1669
+ };
1670
+ return: any;
1671
+ };
1672
+ };
1673
+ detail: {
1674
+ /** 管理端查询单个 Electron 发布版本详情。 */
1675
+ post: {
1676
+ body: {
1677
+ version: string;
1678
+ };
1679
+ return: any;
1680
+ };
1681
+ };
1682
+ updateStatus: {
1683
+ /** 管理端更新发布版本状态。 */
1684
+ post: {
1685
+ body: {
1686
+ version: string;
1687
+ status: "draft" | "published" | "disabled" | "archived";
1688
+ };
1689
+ return: any;
1690
+ };
1691
+ };
1692
+ setLatest: {
1693
+ /** 管理端指定某版本为 latest,并重建 Electron 更新 feed。 */
1694
+ post: {
1695
+ body: {
1696
+ version: string;
1697
+ };
1698
+ return: any;
1699
+ };
1700
+ };
1701
+ refreshFeed: {
1702
+ /** 管理端按当前 latest 版本重建 Electron RELEASES.json。 */
1703
+ post: {
1704
+ body: {
1705
+ version?: string;
1706
+ };
1707
+ return: any;
1708
+ };
1709
+ };
1710
+ };
1711
+ market: {
1712
+ getUploadToken: {
1713
+ /** STS 临时凭证(30 分钟),对 superx-market/extensions/{extensionId}/{version}/ 目录授权。 */
1714
+ post: {
1715
+ body: {
1716
+ extensionId: string;
1717
+ version: string;
1718
+ };
1719
+ return: any;
1720
+ };
1721
+ };
1722
+ publish: {
1723
+ /** CLI 上传完成后调用。创建或更新扩展版本记录。 */
1724
+ post: {
1725
+ body: {
1726
+ extensionId: string;
1727
+ version: string;
1728
+ sha256: string;
1729
+ name: string;
1730
+ description: string;
1731
+ overview?: string;
1732
+ icon: string;
1733
+ iconBg?: string;
1734
+ iconColor?: string;
1735
+ category: string;
1736
+ features: {
1737
+ tools?: boolean;
1738
+ skills?: boolean;
1739
+ mcps?: boolean;
1740
+ parts?: boolean;
1741
+ bin?: boolean;
1742
+ app?: {
1743
+ activation: {
1744
+ direct?: Record<string, unknown>;
1745
+ directory?: Record<string, unknown>;
1746
+ file?: {
1747
+ extensions?: string[];
1748
+ mediaKinds?: ("image" | "video" | "audio")[];
1749
+ };
1750
+ };
1751
+ };
1752
+ };
1753
+ defaults?: {
1754
+ extensionEnabled?: boolean;
1755
+ toolsChatEnabled?: boolean;
1756
+ };
1757
+ resources?: {
1758
+ description?: string;
1759
+ items: ({
1760
+ name: string;
1761
+ storageKind: "sqlite" | "vector" | "fulltext" | "filesystem";
1762
+ scope?: "extension" | "workspace" | "custom";
1763
+ description: string;
1764
+ queryHint: string;
1765
+ path?: string;
1766
+ capabilities?: {
1767
+ readable?: boolean;
1768
+ writable?: boolean;
1769
+ queryable?: boolean;
1770
+ searchable?: boolean;
1771
+ recoverable?: boolean;
1772
+ };
1773
+ })[];
1774
+ };
1775
+ runtime?: {
1776
+ binaries?: ({
1777
+ name: string;
1778
+ path: string;
1779
+ platform?: "darwin" | "win32" | "linux";
1780
+ arch?: "arm64" | "x64";
1781
+ required?: boolean;
1782
+ })[];
1783
+ };
1784
+ assets: {
1785
+ tools?: {
1786
+ description: string;
1787
+ items: {
1788
+ name: string;
1789
+ displayName?: string;
1790
+ description: string;
1791
+ category: string;
1792
+ parameters?: Record<string, unknown>;
1793
+ governance?: {
1794
+ sideEffectLevel?: string;
1795
+ approvalPolicy?: string;
1796
+ };
1797
+ }[];
1798
+ };
1799
+ parts?: {
1800
+ description: string;
1801
+ items: {
1802
+ name: string;
1803
+ description: string;
1804
+ }[];
1805
+ };
1806
+ app?: {
1807
+ description: string;
1808
+ activation: {
1809
+ direct?: Record<string, unknown>;
1810
+ directory?: Record<string, unknown>;
1811
+ file?: {
1812
+ extensions?: string[];
1813
+ mediaKinds?: ("image" | "video" | "audio")[];
1814
+ };
1815
+ };
1816
+ };
1817
+ skills?: {
1818
+ description: string;
1819
+ items: {
1820
+ name: string;
1821
+ description?: string;
1822
+ }[];
1823
+ };
1824
+ mcps?: {
1825
+ description: string;
1826
+ items: ({
1827
+ name: string;
1828
+ description?: string;
1829
+ transport?: "stdio" | "streamableHttp" | "sse";
1830
+ })[];
1831
+ };
1832
+ resources?: {
1833
+ description?: string;
1834
+ items: ({
1835
+ name: string;
1836
+ storageKind: "sqlite" | "vector" | "fulltext" | "filesystem";
1837
+ scope?: "extension" | "workspace" | "custom";
1838
+ description: string;
1839
+ queryHint: string;
1840
+ path?: string;
1841
+ capabilities?: {
1842
+ readable?: boolean;
1843
+ writable?: boolean;
1844
+ queryable?: boolean;
1845
+ searchable?: boolean;
1846
+ recoverable?: boolean;
1847
+ };
1848
+ })[];
1849
+ };
1850
+ };
1851
+ tags: string[];
1852
+ lifecycle: {
1853
+ installable: boolean;
1854
+ uninstallable: boolean;
1855
+ enableSwitch: boolean;
1856
+ updatable: boolean;
1857
+ };
1858
+ };
1859
+ return: any;
1860
+ };
1861
+ };
1862
+ delete: {
1863
+ /** CLI 删除已发布扩展。支持删除单个版本或全部版本,并同步清理 COS 归档。 */
1864
+ post: {
1865
+ body: {
1866
+ extensionId: string;
1867
+ version?: string;
1868
+ };
1869
+ return: any;
1870
+ };
1871
+ };
1872
+ catalog: {
1873
+ /** 公开接口。Ones 标准分页(current/pageSize/where → items/count)。每个 extensionId 仅返回最新 published 版本;不含 overview/assets(详情走 /market/detail)。 */
1874
+ post: {
1875
+ body: {
1876
+ current: number;
1877
+ pageSize: number;
1878
+ where?: {
1879
+ keyword?: string;
1880
+ category?: string;
1881
+ feature?: string;
1882
+ extensionId?: string;
1883
+ extensionIds?: string[];
1884
+ installStatus?: "installed" | "not-installed";
1885
+ installedIds?: string[];
1886
+ };
1887
+ };
1888
+ return: any;
1889
+ };
1890
+ };
1891
+ detail: {
1892
+ /** 公开接口。仅获取已发布扩展的详情和 CDN 下载基础 URL。 */
1893
+ post: {
1894
+ body: {
1895
+ extensionId: string;
1896
+ version?: string;
1897
+ };
1898
+ return: any;
1899
+ };
1900
+ };
1901
+ admin: {
1902
+ 'set-status': {
1903
+ /** 管理接口。修改扩展的上架状态(published/unlisted/suspended)。需登录态。 */
1904
+ post: {
1905
+ body: {
1906
+ extensionId: string;
1907
+ status: "published" | "unlisted" | "suspended";
1908
+ reason?: string;
1909
+ };
1910
+ return: any;
1911
+ };
1912
+ };
1913
+ 'set-trust': {
1914
+ /** 管理接口。修改扩展的信任等级(official/verified/community)。需登录态。 */
1915
+ post: {
1916
+ body: {
1917
+ extensionId: string;
1918
+ trust: "official" | "verified" | "community";
1919
+ reason?: string;
1920
+ };
1921
+ return: any;
1922
+ };
1304
1923
  };
1305
1924
  };
1306
1925
  };
@@ -1308,27 +1927,178 @@ export type Api = {
1308
1927
  /** API 客户端类型(提供完整的 IDE 智能提示) */
1309
1928
  export interface ApiClient {
1310
1929
  health: {
1311
- /** 检查服务健康状态 */
1312
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1930
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1313
1931
  };
1314
1932
  'api-spec': {
1315
- /** 获取 API 规范,用于类型同步 */
1316
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1933
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1317
1934
  };
1318
- webhook: {
1319
- /** Webhook 接收测试端点 */
1320
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
1935
+ internal: {
1936
+ queue: {
1937
+ storage: {
1938
+ 'cos-settlement': {
1939
+ /** 按价目表日窗口结算 COS 存储 GB·天用量(队列每日北京时间 0:05 触发) */
1940
+ post: (body?: {
1941
+ appId: string;
1942
+ queueKey: string;
1943
+ queueDefinitionId: string;
1944
+ taskRunId: string;
1945
+ queueServiceKey: string;
1946
+ context: {
1947
+ triggerSource: "manual" | "internal" | "scheduler" | "planner" | "retry";
1948
+ actor: {
1949
+ type: "user" | "service" | "system" | "queue";
1950
+ id?: string;
1951
+ };
1952
+ businessContext: {
1953
+ resourceType?: string;
1954
+ resourceId?: string;
1955
+ operation?: string;
1956
+ };
1957
+ traceContext: {
1958
+ requestId?: string;
1959
+ traceId?: string;
1960
+ parentTaskRunId?: string;
1961
+ };
1962
+ };
1963
+ } & {
1964
+ payload: {
1965
+ scheduledAt?: string;
1966
+ source?: string;
1967
+ schedulerJobId?: string;
1968
+ };
1969
+ }, config?: RequestConfig) => RequestBuilder<any>;
1970
+ };
1971
+ 'cos-settlement-scan': {
1972
+ /** 供 queue-server 平台调度触发,按有文件的 app 逐个入队结算任务 */
1973
+ post: (body?: {
1974
+ queueServiceKey?: string;
1975
+ scheduledAt?: string;
1976
+ source?: string;
1977
+ }, config?: RequestConfig) => RequestBuilder<any>;
1978
+ };
1979
+ };
1980
+ };
1981
+ notificationGroups: {
1982
+ resolve: {
1983
+ /** 按 ID 列表解析并合并通知组投递配置 */
1984
+ post: (body: {
1985
+ appId: string;
1986
+ groupIds: string[];
1987
+ }, config?: RequestConfig) => RequestBuilder<any>;
1988
+ };
1989
+ dispatch: {
1990
+ /** 解析通知组并合并投递邮件与 Webhook */
1991
+ post: (body: {
1992
+ appId: string;
1993
+ groupIds: string[];
1994
+ alertEvent?: {
1995
+ kind: "triggered" | "test" | "preview";
1996
+ ruleId?: string;
1997
+ ruleName: string;
1998
+ metric: string;
1999
+ metricLabel: string;
2000
+ operator: string;
2001
+ operatorLabel: string;
2002
+ threshold: number;
2003
+ thresholdText: string;
2004
+ currentValue?: number;
2005
+ currentValueText?: string;
2006
+ path?: string;
2007
+ appId?: string;
2008
+ windowMinutes?: number;
2009
+ requestCount?: number;
2010
+ minRequests?: number;
2011
+ triggeredAt: string;
2012
+ evaluationReason?: string;
2013
+ conditionText?: string;
2014
+ wouldTrigger?: boolean;
2015
+ };
2016
+ securityAlert?: {
2017
+ alertId: string;
2018
+ appId: string;
2019
+ type: string;
2020
+ typeLabel: string;
2021
+ riskLevel: string;
2022
+ riskLevelLabel: string;
2023
+ clientIp: string;
2024
+ email?: string;
2025
+ userId?: string;
2026
+ relatedAccountSummary?: string | null;
2027
+ resolved: boolean;
2028
+ autoBlocked: boolean;
2029
+ triggeredAt: string;
2030
+ details: Record<string, unknown>;
2031
+ };
2032
+ businessEvent?: {
2033
+ eventKey: string;
2034
+ eventId: string;
2035
+ data: unknown;
2036
+ subscriptionSecret?: string | null;
2037
+ };
2038
+ }, config?: RequestConfig) => RequestBuilder<any>;
2039
+ };
2040
+ dispatchNotify: {
2041
+ /** 按目标类型向多个端点投递告警 Webhook 通知 */
2042
+ post: (body: {
2043
+ targets: ({
2044
+ type: "generic" | "feishu" | "dingtalk" | "wecom" | "slack" | "email";
2045
+ url: string;
2046
+ secret?: string | null;
2047
+ })[];
2048
+ event: {
2049
+ kind: "triggered" | "test" | "preview";
2050
+ ruleId?: string;
2051
+ ruleName: string;
2052
+ metric: string;
2053
+ metricLabel: string;
2054
+ operator: string;
2055
+ operatorLabel: string;
2056
+ threshold: number;
2057
+ thresholdText: string;
2058
+ currentValue?: number;
2059
+ currentValueText?: string;
2060
+ path?: string;
2061
+ appId?: string;
2062
+ windowMinutes?: number;
2063
+ requestCount?: number;
2064
+ minRequests?: number;
2065
+ triggeredAt: string;
2066
+ evaluationReason?: string;
2067
+ conditionText?: string;
2068
+ wouldTrigger?: boolean;
2069
+ };
2070
+ }, config?: RequestConfig) => RequestBuilder<any>;
2071
+ };
2072
+ };
2073
+ messageNotifications: {
2074
+ publish: {
2075
+ /** 写入消息中心并可选发送邮件 */
2076
+ post: (body: {
2077
+ appId: string;
2078
+ targetType: "all" | "role" | "user";
2079
+ targetIds: string[];
2080
+ title: string;
2081
+ description: string;
2082
+ type: string;
2083
+ priority: "urgent" | "high" | "normal" | "low";
2084
+ content: unknown;
2085
+ sendEmail?: boolean;
2086
+ appName?: string;
2087
+ emailLink?: string;
2088
+ }, config?: RequestConfig) => RequestBuilder<any>;
2089
+ };
2090
+ };
1321
2091
  };
1322
2092
  users: {
1323
2093
  dependencies: {
1324
2094
  /** 管理员检查指定用户的业务资源依赖 */
1325
2095
  post: (body: {
1326
2096
  userId: string;
1327
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2097
+ }, config?: RequestConfig) => RequestBuilder<any>;
1328
2098
  };
1329
2099
  myDependencies: {
1330
2100
  /** 用户检查自己的业务资源依赖 */
1331
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2101
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1332
2102
  };
1333
2103
  };
1334
2104
  messageCenter: {
@@ -1344,26 +2114,28 @@ export interface ApiClient {
1344
2114
  status?: "draft" | "published";
1345
2115
  targetType?: "all" | "role" | "user";
1346
2116
  targetIds?: string[];
1347
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2117
+ sendEmail?: boolean;
2118
+ emailLink?: string;
2119
+ }, config?: RequestConfig) => RequestBuilder<any>;
1348
2120
  };
1349
2121
  delete: {
1350
2122
  /** 删除消息通知 */
1351
2123
  post: (body: {
1352
2124
  id: string;
1353
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2125
+ }, config?: RequestConfig) => RequestBuilder<any>;
1354
2126
  };
1355
2127
  batch: {
1356
2128
  delete: {
1357
2129
  /** 批量删除消息通知 */
1358
2130
  post: (body: {
1359
2131
  ids: string[];
1360
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2132
+ }, config?: RequestConfig) => RequestBuilder<any>;
1361
2133
  };
1362
2134
  read: {
1363
2135
  /** 批量将消息标记为已读 */
1364
2136
  post: (body: {
1365
2137
  ids: string[];
1366
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2138
+ }, config?: RequestConfig) => RequestBuilder<any>;
1367
2139
  };
1368
2140
  };
1369
2141
  update: {
@@ -1378,19 +2150,19 @@ export interface ApiClient {
1378
2150
  status?: "draft" | "published";
1379
2151
  targetType?: "all" | "role" | "user";
1380
2152
  targetIds?: string[];
1381
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2153
+ }, config?: RequestConfig) => RequestBuilder<any>;
1382
2154
  };
1383
2155
  read: {
1384
2156
  /** 将指定消息标记为已读 */
1385
2157
  post: (body: {
1386
2158
  messageId: string;
1387
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2159
+ }, config?: RequestConfig) => RequestBuilder<any>;
1388
2160
  };
1389
2161
  readAll: {
1390
2162
  /** 将所有消息标记为已读 */
1391
- post: (body: {
2163
+ post: (body?: {
1392
2164
  type?: string;
1393
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2165
+ }, config?: RequestConfig) => RequestBuilder<any>;
1394
2166
  };
1395
2167
  find: {
1396
2168
  /** 分页查询消息通知列表(管理员) */
@@ -1403,8 +2175,9 @@ export interface ApiClient {
1403
2175
  type?: string;
1404
2176
  priority?: "urgent" | "high" | "normal" | "low";
1405
2177
  status?: "draft" | "published";
2178
+ targetType?: "all" | "role" | "user";
1406
2179
  };
1407
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2180
+ }, config?: RequestConfig) => RequestBuilder<any>;
1408
2181
  };
1409
2182
  own: {
1410
2183
  /** 查询用户可见的消息列表 */
@@ -1417,17 +2190,66 @@ export interface ApiClient {
1417
2190
  priority?: "urgent" | "high" | "normal" | "low";
1418
2191
  read?: boolean;
1419
2192
  };
1420
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2193
+ }, config?: RequestConfig) => RequestBuilder<any>;
1421
2194
  };
1422
2195
  findOne: {
1423
2196
  /** 根据 ID 查询消息详情 */
1424
2197
  post: (body: {
1425
2198
  id: string;
1426
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2199
+ }, config?: RequestConfig) => RequestBuilder<any>;
1427
2200
  };
1428
2201
  statistics: {
1429
2202
  /** 获取消息统计数据 */
1430
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2203
+ post: (config?: RequestConfig) => RequestBuilder<any>;
2204
+ };
2205
+ };
2206
+ messageNotificationTypes: {
2207
+ list: {
2208
+ /** 分页查询当前应用可见的消息通知类型 */
2209
+ post: (body?: {
2210
+ type?: string;
2211
+ label?: string;
2212
+ accessScope?: "private" | "all_apps";
2213
+ page?: number;
2214
+ pageSize?: number;
2215
+ }, config?: RequestConfig) => RequestBuilder<any>;
2216
+ };
2217
+ selectable: {
2218
+ /** 消息中心创建通知时可绑定的类型列表 */
2219
+ post: (body?: Record<string, unknown>, config?: RequestConfig) => RequestBuilder<any>;
2220
+ };
2221
+ findOne: {
2222
+ post: (body: {
2223
+ id: string;
2224
+ }, config?: RequestConfig) => RequestBuilder<any>;
2225
+ };
2226
+ create: {
2227
+ post: (body: {
2228
+ type: string;
2229
+ label: string;
2230
+ description: string;
2231
+ contentShape?: "text" | "descriptions";
2232
+ contentSchema: unknown;
2233
+ sampleContent: unknown;
2234
+ accessScope?: "private" | "all_apps";
2235
+ }, config?: RequestConfig) => RequestBuilder<any>;
2236
+ };
2237
+ update: {
2238
+ post: (body: {
2239
+ id: string;
2240
+ type: string;
2241
+ label: string;
2242
+ description: string;
2243
+ contentShape?: "text" | "descriptions";
2244
+ contentSchema?: unknown;
2245
+ sampleContent: unknown;
2246
+ accessScope?: "private" | "all_apps";
2247
+ }, config?: RequestConfig) => RequestBuilder<any>;
2248
+ };
2249
+ delete: {
2250
+ post: (body: {
2251
+ id: string;
2252
+ }, config?: RequestConfig) => RequestBuilder<any>;
1431
2253
  };
1432
2254
  };
1433
2255
  changelogNotifications: {
@@ -1440,20 +2262,20 @@ export interface ApiClient {
1440
2262
  content: unknown;
1441
2263
  changeType?: "feature" | "improvement" | "fix" | "security" | "breaking";
1442
2264
  publishedAt?: string;
1443
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2265
+ }, config?: RequestConfig) => RequestBuilder<any>;
1444
2266
  };
1445
2267
  delete: {
1446
2268
  /** 删除更新日志 */
1447
2269
  post: (body: {
1448
2270
  id: string;
1449
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2271
+ }, config?: RequestConfig) => RequestBuilder<any>;
1450
2272
  };
1451
2273
  batch: {
1452
2274
  delete: {
1453
2275
  /** 批量删除更新日志 */
1454
2276
  post: (body: {
1455
2277
  ids: string[];
1456
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2278
+ }, config?: RequestConfig) => RequestBuilder<any>;
1457
2279
  };
1458
2280
  };
1459
2281
  update: {
@@ -1466,17 +2288,17 @@ export interface ApiClient {
1466
2288
  content: unknown;
1467
2289
  changeType?: "feature" | "improvement" | "fix" | "security" | "breaking";
1468
2290
  publishedAt?: string;
1469
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2291
+ }, config?: RequestConfig) => RequestBuilder<any>;
1470
2292
  };
1471
2293
  read: {
1472
2294
  /** 将指定更新日志标记为已读 */
1473
2295
  post: (body: {
1474
2296
  changelogId: string;
1475
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2297
+ }, config?: RequestConfig) => RequestBuilder<any>;
1476
2298
  };
1477
2299
  readAll: {
1478
2300
  /** 将所有可见更新日志标记为已读 */
1479
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2301
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1480
2302
  };
1481
2303
  find: {
1482
2304
  /** 分页查询更新日志列表 */
@@ -1488,7 +2310,7 @@ export interface ApiClient {
1488
2310
  version?: string;
1489
2311
  changeType?: "feature" | "improvement" | "fix" | "security" | "breaking";
1490
2312
  };
1491
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2313
+ }, config?: RequestConfig) => RequestBuilder<any>;
1492
2314
  };
1493
2315
  own: {
1494
2316
  /** 查询用户可见的更新日志列表(支持已读过滤) */
@@ -1500,13 +2322,13 @@ export interface ApiClient {
1500
2322
  changeType?: "feature" | "improvement" | "fix" | "security" | "breaking";
1501
2323
  read?: boolean;
1502
2324
  };
1503
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2325
+ }, config?: RequestConfig) => RequestBuilder<any>;
1504
2326
  };
1505
2327
  findOne: {
1506
2328
  /** 根据 ID 查询更新日志详情 */
1507
2329
  post: (body: {
1508
2330
  id: string;
1509
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2331
+ }, config?: RequestConfig) => RequestBuilder<any>;
1510
2332
  };
1511
2333
  };
1512
2334
  eventNotifications: {
@@ -1520,20 +2342,20 @@ export interface ApiClient {
1520
2342
  startAt?: string;
1521
2343
  endAt?: string;
1522
2344
  pinned?: boolean;
1523
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2345
+ }, config?: RequestConfig) => RequestBuilder<any>;
1524
2346
  };
1525
2347
  delete: {
1526
2348
  /** 删除活动通知 */
1527
2349
  post: (body: {
1528
2350
  id: string;
1529
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2351
+ }, config?: RequestConfig) => RequestBuilder<any>;
1530
2352
  };
1531
2353
  batch: {
1532
2354
  delete: {
1533
2355
  /** 批量删除活动通知 */
1534
2356
  post: (body: {
1535
2357
  ids: string[];
1536
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2358
+ }, config?: RequestConfig) => RequestBuilder<any>;
1537
2359
  };
1538
2360
  };
1539
2361
  update: {
@@ -1547,17 +2369,17 @@ export interface ApiClient {
1547
2369
  startAt?: string;
1548
2370
  endAt?: string;
1549
2371
  pinned?: boolean;
1550
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2372
+ }, config?: RequestConfig) => RequestBuilder<any>;
1551
2373
  };
1552
2374
  read: {
1553
2375
  /** 将指定活动通知标记为已读 */
1554
2376
  post: (body: {
1555
2377
  eventId: string;
1556
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2378
+ }, config?: RequestConfig) => RequestBuilder<any>;
1557
2379
  };
1558
2380
  readAll: {
1559
2381
  /** 将所有可见活动通知标记为已读 */
1560
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2382
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1561
2383
  };
1562
2384
  find: {
1563
2385
  /** 分页查询活动通知列表 */
@@ -1568,7 +2390,7 @@ export interface ApiClient {
1568
2390
  title?: string;
1569
2391
  status?: "draft" | "published";
1570
2392
  };
1571
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2393
+ }, config?: RequestConfig) => RequestBuilder<any>;
1572
2394
  };
1573
2395
  own: {
1574
2396
  /** 查询用户可见的活动通知列表(支持已读过滤) */
@@ -1579,13 +2401,13 @@ export interface ApiClient {
1579
2401
  title?: string;
1580
2402
  read?: boolean;
1581
2403
  };
1582
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2404
+ }, config?: RequestConfig) => RequestBuilder<any>;
1583
2405
  };
1584
2406
  findOne: {
1585
2407
  /** 根据 ID 查询活动通知详情 */
1586
2408
  post: (body: {
1587
2409
  id: string;
1588
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2410
+ }, config?: RequestConfig) => RequestBuilder<any>;
1589
2411
  };
1590
2412
  };
1591
2413
  noticeNotifications: {
@@ -1600,20 +2422,20 @@ export interface ApiClient {
1600
2422
  pinned?: boolean;
1601
2423
  requireConfirm?: boolean;
1602
2424
  expireAt?: string;
1603
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2425
+ }, config?: RequestConfig) => RequestBuilder<any>;
1604
2426
  };
1605
2427
  delete: {
1606
2428
  /** 删除公告通知 */
1607
2429
  post: (body: {
1608
2430
  id: string;
1609
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2431
+ }, config?: RequestConfig) => RequestBuilder<any>;
1610
2432
  };
1611
2433
  batch: {
1612
2434
  delete: {
1613
2435
  /** 批量删除公告通知 */
1614
2436
  post: (body: {
1615
2437
  ids: string[];
1616
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2438
+ }, config?: RequestConfig) => RequestBuilder<any>;
1617
2439
  };
1618
2440
  };
1619
2441
  update: {
@@ -1628,17 +2450,17 @@ export interface ApiClient {
1628
2450
  pinned?: boolean;
1629
2451
  requireConfirm?: boolean;
1630
2452
  expireAt?: string;
1631
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2453
+ }, config?: RequestConfig) => RequestBuilder<any>;
1632
2454
  };
1633
2455
  read: {
1634
2456
  /** 将指定公告标记为已读 */
1635
2457
  post: (body: {
1636
2458
  noticeId: string;
1637
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2459
+ }, config?: RequestConfig) => RequestBuilder<any>;
1638
2460
  };
1639
2461
  readAll: {
1640
2462
  /** 将所有公告标记为已读 */
1641
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2463
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1642
2464
  };
1643
2465
  find: {
1644
2466
  /** 分页查询公告通知列表(管理端) */
@@ -1650,7 +2472,7 @@ export interface ApiClient {
1650
2472
  priority?: "urgent" | "important" | "normal";
1651
2473
  status?: "draft" | "published";
1652
2474
  };
1653
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2475
+ }, config?: RequestConfig) => RequestBuilder<any>;
1654
2476
  };
1655
2477
  own: {
1656
2478
  /** 查询用户可见的公告列表(支持已读过滤) */
@@ -1662,28 +2484,113 @@ export interface ApiClient {
1662
2484
  priority?: "urgent" | "important" | "normal";
1663
2485
  read?: boolean;
1664
2486
  };
1665
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2487
+ }, config?: RequestConfig) => RequestBuilder<any>;
1666
2488
  };
1667
2489
  findOne: {
1668
2490
  /** 根据 ID 查询公告通知详情 */
1669
2491
  post: (body: {
1670
2492
  id: string;
1671
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2493
+ }, config?: RequestConfig) => RequestBuilder<any>;
1672
2494
  };
1673
2495
  };
1674
2496
  };
2497
+ notificationGroups: {
2498
+ list: {
2499
+ post: (body?: {
2500
+ id?: string;
2501
+ name?: string;
2502
+ description?: string;
2503
+ notifyChannel?: "email" | "webhook" | "message";
2504
+ enabled?: boolean;
2505
+ page?: number;
2506
+ pageSize?: number;
2507
+ }, config?: RequestConfig) => RequestBuilder<any>;
2508
+ };
2509
+ findOne: {
2510
+ post: (body: {
2511
+ id: string;
2512
+ }, config?: RequestConfig) => RequestBuilder<any>;
2513
+ };
2514
+ create: {
2515
+ post: (body: {
2516
+ name: string;
2517
+ description?: string;
2518
+ enabled?: boolean;
2519
+ notifyChannels: ("email" | "webhook" | "message")[];
2520
+ notifyEmails?: string[];
2521
+ webhookTargets?: ({
2522
+ type: "generic" | "feishu" | "dingtalk" | "wecom" | "slack";
2523
+ url: string;
2524
+ secret?: string | null;
2525
+ })[];
2526
+ notifyMessage?: {
2527
+ targetType: "all" | "role" | "user";
2528
+ targetIds: string[];
2529
+ type: string;
2530
+ priority: "urgent" | "high" | "normal" | "low";
2531
+ };
2532
+ }, config?: RequestConfig) => RequestBuilder<any>;
2533
+ };
2534
+ update: {
2535
+ post: (body: {
2536
+ id: string;
2537
+ name?: string;
2538
+ description?: string;
2539
+ enabled?: boolean;
2540
+ notifyChannels?: ("email" | "webhook" | "message")[];
2541
+ notifyEmails?: string[];
2542
+ webhookTargets?: ({
2543
+ type: "generic" | "feishu" | "dingtalk" | "wecom" | "slack";
2544
+ url: string;
2545
+ secret?: string | null;
2546
+ })[];
2547
+ notifyMessage?: {
2548
+ targetType: "all" | "role" | "user";
2549
+ targetIds: string[];
2550
+ type: string;
2551
+ priority: "urgent" | "high" | "normal" | "low";
2552
+ };
2553
+ }, config?: RequestConfig) => RequestBuilder<any>;
2554
+ };
2555
+ delete: {
2556
+ post: (body: {
2557
+ id: string;
2558
+ }, config?: RequestConfig) => RequestBuilder<any>;
2559
+ };
2560
+ options: {
2561
+ post: (body?: {
2562
+ enabledOnly?: boolean;
2563
+ }, config?: RequestConfig) => RequestBuilder<any>;
2564
+ };
2565
+ sendTest: {
2566
+ post: (body: {
2567
+ id: string;
2568
+ subject?: string;
2569
+ text?: string;
2570
+ }, config?: RequestConfig) => RequestBuilder<any>;
2571
+ };
2572
+ validate: {
2573
+ /** 验证邮件或 Webhook 端点是否可达 */
2574
+ post: (body?: {
2575
+ endpointUrl?: string;
2576
+ deliveryType?: "generic" | "feishu" | "dingtalk" | "wecom" | "slack" | "email";
2577
+ signSecret?: string;
2578
+ notifyEmails?: string[];
2579
+ }, config?: RequestConfig) => RequestBuilder<any>;
2580
+ };
2581
+ };
1675
2582
  webhooks: {
1676
2583
  events: {
1677
2584
  /** 获取所有可用的 Webhook 事件类型 */
1678
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2585
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1679
2586
  ':id': {
1680
2587
  /** 获取指定分类的 Webhook 事件 */
1681
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2588
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1682
2589
  };
1683
2590
  };
1684
2591
  categories: {
1685
2592
  /** 获取所有 Webhook 事件分类 */
1686
- get: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2593
+ get: (config?: RequestConfig) => RequestBuilder<any>;
1687
2594
  };
1688
2595
  };
1689
2596
  buckets: {
@@ -1700,13 +2607,14 @@ export interface ApiClient {
1700
2607
  useQuota?: boolean;
1701
2608
  maxTotalSize?: number;
1702
2609
  maxFileCount?: number;
1703
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2610
+ accessScope?: "private" | "all_apps";
2611
+ }, config?: RequestConfig) => RequestBuilder<any>;
1704
2612
  };
1705
2613
  delete: {
1706
2614
  /** 删除存储桶 */
1707
2615
  post: (body: {
1708
2616
  id: string;
1709
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2617
+ }, config?: RequestConfig) => RequestBuilder<any>;
1710
2618
  };
1711
2619
  update: {
1712
2620
  /** 更新存储桶配置 */
@@ -1722,7 +2630,8 @@ export interface ApiClient {
1722
2630
  useQuota?: boolean;
1723
2631
  maxTotalSize?: number;
1724
2632
  maxFileCount?: number;
1725
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2633
+ accessScope?: "private" | "all_apps";
2634
+ }, config?: RequestConfig) => RequestBuilder<any>;
1726
2635
  };
1727
2636
  find: {
1728
2637
  /** 分页查询存储桶列表 */
@@ -1731,18 +2640,25 @@ export interface ApiClient {
1731
2640
  pageSize: number;
1732
2641
  where: {
1733
2642
  name?: string;
2643
+ bucketId?: string;
2644
+ accessScope?: "private" | "all_apps";
2645
+ accessMode?: "owned" | "granted";
2646
+ useFileExtensions?: boolean;
2647
+ useLimitContentLength?: boolean;
2648
+ useLimitContentTypes?: boolean;
2649
+ fileExtension?: string;
1734
2650
  };
1735
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2651
+ }, config?: RequestConfig) => RequestBuilder<any>;
1736
2652
  };
1737
2653
  findOne: {
1738
2654
  /** 根据 ID 查询存储桶详情 */
1739
2655
  post: (body: {
1740
2656
  id: string;
1741
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2657
+ }, config?: RequestConfig) => RequestBuilder<any>;
1742
2658
  };
1743
2659
  options: {
1744
2660
  /** 获取存储桶下拉选项 */
1745
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2661
+ post: (config?: RequestConfig) => RequestBuilder<any>;
1746
2662
  };
1747
2663
  };
1748
2664
  files: {
@@ -1756,26 +2672,26 @@ export interface ApiClient {
1756
2672
  type: string;
1757
2673
  webkitRelativePath: string;
1758
2674
  subjectUserId?: string;
1759
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2675
+ }, config?: RequestConfig) => RequestBuilder<any>;
1760
2676
  };
1761
2677
  delete: {
1762
2678
  /** 删除文件 */
1763
2679
  post: (body: {
1764
2680
  id: string;
1765
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2681
+ }, config?: RequestConfig) => RequestBuilder<any>;
1766
2682
  };
1767
2683
  deleteMany: {
1768
2684
  /** 批量删除多个文件 */
1769
2685
  post: (body: {
1770
2686
  ids: string[];
1771
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2687
+ }, config?: RequestConfig) => RequestBuilder<any>;
1772
2688
  };
1773
2689
  update: {
1774
2690
  /** 更新文件信息 */
1775
2691
  post: (body: {
1776
2692
  id: string;
1777
2693
  status: "progress" | "success" | "fail";
1778
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2694
+ }, config?: RequestConfig) => RequestBuilder<any>;
1779
2695
  };
1780
2696
  find: {
1781
2697
  /** 分页查询文件列表,支持关键词搜索 */
@@ -1783,6 +2699,7 @@ export interface ApiClient {
1783
2699
  current: number;
1784
2700
  pageSize: number;
1785
2701
  where: {
2702
+ id?: string;
1786
2703
  bucketId?: string;
1787
2704
  name?: string;
1788
2705
  filename?: string;
@@ -1791,26 +2708,33 @@ export interface ApiClient {
1791
2708
  keyword?: string;
1792
2709
  fileCategory?: string;
1793
2710
  creatorKeyword?: string;
2711
+ bucketAccessScope?: "private" | "all_apps";
1794
2712
  };
1795
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2713
+ }, config?: RequestConfig) => RequestBuilder<any>;
2714
+ };
2715
+ findMany: {
2716
+ /** 根据 ID 列表批量查询文件详情 */
2717
+ post: (body: {
2718
+ ids: string[];
2719
+ }, config?: RequestConfig) => RequestBuilder<any>;
1796
2720
  };
1797
2721
  findOne: {
1798
2722
  /** 根据 ID 查询文件详情 */
1799
2723
  post: (body: {
1800
2724
  id: string;
1801
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2725
+ }, config?: RequestConfig) => RequestBuilder<any>;
1802
2726
  };
1803
2727
  getUrl: {
1804
2728
  /** 获取单个文件的访问 URL */
1805
2729
  post: (body: {
1806
2730
  filename: string;
1807
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2731
+ }, config?: RequestConfig) => RequestBuilder<any>;
1808
2732
  };
1809
2733
  getUrls: {
1810
2734
  /** 批量获取多个文件的访问 URL */
1811
2735
  post: (body: {
1812
2736
  filenames: string[];
1813
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2737
+ }, config?: RequestConfig) => RequestBuilder<any>;
1814
2738
  };
1815
2739
  getKeyAndCredentials: {
1816
2740
  /** 获取文件上传的密钥和凭证 */
@@ -1820,98 +2744,7 @@ export interface ApiClient {
1820
2744
  size: number;
1821
2745
  type: string;
1822
2746
  subjectUserId?: string;
1823
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1824
- };
1825
- };
1826
- events: {
1827
- create: {
1828
- /** 创建新事件 */
1829
- post: (body: {
1830
- name: string;
1831
- eventKey: string;
1832
- type: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
1833
- description: string;
1834
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1835
- };
1836
- delete: {
1837
- /** 删除事件 */
1838
- post: (body: {
1839
- id: string;
1840
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1841
- };
1842
- update: {
1843
- /** 更新事件信息 */
1844
- post: (body: {
1845
- id: string;
1846
- name: string;
1847
- eventKey: string;
1848
- type: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
1849
- description: string;
1850
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1851
- };
1852
- find: {
1853
- /** 分页查询事件列表 */
1854
- post: (body: {
1855
- current: number;
1856
- pageSize: number;
1857
- where: {
1858
- name?: string;
1859
- type?: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
1860
- eventKey?: string;
1861
- description?: string;
1862
- };
1863
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1864
- };
1865
- findOne: {
1866
- /** 根据 ID 查询事件详情 */
1867
- post: (body: {
1868
- id: string;
1869
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1870
- };
1871
- };
1872
- eventLogs: {
1873
- create: {
1874
- /** 创建新事件日志 */
1875
- post: (body: {
1876
- payload: unknown;
1877
- name: string;
1878
- eventKey: string;
1879
- type: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
1880
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1881
- };
1882
- delete: {
1883
- /** 删除事件日志 */
1884
- post: (body: {
1885
- id: string;
1886
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1887
- };
1888
- update: {
1889
- /** 更新事件日志 */
1890
- post: (body: {
1891
- id: string;
1892
- payload: unknown;
1893
- name: string;
1894
- eventKey: string;
1895
- type: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
1896
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1897
- };
1898
- find: {
1899
- /** 分页查询事件日志列表 */
1900
- post: (body: {
1901
- current: number;
1902
- pageSize: number;
1903
- where: {
1904
- name?: string;
1905
- type?: "authentication" | "connection" | "directory" | "directoryGroup" | "directoryUser" | "emailVerification" | "invitation" | "magicAuth" | "organization" | "organizationDomain" | "organizationMembership" | "passwordReset" | "role" | "permissionManagement" | "session" | "user";
1906
- eventKey?: string;
1907
- };
1908
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
1909
- };
1910
- findOne: {
1911
- /** 根据 ID 查询事件日志详情 */
1912
- post: (body: {
1913
- id: string;
1914
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2747
+ }, config?: RequestConfig) => RequestBuilder<any>;
1915
2748
  };
1916
2749
  };
1917
2750
  feedbackCenter: {
@@ -1919,23 +2752,23 @@ export interface ApiClient {
1919
2752
  /** 用户提交反馈 */
1920
2753
  post: (body: {
1921
2754
  title: string;
1922
- type: "bugReports" | "featureSuggestions" | "technicalSupportRequests" | "generalOpinions";
2755
+ type: "bugReports" | "featureSuggestions" | "technicalSupportRequests" | "generalOpinions" | "illegalContentReports";
1923
2756
  description: string;
1924
2757
  priority?: "urgent" | "high" | "normal" | "low";
1925
- attachments?: {
2758
+ attachments?: ({
1926
2759
  key: string;
1927
2760
  name: string;
1928
2761
  size: number;
1929
2762
  mimeType: string;
1930
2763
  kind: "image" | "video" | "file";
1931
- }[];
1932
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2764
+ })[];
2765
+ }, config?: RequestConfig) => RequestBuilder<any>;
1933
2766
  };
1934
2767
  delete: {
1935
2768
  /** 删除反馈 */
1936
2769
  post: (body: {
1937
2770
  id: string;
1938
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2771
+ }, config?: RequestConfig) => RequestBuilder<any>;
1939
2772
  };
1940
2773
  update: {
1941
2774
  /** 更新反馈内容 */
@@ -1944,13 +2777,13 @@ export interface ApiClient {
1944
2777
  status?: "newFeedback" | "inProgress" | "pending" | "resolved" | "closed";
1945
2778
  priority?: "urgent" | "high" | "normal" | "low";
1946
2779
  assigneeId?: string;
1947
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2780
+ }, config?: RequestConfig) => RequestBuilder<any>;
1948
2781
  status: {
1949
2782
  /** 更新反馈处理状态 */
1950
2783
  post: (body: {
1951
2784
  id: string;
1952
2785
  status: "newFeedback" | "inProgress" | "pending" | "resolved" | "closed";
1953
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2786
+ }, config?: RequestConfig) => RequestBuilder<any>;
1954
2787
  };
1955
2788
  messages: {
1956
2789
  /** 在反馈会话中发送消息 */
@@ -1959,16 +2792,16 @@ export interface ApiClient {
1959
2792
  message: {
1960
2793
  type: "text";
1961
2794
  content?: string;
1962
- attachments?: {
2795
+ attachments?: ({
1963
2796
  key: string;
1964
2797
  name: string;
1965
2798
  size: number;
1966
2799
  mimeType: string;
1967
2800
  kind: "image" | "video" | "file";
1968
- }[];
2801
+ })[];
1969
2802
  senderRole: "user" | "support" | "system";
1970
2803
  };
1971
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2804
+ }, config?: RequestConfig) => RequestBuilder<any>;
1972
2805
  };
1973
2806
  };
1974
2807
  batch: {
@@ -1976,13 +2809,13 @@ export interface ApiClient {
1976
2809
  /** 批量删除反馈 */
1977
2810
  post: (body: {
1978
2811
  ids: string[];
1979
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2812
+ }, config?: RequestConfig) => RequestBuilder<any>;
1980
2813
  };
1981
2814
  close: {
1982
2815
  /** 批量关闭反馈 */
1983
2816
  post: (body: {
1984
2817
  ids: string[];
1985
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2818
+ }, config?: RequestConfig) => RequestBuilder<any>;
1986
2819
  };
1987
2820
  };
1988
2821
  find: {
@@ -1998,36 +2831,37 @@ export interface ApiClient {
1998
2831
  assigneeKeyword?: string;
1999
2832
  creatorKeyword?: string;
2000
2833
  };
2001
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2834
+ }, config?: RequestConfig) => RequestBuilder<any>;
2002
2835
  };
2003
2836
  findOne: {
2004
2837
  /** 根据 ID 查询反馈详情 */
2005
2838
  post: (body: {
2006
2839
  id: string;
2007
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2840
+ }, config?: RequestConfig) => RequestBuilder<any>;
2008
2841
  };
2009
2842
  own: {
2010
2843
  /** 查询当前用户提交的反馈 */
2011
2844
  post: (body: {
2012
2845
  current: number;
2013
2846
  pageSize: number;
2014
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2847
+ }, config?: RequestConfig) => RequestBuilder<any>;
2015
2848
  };
2016
2849
  unreadReplyCount: {
2017
- /** 统计末条客服消息尚未阅读的未关闭反馈数 */
2018
- post: (config?: RequestConfig) => Promise<ApiResponse<{
2019
- count: number;
2020
- }>>;
2850
+ /** 统计当前用户反馈中末条客服消息尚未阅读的会话数量 */
2851
+ post: (config?: RequestConfig) => RequestBuilder<any>;
2021
2852
  };
2022
2853
  markRead: {
2023
2854
  /** 将反馈会话中当前消息标记为已读 */
2024
2855
  post: (body: {
2025
2856
  id: string;
2026
- }, config?: RequestConfig) => Promise<ApiResponse<Record<string, never>>>;
2857
+ }, config?: RequestConfig) => RequestBuilder<any>;
2027
2858
  };
2028
2859
  getTrafficStatistics: {
2029
2860
  /** 获取反馈流量统计数据 */
2030
- post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
2861
+ post: (body: {
2862
+ startTime: string;
2863
+ endTime: string;
2864
+ }, config?: RequestConfig) => RequestBuilder<any>;
2031
2865
  };
2032
2866
  getCountChart: {
2033
2867
  /** 获取反馈数量趋势图表 */
@@ -2035,7 +2869,7 @@ export interface ApiClient {
2035
2869
  startTime: string;
2036
2870
  endTime: string;
2037
2871
  granularity: "minute" | "hour" | "day" | "month" | "year";
2038
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2872
+ }, config?: RequestConfig) => RequestBuilder<any>;
2039
2873
  };
2040
2874
  };
2041
2875
  messages: {
@@ -2046,28 +2880,28 @@ export interface ApiClient {
2046
2880
  message: {
2047
2881
  type: "text";
2048
2882
  content?: string;
2049
- attachments?: {
2883
+ attachments?: ({
2050
2884
  key: string;
2051
2885
  name: string;
2052
2886
  size: number;
2053
2887
  mimeType: string;
2054
2888
  kind: "image" | "video" | "file";
2055
- }[];
2889
+ })[];
2056
2890
  senderRole: "user" | "support" | "system";
2057
2891
  };
2058
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2892
+ }, config?: RequestConfig) => RequestBuilder<any>;
2059
2893
  };
2060
2894
  list: {
2061
2895
  /** 分页查询对话消息列表 */
2062
2896
  post: (body: {
2063
2897
  id: string;
2064
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2898
+ }, config?: RequestConfig) => RequestBuilder<any>;
2065
2899
  incremental: {
2066
2900
  /** 增量查询新的对话消息 */
2067
2901
  post: (body: {
2068
2902
  id: string;
2069
2903
  lastSeq?: number;
2070
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2904
+ }, config?: RequestConfig) => RequestBuilder<any>;
2071
2905
  };
2072
2906
  };
2073
2907
  };
@@ -2076,21 +2910,39 @@ export interface ApiClient {
2076
2910
  /** 创建新文档 */
2077
2911
  post: (body: {
2078
2912
  repositorieId: string;
2079
- content: string;
2080
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2913
+ content: {
2914
+ type: string;
2915
+ attrs?: Record<string, string | number | boolean | null | unknown[] | Record<string, unknown>>;
2916
+ content?: unknown[];
2917
+ marks?: ({
2918
+ type: string;
2919
+ attrs?: Record<string, string | number | boolean | null | unknown[] | Record<string, unknown>>;
2920
+ })[];
2921
+ text?: string;
2922
+ };
2923
+ }, config?: RequestConfig) => RequestBuilder<any>;
2081
2924
  };
2082
2925
  delete: {
2083
2926
  /** 删除文档 */
2084
2927
  post: (body: {
2085
2928
  id: string;
2086
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2929
+ }, config?: RequestConfig) => RequestBuilder<any>;
2087
2930
  };
2088
2931
  update: {
2089
2932
  /** 更新文档内容 */
2090
2933
  post: (body: {
2091
2934
  id: string;
2092
- content: string;
2093
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2935
+ content: {
2936
+ type: string;
2937
+ attrs?: Record<string, string | number | boolean | null | unknown[] | Record<string, unknown>>;
2938
+ content?: unknown[];
2939
+ marks?: ({
2940
+ type: string;
2941
+ attrs?: Record<string, string | number | boolean | null | unknown[] | Record<string, unknown>>;
2942
+ })[];
2943
+ text?: string;
2944
+ };
2945
+ }, config?: RequestConfig) => RequestBuilder<any>;
2094
2946
  };
2095
2947
  find: {
2096
2948
  /** 分页查询文档列表 */
@@ -2100,13 +2952,19 @@ export interface ApiClient {
2100
2952
  where: {
2101
2953
  content?: string;
2102
2954
  };
2103
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2955
+ }, config?: RequestConfig) => RequestBuilder<any>;
2104
2956
  };
2105
2957
  findOne: {
2106
- /** 根据 ID 查询文档详情 */
2958
+ /** 根据 ID 查询当前应用的文档管理详情 */
2959
+ post: (body: {
2960
+ id: string;
2961
+ }, config?: RequestConfig) => RequestBuilder<any>;
2962
+ };
2963
+ findPublicOne: {
2964
+ /** 仅查询已公开知识库中的文档详情 */
2107
2965
  post: (body: {
2108
2966
  id: string;
2109
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2967
+ }, config?: RequestConfig) => RequestBuilder<any>;
2110
2968
  };
2111
2969
  };
2112
2970
  pages: {
@@ -2114,30 +2972,30 @@ export interface ApiClient {
2114
2972
  /** 创建新页面 */
2115
2973
  post: (body: {
2116
2974
  path: string;
2117
- components: {
2975
+ components: ({
2118
2976
  type: "pageFaq" | "pageHero" | "pageFeature";
2119
2977
  config: unknown;
2120
- }[];
2978
+ })[];
2121
2979
  description: string;
2122
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2980
+ }, config?: RequestConfig) => RequestBuilder<any>;
2123
2981
  };
2124
2982
  delete: {
2125
2983
  /** 删除页面 */
2126
2984
  post: (body: {
2127
2985
  id: string;
2128
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2986
+ }, config?: RequestConfig) => RequestBuilder<any>;
2129
2987
  };
2130
2988
  update: {
2131
2989
  /** 更新页面内容 */
2132
2990
  post: (body: {
2133
2991
  id: string;
2134
2992
  path: string;
2135
- components: {
2993
+ components: ({
2136
2994
  type: "pageFaq" | "pageHero" | "pageFeature";
2137
2995
  config: unknown;
2138
- }[];
2996
+ })[];
2139
2997
  description: string;
2140
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
2998
+ }, config?: RequestConfig) => RequestBuilder<any>;
2141
2999
  };
2142
3000
  find: {
2143
3001
  /** 分页查询页面列表 */
@@ -2147,7 +3005,7 @@ export interface ApiClient {
2147
3005
  where: {
2148
3006
  path?: string;
2149
3007
  };
2150
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3008
+ }, config?: RequestConfig) => RequestBuilder<any>;
2151
3009
  };
2152
3010
  };
2153
3011
  repositories: {
@@ -2157,13 +3015,13 @@ export interface ApiClient {
2157
3015
  title: string;
2158
3016
  description: string;
2159
3017
  isPublic: boolean;
2160
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3018
+ }, config?: RequestConfig) => RequestBuilder<any>;
2161
3019
  };
2162
3020
  delete: {
2163
3021
  /** 删除知识库 */
2164
3022
  post: (body: {
2165
3023
  id: string;
2166
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3024
+ }, config?: RequestConfig) => RequestBuilder<any>;
2167
3025
  };
2168
3026
  update: {
2169
3027
  /** 更新知识库信息 */
@@ -2172,13 +3030,34 @@ export interface ApiClient {
2172
3030
  title: string;
2173
3031
  description: string;
2174
3032
  isPublic: boolean;
2175
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3033
+ }, config?: RequestConfig) => RequestBuilder<any>;
2176
3034
  catalogues: {
2177
3035
  /** 更新知识库目录结构 */
2178
3036
  post: (body: {
2179
3037
  id: string;
2180
- catalogues: unknown[];
2181
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3038
+ catalogues: {
3039
+ name: string;
3040
+ key: string;
3041
+ children?: unknown[];
3042
+ }[];
3043
+ }, config?: RequestConfig) => RequestBuilder<any>;
3044
+ };
3045
+ };
3046
+ documents: {
3047
+ create: {
3048
+ /** 创建文档并原子化写入知识库目录 */
3049
+ post: (body: {
3050
+ repositoryId: string;
3051
+ parentId?: string;
3052
+ name: string;
3053
+ }, config?: RequestConfig) => RequestBuilder<any>;
3054
+ };
3055
+ delete: {
3056
+ /** 删除目录节点、子节点及对应文档 */
3057
+ post: (body: {
3058
+ repositoryId: string;
3059
+ documentId: string;
3060
+ }, config?: RequestConfig) => RequestBuilder<any>;
2182
3061
  };
2183
3062
  };
2184
3063
  find: {
@@ -2191,13 +3070,19 @@ export interface ApiClient {
2191
3070
  description?: string;
2192
3071
  isPublic?: boolean;
2193
3072
  };
2194
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3073
+ }, config?: RequestConfig) => RequestBuilder<any>;
2195
3074
  };
2196
3075
  findOne: {
2197
- /** 根据 ID 查询知识库详情 */
3076
+ /** 根据 ID 查询当前应用的知识库管理详情 */
3077
+ post: (body: {
3078
+ id: string;
3079
+ }, config?: RequestConfig) => RequestBuilder<any>;
3080
+ };
3081
+ findPublicOne: {
3082
+ /** 根据 ID 查询当前应用已公开的知识库详情 */
2198
3083
  post: (body: {
2199
3084
  id: string;
2200
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3085
+ }, config?: RequestConfig) => RequestBuilder<any>;
2201
3086
  };
2202
3087
  };
2203
3088
  repositoriesPermissions: {
@@ -2207,13 +3092,13 @@ export interface ApiClient {
2207
3092
  repositorieId: string;
2208
3093
  userId: string;
2209
3094
  role: "admin" | "edit" | "view" | "not";
2210
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3095
+ }, config?: RequestConfig) => RequestBuilder<any>;
2211
3096
  };
2212
3097
  delete: {
2213
3098
  /** 删除知识库访问权限 */
2214
3099
  post: (body: {
2215
3100
  id: string;
2216
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3101
+ }, config?: RequestConfig) => RequestBuilder<any>;
2217
3102
  };
2218
3103
  update: {
2219
3104
  /** 更新知识库访问权限 */
@@ -2221,7 +3106,7 @@ export interface ApiClient {
2221
3106
  id: string;
2222
3107
  userId: string;
2223
3108
  role: "admin" | "edit" | "view" | "not";
2224
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3109
+ }, config?: RequestConfig) => RequestBuilder<any>;
2225
3110
  };
2226
3111
  find: {
2227
3112
  /** 分页查询知识库权限列表 */
@@ -2232,13 +3117,13 @@ export interface ApiClient {
2232
3117
  repositorieId?: string;
2233
3118
  role?: "admin" | "edit" | "view" | "not";
2234
3119
  };
2235
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3120
+ }, config?: RequestConfig) => RequestBuilder<any>;
2236
3121
  };
2237
3122
  findOne: {
2238
3123
  /** 根据 ID 查询知识库权限详情 */
2239
3124
  post: (body: {
2240
3125
  id: string;
2241
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3126
+ }, config?: RequestConfig) => RequestBuilder<any>;
2242
3127
  };
2243
3128
  };
2244
3129
  blog: {
@@ -2249,13 +3134,13 @@ export interface ApiClient {
2249
3134
  description: string;
2250
3135
  content: unknown;
2251
3136
  coverImage: string;
2252
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3137
+ }, config?: RequestConfig) => RequestBuilder<any>;
2253
3138
  };
2254
3139
  delete: {
2255
3140
  /** 删除博客文章 */
2256
3141
  post: (body: {
2257
3142
  id: string;
2258
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3143
+ }, config?: RequestConfig) => RequestBuilder<any>;
2259
3144
  };
2260
3145
  update: {
2261
3146
  /** 更新博客文章内容 */
@@ -2265,7 +3150,7 @@ export interface ApiClient {
2265
3150
  description: string;
2266
3151
  content: unknown;
2267
3152
  coverImage: string;
2268
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3153
+ }, config?: RequestConfig) => RequestBuilder<any>;
2269
3154
  };
2270
3155
  find: {
2271
3156
  /** 分页查询博客文章列表 */
@@ -2275,13 +3160,276 @@ export interface ApiClient {
2275
3160
  where?: {
2276
3161
  title?: string;
2277
3162
  };
2278
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3163
+ }, config?: RequestConfig) => RequestBuilder<any>;
2279
3164
  };
2280
3165
  findOne: {
2281
3166
  /** 根据 ID 查询博客文章详情 */
2282
3167
  post: (body: {
2283
3168
  id: string;
2284
- }, config?: RequestConfig) => Promise<ApiResponse<any>>;
3169
+ }, config?: RequestConfig) => RequestBuilder<any>;
3170
+ };
3171
+ };
3172
+ releases: {
3173
+ getUploadToken: {
3174
+ /** STS 临时凭证(30 分钟)。对 electron/production/{appId}/{platform}/{arch}/versions/{version}/ 或 latest/ 目录授权。 */
3175
+ post: (body: {
3176
+ version: string;
3177
+ platformId: string;
3178
+ target?: "version" | "latest";
3179
+ filename: string;
3180
+ }, config?: RequestConfig) => RequestBuilder<any>;
3181
+ };
3182
+ uploadComplete: {
3183
+ /** 各平台打包上传完成后调用。服务端自动创建/更新版本记录。 */
3184
+ post: (body: {
3185
+ version: string;
3186
+ platformId: string;
3187
+ downloadUrl: string;
3188
+ artifactUrl?: string;
3189
+ zipUrl?: string;
3190
+ artifactKey?: string;
3191
+ latestKey?: string;
3192
+ zipKey?: string;
3193
+ fileSize?: number;
3194
+ releaseNotes?: string;
3195
+ channel?: string;
3196
+ }, config?: RequestConfig) => RequestBuilder<any>;
3197
+ };
3198
+ latest: {
3199
+ /** 公开接口。通过 app-id header 传入。 */
3200
+ post: (config?: RequestConfig) => RequestBuilder<any>;
3201
+ };
3202
+ list: {
3203
+ /** 管理端查询 Electron 发布版本列表。 */
3204
+ post: (body: {
3205
+ current: number;
3206
+ pageSize: number;
3207
+ where?: {
3208
+ version?: string;
3209
+ status?: "draft" | "published" | "disabled" | "archived";
3210
+ platformId?: string;
3211
+ channel?: string;
3212
+ };
3213
+ }, config?: RequestConfig) => RequestBuilder<any>;
3214
+ };
3215
+ detail: {
3216
+ /** 管理端查询单个 Electron 发布版本详情。 */
3217
+ post: (body: {
3218
+ version: string;
3219
+ }, config?: RequestConfig) => RequestBuilder<any>;
3220
+ };
3221
+ updateStatus: {
3222
+ /** 管理端更新发布版本状态。 */
3223
+ post: (body: {
3224
+ version: string;
3225
+ status: "draft" | "published" | "disabled" | "archived";
3226
+ }, config?: RequestConfig) => RequestBuilder<any>;
3227
+ };
3228
+ setLatest: {
3229
+ /** 管理端指定某版本为 latest,并重建 Electron 更新 feed。 */
3230
+ post: (body: {
3231
+ version: string;
3232
+ }, config?: RequestConfig) => RequestBuilder<any>;
3233
+ };
3234
+ refreshFeed: {
3235
+ /** 管理端按当前 latest 版本重建 Electron RELEASES.json。 */
3236
+ post: (body?: {
3237
+ version?: string;
3238
+ }, config?: RequestConfig) => RequestBuilder<any>;
3239
+ };
3240
+ };
3241
+ market: {
3242
+ getUploadToken: {
3243
+ /** STS 临时凭证(30 分钟),对 superx-market/extensions/{extensionId}/{version}/ 目录授权。 */
3244
+ post: (body: {
3245
+ extensionId: string;
3246
+ version: string;
3247
+ }, config?: RequestConfig) => RequestBuilder<any>;
3248
+ };
3249
+ publish: {
3250
+ /** CLI 上传完成后调用。创建或更新扩展版本记录。 */
3251
+ post: (body: {
3252
+ extensionId: string;
3253
+ version: string;
3254
+ sha256: string;
3255
+ name: string;
3256
+ description: string;
3257
+ overview?: string;
3258
+ icon: string;
3259
+ iconBg?: string;
3260
+ iconColor?: string;
3261
+ category: string;
3262
+ features: {
3263
+ tools?: boolean;
3264
+ skills?: boolean;
3265
+ mcps?: boolean;
3266
+ parts?: boolean;
3267
+ bin?: boolean;
3268
+ app?: {
3269
+ activation: {
3270
+ direct?: Record<string, unknown>;
3271
+ directory?: Record<string, unknown>;
3272
+ file?: {
3273
+ extensions?: string[];
3274
+ mediaKinds?: ("image" | "video" | "audio")[];
3275
+ };
3276
+ };
3277
+ };
3278
+ };
3279
+ defaults?: {
3280
+ extensionEnabled?: boolean;
3281
+ toolsChatEnabled?: boolean;
3282
+ };
3283
+ resources?: {
3284
+ description?: string;
3285
+ items: ({
3286
+ name: string;
3287
+ storageKind: "sqlite" | "vector" | "fulltext" | "filesystem";
3288
+ scope?: "extension" | "workspace" | "custom";
3289
+ description: string;
3290
+ queryHint: string;
3291
+ path?: string;
3292
+ capabilities?: {
3293
+ readable?: boolean;
3294
+ writable?: boolean;
3295
+ queryable?: boolean;
3296
+ searchable?: boolean;
3297
+ recoverable?: boolean;
3298
+ };
3299
+ })[];
3300
+ };
3301
+ runtime?: {
3302
+ binaries?: ({
3303
+ name: string;
3304
+ path: string;
3305
+ platform?: "darwin" | "win32" | "linux";
3306
+ arch?: "arm64" | "x64";
3307
+ required?: boolean;
3308
+ })[];
3309
+ };
3310
+ assets: {
3311
+ tools?: {
3312
+ description: string;
3313
+ items: {
3314
+ name: string;
3315
+ displayName?: string;
3316
+ description: string;
3317
+ category: string;
3318
+ parameters?: Record<string, unknown>;
3319
+ governance?: {
3320
+ sideEffectLevel?: string;
3321
+ approvalPolicy?: string;
3322
+ };
3323
+ }[];
3324
+ };
3325
+ parts?: {
3326
+ description: string;
3327
+ items: {
3328
+ name: string;
3329
+ description: string;
3330
+ }[];
3331
+ };
3332
+ app?: {
3333
+ description: string;
3334
+ activation: {
3335
+ direct?: Record<string, unknown>;
3336
+ directory?: Record<string, unknown>;
3337
+ file?: {
3338
+ extensions?: string[];
3339
+ mediaKinds?: ("image" | "video" | "audio")[];
3340
+ };
3341
+ };
3342
+ };
3343
+ skills?: {
3344
+ description: string;
3345
+ items: {
3346
+ name: string;
3347
+ description?: string;
3348
+ }[];
3349
+ };
3350
+ mcps?: {
3351
+ description: string;
3352
+ items: ({
3353
+ name: string;
3354
+ description?: string;
3355
+ transport?: "stdio" | "streamableHttp" | "sse";
3356
+ })[];
3357
+ };
3358
+ resources?: {
3359
+ description?: string;
3360
+ items: ({
3361
+ name: string;
3362
+ storageKind: "sqlite" | "vector" | "fulltext" | "filesystem";
3363
+ scope?: "extension" | "workspace" | "custom";
3364
+ description: string;
3365
+ queryHint: string;
3366
+ path?: string;
3367
+ capabilities?: {
3368
+ readable?: boolean;
3369
+ writable?: boolean;
3370
+ queryable?: boolean;
3371
+ searchable?: boolean;
3372
+ recoverable?: boolean;
3373
+ };
3374
+ })[];
3375
+ };
3376
+ };
3377
+ tags: string[];
3378
+ lifecycle: {
3379
+ installable: boolean;
3380
+ uninstallable: boolean;
3381
+ enableSwitch: boolean;
3382
+ updatable: boolean;
3383
+ };
3384
+ }, config?: RequestConfig) => RequestBuilder<any>;
3385
+ };
3386
+ delete: {
3387
+ /** CLI 删除已发布扩展。支持删除单个版本或全部版本,并同步清理 COS 归档。 */
3388
+ post: (body: {
3389
+ extensionId: string;
3390
+ version?: string;
3391
+ }, config?: RequestConfig) => RequestBuilder<any>;
3392
+ };
3393
+ catalog: {
3394
+ /** 公开接口。Ones 标准分页(current/pageSize/where → items/count)。每个 extensionId 仅返回最新 published 版本;不含 overview/assets(详情走 /market/detail)。 */
3395
+ post: (body: {
3396
+ current: number;
3397
+ pageSize: number;
3398
+ where?: {
3399
+ keyword?: string;
3400
+ category?: string;
3401
+ feature?: string;
3402
+ extensionId?: string;
3403
+ extensionIds?: string[];
3404
+ installStatus?: "installed" | "not-installed";
3405
+ installedIds?: string[];
3406
+ };
3407
+ }, config?: RequestConfig) => RequestBuilder<any>;
3408
+ };
3409
+ detail: {
3410
+ /** 公开接口。仅获取已发布扩展的详情和 CDN 下载基础 URL。 */
3411
+ post: (body: {
3412
+ extensionId: string;
3413
+ version?: string;
3414
+ }, config?: RequestConfig) => RequestBuilder<any>;
3415
+ };
3416
+ admin: {
3417
+ 'set-status': {
3418
+ /** 管理接口。修改扩展的上架状态(published/unlisted/suspended)。需登录态。 */
3419
+ post: (body: {
3420
+ extensionId: string;
3421
+ status: "published" | "unlisted" | "suspended";
3422
+ reason?: string;
3423
+ }, config?: RequestConfig) => RequestBuilder<any>;
3424
+ };
3425
+ 'set-trust': {
3426
+ /** 管理接口。修改扩展的信任等级(official/verified/community)。需登录态。 */
3427
+ post: (body: {
3428
+ extensionId: string;
3429
+ trust: "official" | "verified" | "community";
3430
+ reason?: string;
3431
+ }, config?: RequestConfig) => RequestBuilder<any>;
3432
+ };
2285
3433
  };
2286
3434
  };
2287
3435
  }