smartbi-toolkit 1.0.1 → 1.1.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.
- package/README.md +41 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +99 -0
- package/dist/main.d.ts +0 -1
- package/dist/main.js +18 -0
- package/dist/methods/AnalysisReportService.d.ts +93 -0
- package/dist/methods/AnalysisReportService.js +126 -0
- package/dist/methods/BusinessThemeService.d.ts +8 -0
- package/dist/methods/BusinessThemeService.js +11 -0
- package/dist/methods/BusinessViewService.d.ts +94 -0
- package/dist/methods/BusinessViewService.js +120 -0
- package/dist/methods/CatalogService.d.ts +1 -89
- package/dist/methods/CatalogService.js +224 -0
- package/dist/methods/ClientCombinedReportService.d.ts +63 -0
- package/dist/methods/ClientCombinedReportService.js +82 -0
- package/dist/methods/ClientInsightService.d.ts +83 -0
- package/dist/methods/ClientInsightService.js +107 -0
- package/dist/methods/ClientReportService.d.ts +162 -0
- package/dist/methods/ClientReportService.js +206 -0
- package/dist/methods/CombinedReportService.d.ts +7 -0
- package/dist/methods/CombinedReportService.js +10 -0
- package/dist/methods/DataSourceService.d.ts +178 -0
- package/dist/methods/DataSourceService.js +220 -0
- package/dist/methods/GraphicReportService.d.ts +6 -0
- package/dist/methods/GraphicReportService.js +10 -0
- package/dist/methods/InsightReport.d.ts +71 -0
- package/dist/methods/InsightReport.js +98 -0
- package/dist/methods/MetadataService.d.ts +37 -0
- package/dist/methods/MetadataService.js +47 -0
- package/dist/methods/OfficeReport.d.ts +49 -0
- package/dist/methods/OfficeReport.js +65 -0
- package/dist/methods/OfficeReportService.d.ts +36 -0
- package/dist/methods/OfficeReportService.js +46 -0
- package/dist/methods/OltpMetadataService.d.ts +19 -0
- package/dist/methods/OltpMetadataService.js +25 -0
- package/dist/methods/ParameterService.d.ts +12 -0
- package/dist/methods/ParameterService.js +18 -0
- package/dist/methods/PoolService.d.ts +11 -0
- package/dist/methods/PoolService.js +17 -0
- package/dist/methods/PortalService.d.ts +66 -0
- package/dist/methods/PortalService.js +89 -0
- package/dist/methods/Report.d.ts +178 -0
- package/dist/methods/Report.js +230 -0
- package/dist/methods/SSReport.d.ts +86 -0
- package/dist/methods/SSReport.js +114 -0
- package/dist/methods/ScheduleTaskService.d.ts +12 -0
- package/dist/methods/ScheduleTaskService.js +18 -0
- package/dist/methods/SimpleReportService.d.ts +12 -0
- package/dist/methods/SimpleReportService.js +18 -0
- package/dist/methods/SpreadSheetReportService.d.ts +43 -0
- package/dist/methods/SpreadSheetReportService.js +55 -0
- package/dist/methods/SystemConfigService.d.ts +28 -0
- package/dist/methods/SystemConfigService.js +24 -0
- package/dist/methods/TimeConsuming.d.ts +6 -0
- package/dist/methods/TimeConsuming.js +9 -0
- package/dist/methods/TimeConsumingService.d.ts +5 -0
- package/dist/methods/TimeConsumingService.js +9 -0
- package/dist/methods/UserManagerService.d.ts +258 -0
- package/dist/methods/UserManagerService.js +332 -0
- package/dist/types.d.ts +442 -0
- package/dist/types.js +125 -0
- package/dist/vite-plugin-smartbi/index.d.ts +36 -0
- package/dist/vite-plugin-smartbi/index.js +107 -0
- package/package.json +129 -11
- package/dist/CatalogService.es.js +0 -112
- package/dist/SmartbiToolbox.es.js +0 -51
- package/dist/index.d.ts.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/methods/CatalogService.d.ts.map +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { NameValuePair, Parameter, RunningInfo, SSReportExportType } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 打开电子表格报表
|
|
4
|
+
* @param id 报表ID
|
|
5
|
+
* @returns 无返回值
|
|
6
|
+
*/
|
|
7
|
+
export declare const openSSReport: (id: string) => Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* 关闭电子表格报表
|
|
10
|
+
* @returns 无返回值
|
|
11
|
+
*/
|
|
12
|
+
export declare const closeSSReport: () => Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* 获取参数列表
|
|
15
|
+
* @returns 返回参数列表
|
|
16
|
+
*/
|
|
17
|
+
export declare const getSSReportParamList: () => Promise<Parameter[]>;
|
|
18
|
+
/**
|
|
19
|
+
* 根据参数ID获取参数备选值
|
|
20
|
+
* @param paramId 参数ID
|
|
21
|
+
* @returns 返回参数键值对
|
|
22
|
+
*/
|
|
23
|
+
export declare const getSSReportParamStandbyValue: (paramId: string) => Promise<NameValuePair[]>;
|
|
24
|
+
/**
|
|
25
|
+
* 根据参数ID获取参数默认值
|
|
26
|
+
* @param pid 参数ID
|
|
27
|
+
* @returns 返回参数默认值
|
|
28
|
+
*/
|
|
29
|
+
export declare const getSSReportParamDefaultValueByPID: (pid: string) => Promise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* 导出电子表格(基础版)
|
|
32
|
+
* @param type 导出类型
|
|
33
|
+
* @param os 输出流
|
|
34
|
+
* @returns 无返回值
|
|
35
|
+
*/
|
|
36
|
+
export declare const exportSSReport: (type: SSReportExportType | string, os: any) => Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* 导出电子表格(带参数版)
|
|
39
|
+
* @param type 导出格式
|
|
40
|
+
* @param os 输出流
|
|
41
|
+
* @param postData 请求参数
|
|
42
|
+
* @returns 无返回值
|
|
43
|
+
*/
|
|
44
|
+
export declare const exportSSReportWithPostData: (type: SSReportExportType | string, os: any, postData: string) => Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* 设置参数值
|
|
47
|
+
* @param id 参数ID
|
|
48
|
+
* @param value 值
|
|
49
|
+
* @param displayValue 显示值
|
|
50
|
+
* @returns 无返回值
|
|
51
|
+
*/
|
|
52
|
+
export declare const setSSReportParamValue: (id: string, value: string, displayValue: string) => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* 设置导出工作单的索引
|
|
55
|
+
* @param exportSheetIndexes 导出工作单的索引
|
|
56
|
+
* @returns 无返回值
|
|
57
|
+
*/
|
|
58
|
+
export declare const setSSReportExportSheetIndexes: (exportSheetIndexes: string) => Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* 设置是否导出公式
|
|
61
|
+
* @param exportFormula 是否导出公式
|
|
62
|
+
* @returns 无返回值
|
|
63
|
+
*/
|
|
64
|
+
export declare const setSSReportExportFormula: (exportFormula: boolean) => Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* 获取执行状态
|
|
67
|
+
* @returns 返回执行状态
|
|
68
|
+
*/
|
|
69
|
+
export declare const getSSReportExecutingState: () => Promise<RunningInfo>;
|
|
70
|
+
/**
|
|
71
|
+
* 获取操作
|
|
72
|
+
* @returns 返回操作
|
|
73
|
+
*/
|
|
74
|
+
export declare const getSSReportOperation: () => Promise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* 设置操作
|
|
77
|
+
* @param operation 操作
|
|
78
|
+
* @returns 无返回值
|
|
79
|
+
*/
|
|
80
|
+
export declare const setSSReportOperation: (operation: string) => Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* 设置筛选条件
|
|
83
|
+
* @param filtersRule 筛选条件json
|
|
84
|
+
* @returns 无返回值
|
|
85
|
+
*/
|
|
86
|
+
export declare const setSSReportFiltersRule: (filtersRule: string) => Promise<void>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { smartbi } from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* 打开电子表格报表
|
|
4
|
+
* @param id 报表ID
|
|
5
|
+
* @returns 无返回值
|
|
6
|
+
*/
|
|
7
|
+
export const openSSReport = (id) => {
|
|
8
|
+
return smartbi('SSReport', 'open', [id]);
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 关闭电子表格报表
|
|
12
|
+
* @returns 无返回值
|
|
13
|
+
*/
|
|
14
|
+
export const closeSSReport = () => {
|
|
15
|
+
return smartbi('SSReport', 'close', []);
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* 获取参数列表
|
|
19
|
+
* @returns 返回参数列表
|
|
20
|
+
*/
|
|
21
|
+
export const getSSReportParamList = () => {
|
|
22
|
+
return smartbi('SSReport', 'getParamList', []);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 根据参数ID获取参数备选值
|
|
26
|
+
* @param paramId 参数ID
|
|
27
|
+
* @returns 返回参数键值对
|
|
28
|
+
*/
|
|
29
|
+
export const getSSReportParamStandbyValue = (paramId) => {
|
|
30
|
+
return smartbi('SSReport', 'getParamStandbyValue', [paramId]);
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 根据参数ID获取参数默认值
|
|
34
|
+
* @param pid 参数ID
|
|
35
|
+
* @returns 返回参数默认值
|
|
36
|
+
*/
|
|
37
|
+
export const getSSReportParamDefaultValueByPID = (pid) => {
|
|
38
|
+
return smartbi('SSReport', 'getParamDefaultValueByPID', [pid]);
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* 导出电子表格(基础版)
|
|
42
|
+
* @param type 导出类型
|
|
43
|
+
* @param os 输出流
|
|
44
|
+
* @returns 无返回值
|
|
45
|
+
*/
|
|
46
|
+
export const exportSSReport = (type, os) => {
|
|
47
|
+
return smartbi('SSReport', 'doExport', [type, os]);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* 导出电子表格(带参数版)
|
|
51
|
+
* @param type 导出格式
|
|
52
|
+
* @param os 输出流
|
|
53
|
+
* @param postData 请求参数
|
|
54
|
+
* @returns 无返回值
|
|
55
|
+
*/
|
|
56
|
+
export const exportSSReportWithPostData = (type, os, postData) => {
|
|
57
|
+
return smartbi('SSReport', 'doExport', [type, os, postData]);
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* 设置参数值
|
|
61
|
+
* @param id 参数ID
|
|
62
|
+
* @param value 值
|
|
63
|
+
* @param displayValue 显示值
|
|
64
|
+
* @returns 无返回值
|
|
65
|
+
*/
|
|
66
|
+
export const setSSReportParamValue = (id, value, displayValue) => {
|
|
67
|
+
return smartbi('SSReport', 'setParamValue', [id, value, displayValue]);
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* 设置导出工作单的索引
|
|
71
|
+
* @param exportSheetIndexes 导出工作单的索引
|
|
72
|
+
* @returns 无返回值
|
|
73
|
+
*/
|
|
74
|
+
export const setSSReportExportSheetIndexes = (exportSheetIndexes) => {
|
|
75
|
+
return smartbi('SSReport', 'setExportSheetIndexes', [exportSheetIndexes]);
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* 设置是否导出公式
|
|
79
|
+
* @param exportFormula 是否导出公式
|
|
80
|
+
* @returns 无返回值
|
|
81
|
+
*/
|
|
82
|
+
export const setSSReportExportFormula = (exportFormula) => {
|
|
83
|
+
return smartbi('SSReport', 'setExportFormula', [exportFormula]);
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* 获取执行状态
|
|
87
|
+
* @returns 返回执行状态
|
|
88
|
+
*/
|
|
89
|
+
export const getSSReportExecutingState = () => {
|
|
90
|
+
return smartbi('SSReport', 'getExecutingState', []);
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* 获取操作
|
|
94
|
+
* @returns 返回操作
|
|
95
|
+
*/
|
|
96
|
+
export const getSSReportOperation = () => {
|
|
97
|
+
return smartbi('SSReport', 'getOperation', []);
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* 设置操作
|
|
101
|
+
* @param operation 操作
|
|
102
|
+
* @returns 无返回值
|
|
103
|
+
*/
|
|
104
|
+
export const setSSReportOperation = (operation) => {
|
|
105
|
+
return smartbi('SSReport', 'setOperation', [operation]);
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* 设置筛选条件
|
|
109
|
+
* @param filtersRule 筛选条件json
|
|
110
|
+
* @returns 无返回值
|
|
111
|
+
*/
|
|
112
|
+
export const setSSReportFiltersRule = (filtersRule) => {
|
|
113
|
+
return smartbi('SSReport', 'setFiltersRule', [filtersRule]);
|
|
114
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 执行计划任务
|
|
3
|
+
* @param scheduleId 计划ID
|
|
4
|
+
* @returns 返回执行结果的布尔值
|
|
5
|
+
*/
|
|
6
|
+
export declare const executeSchedule: (scheduleId: string) => Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* 执行任务
|
|
9
|
+
* @param taskId 任务ID
|
|
10
|
+
* @returns 返回执行结果的布尔值
|
|
11
|
+
*/
|
|
12
|
+
export declare const executeTask: (taskId: string) => Promise<boolean>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// 定义SmartBI计划任务服务相关的类型接口
|
|
2
|
+
import { smartbi } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* 执行计划任务
|
|
5
|
+
* @param scheduleId 计划ID
|
|
6
|
+
* @returns 返回执行结果的布尔值
|
|
7
|
+
*/
|
|
8
|
+
export const executeSchedule = (scheduleId) => {
|
|
9
|
+
return smartbi('ScheduleTaskService', 'executeSchedule', [scheduleId]);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 执行任务
|
|
13
|
+
* @param taskId 任务ID
|
|
14
|
+
* @returns 返回执行结果的布尔值
|
|
15
|
+
*/
|
|
16
|
+
export const executeTask = (taskId) => {
|
|
17
|
+
return smartbi('ScheduleTaskService', 'executeTask', [taskId]);
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 创建并打开一个报表
|
|
3
|
+
* @param reportId 报表ID
|
|
4
|
+
* @returns 返回打开的报表对象
|
|
5
|
+
*/
|
|
6
|
+
export declare const openReport: (reportId: string) => Promise<any>;
|
|
7
|
+
/**
|
|
8
|
+
* 打开一个报表不初始化数据库链接
|
|
9
|
+
* @param reportId 报表ID
|
|
10
|
+
* @returns 返回打开的报表对象
|
|
11
|
+
*/
|
|
12
|
+
export declare const openReportWithoutInit: (reportId: string) => Promise<any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// 定义SmartBI简单报表服务相关的类型接口
|
|
2
|
+
import { smartbi } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* 创建并打开一个报表
|
|
5
|
+
* @param reportId 报表ID
|
|
6
|
+
* @returns 返回打开的报表对象
|
|
7
|
+
*/
|
|
8
|
+
export const openReport = (reportId) => {
|
|
9
|
+
return smartbi('SimpleReportService', 'openReport', [reportId]);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 打开一个报表不初始化数据库链接
|
|
13
|
+
* @param reportId 报表ID
|
|
14
|
+
* @returns 返回打开的报表对象
|
|
15
|
+
*/
|
|
16
|
+
export const openReportWithoutInit = (reportId) => {
|
|
17
|
+
return smartbi('SimpleReportService', 'openReportWithoutInit', [reportId]);
|
|
18
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { NameValuePair } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 打开电子表格报表
|
|
4
|
+
* @param reportId 报表ID
|
|
5
|
+
* @returns 返回客户端ID
|
|
6
|
+
*/
|
|
7
|
+
export declare const openSpreadSheetReportQuery: (reportId: string) => Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* 关闭电子表格报表
|
|
10
|
+
* @param clientId 客户端ID
|
|
11
|
+
* @returns 无返回值
|
|
12
|
+
*/
|
|
13
|
+
export declare const closeSpreadSheetReportQuery: (clientId: string) => Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* 根据参数ID获取参数默认值
|
|
16
|
+
* @param panelId 参数面板ID
|
|
17
|
+
* @param paramId 参数ID
|
|
18
|
+
* @returns 返回参数默认值
|
|
19
|
+
*/
|
|
20
|
+
export declare const getSpreadSheetReportParamDefaultValueByPID: (panelId: string, paramId: string) => Promise<any[]>;
|
|
21
|
+
/**
|
|
22
|
+
* 获取参数备选值
|
|
23
|
+
* @param panelId 参数面板ID
|
|
24
|
+
* @param paramId 参数ID
|
|
25
|
+
* @returns 返回参数标准值
|
|
26
|
+
*/
|
|
27
|
+
export declare const getSpreadSheetReportParamStandbyValue: (panelId: string, paramId: string) => Promise<NameValuePair[]>;
|
|
28
|
+
/**
|
|
29
|
+
* 获取报表层面的参数默认值
|
|
30
|
+
* @param contextId 报表上下文会话id
|
|
31
|
+
* @param paramId 参数id
|
|
32
|
+
* @returns 返回报表参数默认值
|
|
33
|
+
*/
|
|
34
|
+
export declare const getSpreadSheetReportParamDefaultValueByContext: (contextId: string, paramId: string) => Promise<any[]>;
|
|
35
|
+
/**
|
|
36
|
+
* 设置参数值
|
|
37
|
+
* @param panelId 参数面板ID
|
|
38
|
+
* @param paramId 参数ID
|
|
39
|
+
* @param value 值
|
|
40
|
+
* @param displayValue 显示值
|
|
41
|
+
* @returns 返回是否设置成功的布尔值
|
|
42
|
+
*/
|
|
43
|
+
export declare const setSpreadSheetReportParamValue: (panelId: string, paramId: string, value: string, displayValue: string) => Promise<boolean>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { smartbi } from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* 打开电子表格报表
|
|
4
|
+
* @param reportId 报表ID
|
|
5
|
+
* @returns 返回客户端ID
|
|
6
|
+
*/
|
|
7
|
+
export const openSpreadSheetReportQuery = (reportId) => {
|
|
8
|
+
return smartbi('SpreadSheetReportService', 'openQuery', [reportId]);
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 关闭电子表格报表
|
|
12
|
+
* @param clientId 客户端ID
|
|
13
|
+
* @returns 无返回值
|
|
14
|
+
*/
|
|
15
|
+
export const closeSpreadSheetReportQuery = (clientId) => {
|
|
16
|
+
return smartbi('SpreadSheetReportService', 'closeQuery', [clientId]);
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 根据参数ID获取参数默认值
|
|
20
|
+
* @param panelId 参数面板ID
|
|
21
|
+
* @param paramId 参数ID
|
|
22
|
+
* @returns 返回参数默认值
|
|
23
|
+
*/
|
|
24
|
+
export const getSpreadSheetReportParamDefaultValueByPID = (panelId, paramId) => {
|
|
25
|
+
return smartbi('SpreadSheetReportService', 'getParamDefaultValueByPID', [panelId, paramId]);
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* 获取参数备选值
|
|
29
|
+
* @param panelId 参数面板ID
|
|
30
|
+
* @param paramId 参数ID
|
|
31
|
+
* @returns 返回参数标准值
|
|
32
|
+
*/
|
|
33
|
+
export const getSpreadSheetReportParamStandbyValue = (panelId, paramId) => {
|
|
34
|
+
return smartbi('SpreadSheetReportService', 'getParamStandbyValue', [panelId, paramId]);
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 获取报表层面的参数默认值
|
|
38
|
+
* @param contextId 报表上下文会话id
|
|
39
|
+
* @param paramId 参数id
|
|
40
|
+
* @returns 返回报表参数默认值
|
|
41
|
+
*/
|
|
42
|
+
export const getSpreadSheetReportParamDefaultValueByContext = (contextId, paramId) => {
|
|
43
|
+
return smartbi('SpreadSheetReportService', 'getReportParamDefaultValueByPID', [contextId, paramId]);
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* 设置参数值
|
|
47
|
+
* @param panelId 参数面板ID
|
|
48
|
+
* @param paramId 参数ID
|
|
49
|
+
* @param value 值
|
|
50
|
+
* @param displayValue 显示值
|
|
51
|
+
* @returns 返回是否设置成功的布尔值
|
|
52
|
+
*/
|
|
53
|
+
export const setSpreadSheetReportParamValue = (panelId, paramId, value, displayValue) => {
|
|
54
|
+
return smartbi('SpreadSheetReportService', 'setParamValue', [panelId, paramId, value, displayValue]);
|
|
55
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface SystemConfig {
|
|
2
|
+
id: string;
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
category?: string;
|
|
8
|
+
dataType?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
editable?: boolean;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 获取系统设置
|
|
15
|
+
* @returns 返回系统设置对象列表
|
|
16
|
+
*/
|
|
17
|
+
export declare const getSystemConfigs: () => Promise<SystemConfig[]>;
|
|
18
|
+
/**
|
|
19
|
+
* 根据键获取系统配置
|
|
20
|
+
* @param key 配置键
|
|
21
|
+
* @returns 返回系统配置对象
|
|
22
|
+
*/
|
|
23
|
+
export declare const getSystemConfig: (key: string) => Promise<SystemConfig>;
|
|
24
|
+
/**
|
|
25
|
+
* 清空缓存
|
|
26
|
+
* @returns 无返回值
|
|
27
|
+
*/
|
|
28
|
+
export declare const clearSystemConfigCache: () => Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// 定义SmartBI系统配置服务相关的类型接口
|
|
2
|
+
import { smartbi } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* 获取系统设置
|
|
5
|
+
* @returns 返回系统设置对象列表
|
|
6
|
+
*/
|
|
7
|
+
export const getSystemConfigs = () => {
|
|
8
|
+
return smartbi('SystemConfigService', 'getSystemConfigs', []);
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 根据键获取系统配置
|
|
12
|
+
* @param key 配置键
|
|
13
|
+
* @returns 返回系统配置对象
|
|
14
|
+
*/
|
|
15
|
+
export const getSystemConfig = (key) => {
|
|
16
|
+
return smartbi('SystemConfigService', 'getSystemConfig', [key]);
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 清空缓存
|
|
20
|
+
* @returns 无返回值
|
|
21
|
+
*/
|
|
22
|
+
export const clearSystemConfigCache = () => {
|
|
23
|
+
return smartbi('SystemConfigService', 'clearCache', []);
|
|
24
|
+
};
|