@@ -4,67 +4,71 @@ import { MakeCodeResponse, OpenAPIResponse } from "../types/openAPI";
4
4
/** 不同使用场景,各自注册服务来源 */
5
5
const defaultSpecs : any [ ] = [ ] ;
6
6
export const PontUIService = {
7
- /** 获取本地元数据列表 */
8
- requestPontSpecs : async ( ) => {
9
- return {
10
- localSpecs : defaultSpecs as any [ ] as PontSpec [ ] ,
11
- remoteSpecs : defaultSpecs as any [ ] as PontSpec [ ] ,
12
- currentOriginName : "" ,
13
- } ;
14
- } ,
15
-
16
- requestDefinitions : async ( specName : string ) => {
17
- return { } as any ;
18
- } ,
19
-
20
- /** 获取 本地/远程 的diff信息 */
21
- requestDiffs : async ( ) => {
22
- return [ ] as any ;
23
- } ,
24
-
25
- /** 重新生成SDK */
26
- requestGenerateSdk : async ( ) : Promise < void > => { } ,
27
-
28
- /** 重新拉取远程数据源 */
29
- syncRemoteSpec : async ( specNames = "" ) : Promise < void > => { } ,
30
-
31
- updateLocalSpec : async ( spec : PontSpec ) : Promise < void > => { } ,
32
-
33
- /** 更新本地数据源 */
34
- updateSpecBySpecNames : async ( specNames = "" ) : Promise < void > => { } ,
35
-
36
- /** 更新本地模块 */
37
- updateMod : async ( modName : string , specName = "" ) : Promise < void > => { } ,
38
-
39
- /** 更新本地 API */
40
- updateAPI : async ( modName : string , apiName : string , specName = "" ) : Promise < void > => { } ,
41
-
42
- /** 更新类 */
43
- updateBaseClass : async ( className : string , specName = "" ) : Promise < void > => { } ,
44
-
45
- openMeta : async ( meta : {
46
- name : string ;
47
- specName : string ;
48
- modName ?: string ;
49
- type : string ;
50
- spec : any ;
51
- } ) : Promise < void > => { } ,
7
+ /** 获取本地元数据列表 */
8
+ requestPontSpecs : async ( ) => {
9
+ return {
10
+ localSpecs : defaultSpecs as any [ ] as PontSpec [ ] ,
11
+ remoteSpecs : defaultSpecs as any [ ] as PontSpec [ ] ,
12
+ currentOriginName : "" ,
13
+ } ;
14
+ } ,
52
15
53
- /** request openapi */
54
- openAPIRequest : async ( params = { } ) : Promise < OpenAPIResponse > => new OpenAPIResponse ,
16
+ requestDefinitions : async ( specName : string ) => {
17
+ return { } as any ;
18
+ } ,
55
19
56
- /** get endpoints list */
57
- requestEndpoints : async ( product : string ) => {
58
- return [ ] as any ;
59
- } ,
60
- /** get sdk demo */
61
- makeCodeRequest : async ( params = { } ) : Promise < MakeCodeResponse > => new MakeCodeResponse ,
62
- /** get local language */
63
- getLocalLanguage : async ( ) => "" ,
64
- /** update local language */
65
- updateLocalLanguage : async ( language :string ) => "" ,
66
- /** open in ide */
67
- openInCode : async ( codeInfo :{ code :string , language :string } ) : Promise < void > => { } ,
68
- /** save to file */
69
- saveToFile : async ( code :string ) : Promise < void > => { } ,
70
- } ;
20
+ /** 获取 本地/远程 的diff信息 */
21
+ requestDiffs : async ( ) => {
22
+ return [ ] as any ;
23
+ } ,
24
+
25
+ /** 重新生成SDK */
26
+ requestGenerateSdk : async ( ) : Promise < void > => { } ,
27
+
28
+ /** 重新拉取远程数据源 */
29
+ syncRemoteSpec : async ( specNames = "" ) : Promise < void > => { } ,
30
+
31
+ updateLocalSpec : async ( spec : PontSpec ) : Promise < void > => { } ,
32
+
33
+ /** 更新本地数据源 */
34
+ updateSpecBySpecNames : async ( specNames = "" ) : Promise < void > => { } ,
35
+
36
+ /** 更新本地模块 */
37
+ updateMod : async ( modName : string , specName = "" ) : Promise < void > => { } ,
38
+
39
+ /** 更新本地 API */
40
+ updateAPI : async ( modName : string , apiName : string , specName = "" ) : Promise < void > => { } ,
41
+
42
+ /** 更新类 */
43
+ updateBaseClass : async ( className : string , specName = "" ) : Promise < void > => { } ,
44
+
45
+ openMeta : async ( meta : {
46
+ name : string ;
47
+ specName : string ;
48
+ modName ?: string ;
49
+ type : string ;
50
+ spec : any ;
51
+ } ) : Promise < void > => { } ,
52
+
53
+ /** request openapi */
54
+ openAPIRequest : async ( params = { } ) : Promise < OpenAPIResponse > => new OpenAPIResponse ( ) ,
55
+
56
+ /** get endpoints list */
57
+ requestEndpoints : async ( product : string ) => {
58
+ return [ ] as any ;
59
+ } ,
60
+ /** get sdk demo */
61
+ makeCodeRequest : async ( params = { } ) : Promise < MakeCodeResponse > => new MakeCodeResponse ( ) ,
62
+ /** get local language */
63
+ getLocalLanguage : async ( ) => "" ,
64
+ /** update local language */
65
+ updateLocalLanguage : async ( language : string ) => "" ,
66
+ /** open in ide */
67
+ openInCode : async ( codeInfo : { code : string ; language : string } ) : Promise < void > => { } ,
68
+ /** save to file */
69
+ saveToFile : async ( code : string ) : Promise < void > => { } ,
70
+ /** 是否弹出通知框 */
71
+ getNoticeFlag : async ( ) : Promise < boolean > => true ,
72
+ /** 更新体验弹窗弹出的时间 */
73
+ updateQuestionnaireExpiration : async ( days : number ) : Promise < void > => { } ,
74
+ } ;
0 commit comments