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.
Files changed (69) hide show
  1. package/README.md +41 -0
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.js +99 -0
  4. package/dist/main.d.ts +0 -1
  5. package/dist/main.js +18 -0
  6. package/dist/methods/AnalysisReportService.d.ts +93 -0
  7. package/dist/methods/AnalysisReportService.js +126 -0
  8. package/dist/methods/BusinessThemeService.d.ts +8 -0
  9. package/dist/methods/BusinessThemeService.js +11 -0
  10. package/dist/methods/BusinessViewService.d.ts +94 -0
  11. package/dist/methods/BusinessViewService.js +120 -0
  12. package/dist/methods/CatalogService.d.ts +1 -89
  13. package/dist/methods/CatalogService.js +224 -0
  14. package/dist/methods/ClientCombinedReportService.d.ts +63 -0
  15. package/dist/methods/ClientCombinedReportService.js +82 -0
  16. package/dist/methods/ClientInsightService.d.ts +83 -0
  17. package/dist/methods/ClientInsightService.js +107 -0
  18. package/dist/methods/ClientReportService.d.ts +162 -0
  19. package/dist/methods/ClientReportService.js +206 -0
  20. package/dist/methods/CombinedReportService.d.ts +7 -0
  21. package/dist/methods/CombinedReportService.js +10 -0
  22. package/dist/methods/DataSourceService.d.ts +178 -0
  23. package/dist/methods/DataSourceService.js +220 -0
  24. package/dist/methods/GraphicReportService.d.ts +6 -0
  25. package/dist/methods/GraphicReportService.js +10 -0
  26. package/dist/methods/InsightReport.d.ts +71 -0
  27. package/dist/methods/InsightReport.js +98 -0
  28. package/dist/methods/MetadataService.d.ts +37 -0
  29. package/dist/methods/MetadataService.js +47 -0
  30. package/dist/methods/OfficeReport.d.ts +49 -0
  31. package/dist/methods/OfficeReport.js +65 -0
  32. package/dist/methods/OfficeReportService.d.ts +36 -0
  33. package/dist/methods/OfficeReportService.js +46 -0
  34. package/dist/methods/OltpMetadataService.d.ts +19 -0
  35. package/dist/methods/OltpMetadataService.js +25 -0
  36. package/dist/methods/ParameterService.d.ts +12 -0
  37. package/dist/methods/ParameterService.js +18 -0
  38. package/dist/methods/PoolService.d.ts +11 -0
  39. package/dist/methods/PoolService.js +17 -0
  40. package/dist/methods/PortalService.d.ts +66 -0
  41. package/dist/methods/PortalService.js +89 -0
  42. package/dist/methods/Report.d.ts +178 -0
  43. package/dist/methods/Report.js +230 -0
  44. package/dist/methods/SSReport.d.ts +86 -0
  45. package/dist/methods/SSReport.js +114 -0
  46. package/dist/methods/ScheduleTaskService.d.ts +12 -0
  47. package/dist/methods/ScheduleTaskService.js +18 -0
  48. package/dist/methods/SimpleReportService.d.ts +12 -0
  49. package/dist/methods/SimpleReportService.js +18 -0
  50. package/dist/methods/SpreadSheetReportService.d.ts +43 -0
  51. package/dist/methods/SpreadSheetReportService.js +55 -0
  52. package/dist/methods/SystemConfigService.d.ts +28 -0
  53. package/dist/methods/SystemConfigService.js +24 -0
  54. package/dist/methods/TimeConsuming.d.ts +6 -0
  55. package/dist/methods/TimeConsuming.js +9 -0
  56. package/dist/methods/TimeConsumingService.d.ts +5 -0
  57. package/dist/methods/TimeConsumingService.js +9 -0
  58. package/dist/methods/UserManagerService.d.ts +258 -0
  59. package/dist/methods/UserManagerService.js +332 -0
  60. package/dist/types.d.ts +442 -0
  61. package/dist/types.js +125 -0
  62. package/dist/vite-plugin-smartbi/index.d.ts +36 -0
  63. package/dist/vite-plugin-smartbi/index.js +107 -0
  64. package/package.json +129 -11
  65. package/dist/CatalogService.es.js +0 -112
  66. package/dist/SmartbiToolbox.es.js +0 -51
  67. package/dist/index.d.ts.map +0 -1
  68. package/dist/main.d.ts.map +0 -1
  69. package/dist/methods/CatalogService.d.ts.map +0 -1
@@ -0,0 +1,220 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 创建数据源
4
+ * @param name 数据源名称
5
+ * @param connectUserName 连接用户名
6
+ * @param connectPassword 连接密码
7
+ * @param maxConnection 最大连接数
8
+ * @param driverType 数据库类型
9
+ * @param driverClassName 驱动程序类名
10
+ * @param url 连接字符串
11
+ * @returns 返回数据源ID
12
+ */
13
+ export const createDataSource = (name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url) => {
14
+ return smartbi('DataSourceService', 'createDataSource', [name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url]);
15
+ };
16
+ /**
17
+ * 创建数据源(带目录参数)
18
+ * @param name 数据源名称
19
+ * @param connectUserName 连接用户名
20
+ * @param connectPassword 连接密码
21
+ * @param maxConnection 最大连接数
22
+ * @param driverType 数据库类型
23
+ * @param driverClassName 驱动程序类名
24
+ * @param url 连接字符串
25
+ * @param driverCatalog 驱动目录
26
+ * @returns 返回数据源ID
27
+ */
28
+ export const createDataSourceWithCatalog = (name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog) => {
29
+ return smartbi('DataSourceService', 'createDataSource', [name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog]);
30
+ };
31
+ /**
32
+ * 创建数据源(带事务隔离级别)
33
+ * @param name 数据源名称
34
+ * @param connectUserName 连接用户名
35
+ * @param connectPassword 连接密码
36
+ * @param maxConnection 最大连接数
37
+ * @param driverType 数据库类型
38
+ * @param driverClassName 驱动程序类名
39
+ * @param url 连接字符串
40
+ * @param driverCatalog 驱动目录
41
+ * @param transactionIsolation 事务隔离级别
42
+ * @returns 返回数据源ID
43
+ */
44
+ export const createDataSourceWithTransactionIsolation = (name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog, transactionIsolation) => {
45
+ return smartbi('DataSourceService', 'createDataSource', [name, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog, transactionIsolation]);
46
+ };
47
+ /**
48
+ * 修改数据源
49
+ * @param id 数据源ID
50
+ * @param connectUserName 连接用户名
51
+ * @param connectPassword 连接密码
52
+ * @param maxConnection 最大连接数
53
+ * @param driverType 数据库类型
54
+ * @param driverClassName 驱动程序类名
55
+ * @param url 连接字符串
56
+ */
57
+ export const updateDataSource = (id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url) => {
58
+ return smartbi('DataSourceService', 'updateDataSource', [id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url]);
59
+ };
60
+ /**
61
+ * 修改数据源(带目录参数)
62
+ * @param id 数据源ID
63
+ * @param connectUserName 连接用户名
64
+ * @param connectPassword 连接密码
65
+ * @param maxConnection 最大连接数
66
+ * @param driverType 数据库类型
67
+ * @param driverClassName 驱动程序类名
68
+ * @param url 连接字符串
69
+ * @param driverCatalog 驱动目录
70
+ */
71
+ export const updateDataSourceWithCatalog = (id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog) => {
72
+ return smartbi('DataSourceService', 'updateDataSource', [id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog]);
73
+ };
74
+ /**
75
+ * 修改数据源(带事务隔离级别)
76
+ * @param id 数据源ID
77
+ * @param connectUserName 连接用户名
78
+ * @param connectPassword 连接密码
79
+ * @param maxConnection 最大连接数
80
+ * @param driverType 数据库类型
81
+ * @param driverClassName 驱动程序类名
82
+ * @param url 连接字符串
83
+ * @param driverCatalog 驱动目录
84
+ * @param transactionIsolation 事务隔离级别
85
+ */
86
+ export const updateDataSourceWithTransactionIsolation = (id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog, transactionIsolation) => {
87
+ return smartbi('DataSourceService', 'updateDataSource', [id, connectUserName, connectPassword, maxConnection, driverType, driverClassName, url, driverCatalog, transactionIsolation]);
88
+ };
89
+ /**
90
+ * 删除数据源
91
+ * @param dataSourceID 数据源ID
92
+ */
93
+ export const deleteDataSource = (dataSourceID) => {
94
+ return smartbi('DataSourceService', 'deleteDataSource', [dataSourceID]);
95
+ };
96
+ /**
97
+ * 获取数据源
98
+ * @param dataSourceID 数据源ID
99
+ * @returns 返回数据源对象
100
+ */
101
+ export const getDataSource = (dataSourceID) => {
102
+ return smartbi('DataSourceService', 'getDataSource', [dataSourceID]);
103
+ };
104
+ /**
105
+ * 给数据源添加表
106
+ * @param dataSourceId 数据源ID
107
+ * @param tableList 表列表
108
+ */
109
+ export const addTablesToDataSource = (dataSourceId, tableList) => {
110
+ return smartbi('DataSourceService', 'addTablesToDataSource', [dataSourceId, tableList.toString()]);
111
+ };
112
+ /**
113
+ * 删除数据源的表、视图、存储过程
114
+ * @param dataSourceId 数据源ID
115
+ * @param schemaName 模式名称
116
+ * @param tableNameList 表名列表
117
+ */
118
+ export const removeTablesFromDataSource = (dataSourceId, schemaName, tableNameList) => {
119
+ return smartbi('DataSourceService', 'removeTablesFromDataSource', [dataSourceId, schemaName, tableNameList.toString()]);
120
+ };
121
+ /**
122
+ * 删除数据库表
123
+ * @param dsId 数据源ID
124
+ * @param schemaName 模式名称
125
+ * @param tableNameList 表名列表
126
+ */
127
+ export const removeTables = (dsId, schemaName, tableNameList) => {
128
+ return smartbi('DataSourceService', 'removeTables', [dsId, schemaName, tableNameList.toString()]);
129
+ };
130
+ /**
131
+ * 同步schema表
132
+ * @param dataSourceID 数据源ID
133
+ * @param schema 模式名称
134
+ */
135
+ export const synchTablesToDataSource = (dataSourceID, schema) => {
136
+ return smartbi('DataSourceService', 'synchTablesToDataSource', [dataSourceID, schema]);
137
+ };
138
+ /**
139
+ * 同步catalog下面schema表
140
+ * @param dataSourceID 数据源ID
141
+ * @param catalog 目录名称
142
+ * @param schema 模式名称
143
+ */
144
+ export const synchTablesToDataSourceWithCatalog = (dataSourceID, catalog, schema) => {
145
+ return smartbi('DataSourceService', 'synchTablesToDataSourceWhitCatalog', [dataSourceID, catalog, schema]);
146
+ };
147
+ /**
148
+ * 同步表
149
+ * @param tableId 表ID
150
+ */
151
+ export const syncTable = (tableId) => {
152
+ return smartbi('DataSourceService', 'syncTable', [tableId]);
153
+ };
154
+ /**
155
+ * 修改表属性
156
+ * @param tableId 表ID
157
+ * @param tableAlias 表别名
158
+ * @param fieldList 字段列表
159
+ */
160
+ export const updateTablePropertys = (tableId, tableAlias, fieldList) => {
161
+ return smartbi('DataSourceService', 'updateTablePropertys', [tableId, tableAlias, fieldList.toString()]);
162
+ };
163
+ /**
164
+ * 获取表字段
165
+ * @param tabelId 表ID
166
+ * @returns 返回字段列表
167
+ */
168
+ export const getFields = (tabelId) => {
169
+ return smartbi('DataSourceService', 'getFields', [tabelId]);
170
+ };
171
+ /**
172
+ * 获取"数据源"节点下某张表的数据
173
+ * @param tableId 表ID
174
+ * @param maxRows 最大行数
175
+ * @returns 返回表数据
176
+ */
177
+ export const getSampleTableData = (tableId, maxRows) => {
178
+ return smartbi('DataSourceService', 'getSampleTableData', [tableId, maxRows]);
179
+ };
180
+ /**
181
+ * 执行指定SQL语句,返回相应结果集
182
+ * @param dataSourceID 数据源ID
183
+ * @param sql SQL语句
184
+ * @param maxRows 最大行数
185
+ * @param format 是否格式化
186
+ * @param cacheable 是否缓存
187
+ * @returns 返回结果集数据
188
+ */
189
+ export const execute = (dataSourceID, sql, maxRows, format, cacheable) => {
190
+ return smartbi('DataSourceService', 'execute', [dataSourceID, sql, maxRows, format, cacheable]);
191
+ };
192
+ /**
193
+ * 直接执行指定SQL语句,返回相应结果集,不从缓存中返回结果集
194
+ * @param dataSourceID 数据源ID
195
+ * @param sql SQL语句
196
+ * @returns 返回结果集数据
197
+ */
198
+ export const executeNoCacheable = (dataSourceID, sql) => {
199
+ return smartbi('DataSourceService', 'executeNoCacheable', [dataSourceID, sql]);
200
+ };
201
+ /**
202
+ * 直接执行SQL语句,可以是INSERT, UPDATE, DELETE语句,也可以是SQL DDL语句
203
+ * @param dataSourceID 数据源ID
204
+ * @param sql SQL语句
205
+ * @returns 返回影响的行数
206
+ */
207
+ export const executeUpdate = (dataSourceID, sql) => {
208
+ return smartbi('DataSourceService', 'executeUpdate', [dataSourceID, sql]);
209
+ };
210
+ /**
211
+ * 获取未格式化的原始的结果集数据
212
+ * @param dsId 数据源ID
213
+ * @param sql SQL语句
214
+ * @param pageNum 页码
215
+ * @param rowPerPage 每页行数
216
+ * @returns 返回结果集数据
217
+ */
218
+ export const getDataByQuerySql = (dsId, sql, pageNum, rowPerPage) => {
219
+ return smartbi('DataSourceService', 'getDataByQuerySql', [dsId, sql, pageNum, rowPerPage]);
220
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 打开图形分析报表
3
+ * @param reportId 报表ID
4
+ * @returns 返回报表客户端ID
5
+ */
6
+ export declare const openGraphicReport: (reportId: string) => Promise<string>;
@@ -0,0 +1,10 @@
1
+ // 导入公共类型
2
+ import { smartbi } from "../index";
3
+ /**
4
+ * 打开图形分析报表
5
+ * @param reportId 报表ID
6
+ * @returns 返回报表客户端ID
7
+ */
8
+ export const openGraphicReport = (reportId) => {
9
+ return smartbi('GraphicReportService', 'openGraphicReport', [reportId]);
10
+ };
@@ -0,0 +1,71 @@
1
+ import type { Parameter, NameValuePair, ReportData, RunningInfo, JSONArray } from '../types';
2
+ /**
3
+ * 打开透视分析
4
+ * @param reportId 报表Id
5
+ * @returns 无返回值
6
+ */
7
+ export declare const open: (reportId: string) => Promise<void>;
8
+ /**
9
+ * 获取参数列表
10
+ * @returns 返回参数列表
11
+ */
12
+ export declare const getParamList: () => Promise<Parameter[]>;
13
+ /**
14
+ * 获取参数备选值
15
+ * @param paramId 参数Id
16
+ * @returns 返回备选值列表
17
+ */
18
+ export declare const getParamStandbyValue: (paramId: string) => Promise<NameValuePair[]>;
19
+ /**
20
+ * 根据参数Id获取参数默认值
21
+ * @param pid 参数Id
22
+ * @returns 返回默认值字符串
23
+ */
24
+ export declare const getParamDefaultValueByPID: (pid: string) => Promise<string>;
25
+ /**
26
+ * 根据参数Id获取参数默认值
27
+ * @param pid 参数Id
28
+ * @returns 返回默认值JSONArray
29
+ */
30
+ export declare const getParamDefaultValueByPID2: (pid: string) => Promise<JSONArray>;
31
+ /**
32
+ * 导出
33
+ * @param type 导出类型
34
+ * @param delimiter 分隔符
35
+ * @param maxRow 最大行数
36
+ * @param resourceBasePath 资源基础路径
37
+ * @param valueType 值类型
38
+ * @param contentType 内容类型
39
+ * @param paramArr 可选参数数组
40
+ * @returns 无返回值
41
+ */
42
+ export declare const doExport: (type: string, delimiter: string, maxRow: string, resourceBasePath: string, valueType: string, contentType: string, paramArr?: JSONArray) => Promise<void>;
43
+ /**
44
+ * 设置参数值
45
+ * @param id 参数Id
46
+ * @param value 参数真实值
47
+ * @param displayValue 参数显示值
48
+ * @returns 无返回值
49
+ */
50
+ export declare const setParamValue: (id: string, value: string, displayValue: string) => Promise<void>;
51
+ /**
52
+ * 刷新对象
53
+ * @returns 无返回值
54
+ */
55
+ export declare const refreshObject: () => Promise<void>;
56
+ /**
57
+ * 关闭透视分析
58
+ * @returns 无返回值
59
+ */
60
+ export declare const close: () => Promise<void>;
61
+ /**
62
+ * 获取执行状态
63
+ * @returns 返回执行状态信息
64
+ */
65
+ export declare const getExecutingState: () => Promise<RunningInfo>;
66
+ /**
67
+ * 取得报表的指定页
68
+ * @param pageIndex 页码
69
+ * @returns 返回报表数据
70
+ */
71
+ export declare const getPage: (pageIndex: number) => Promise<ReportData>;
@@ -0,0 +1,98 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 打开透视分析
4
+ * @param reportId 报表Id
5
+ * @returns 无返回值
6
+ */
7
+ export const open = (reportId) => {
8
+ return smartbi('InsightReport', 'open', [reportId]);
9
+ };
10
+ /**
11
+ * 获取参数列表
12
+ * @returns 返回参数列表
13
+ */
14
+ export const getParamList = () => {
15
+ return smartbi('InsightReport', 'getParamList', []);
16
+ };
17
+ /**
18
+ * 获取参数备选值
19
+ * @param paramId 参数Id
20
+ * @returns 返回备选值列表
21
+ */
22
+ export const getParamStandbyValue = (paramId) => {
23
+ return smartbi('InsightReport', 'getParamStandbyValue', [paramId]);
24
+ };
25
+ /**
26
+ * 根据参数Id获取参数默认值
27
+ * @param pid 参数Id
28
+ * @returns 返回默认值字符串
29
+ */
30
+ export const getParamDefaultValueByPID = (pid) => {
31
+ return smartbi('InsightReport', 'getParamDefaultValueByPID', [pid]);
32
+ };
33
+ /**
34
+ * 根据参数Id获取参数默认值
35
+ * @param pid 参数Id
36
+ * @returns 返回默认值JSONArray
37
+ */
38
+ export const getParamDefaultValueByPID2 = (pid) => {
39
+ return smartbi('InsightReport', 'getParamDefaultValueByPID2', [pid]);
40
+ };
41
+ /**
42
+ * 导出
43
+ * @param type 导出类型
44
+ * @param delimiter 分隔符
45
+ * @param maxRow 最大行数
46
+ * @param resourceBasePath 资源基础路径
47
+ * @param valueType 值类型
48
+ * @param contentType 内容类型
49
+ * @param paramArr 可选参数数组
50
+ * @returns 无返回值
51
+ */
52
+ export const doExport = (type, delimiter, maxRow, resourceBasePath, valueType, contentType, paramArr) => {
53
+ if (paramArr !== undefined) {
54
+ return smartbi('InsightReport', 'doExportWithParams', [type, delimiter, maxRow, resourceBasePath, valueType, contentType, paramArr.toString()]);
55
+ }
56
+ else {
57
+ return smartbi('InsightReport', 'doExport', [type, delimiter, maxRow, resourceBasePath, valueType, contentType]);
58
+ }
59
+ };
60
+ /**
61
+ * 设置参数值
62
+ * @param id 参数Id
63
+ * @param value 参数真实值
64
+ * @param displayValue 参数显示值
65
+ * @returns 无返回值
66
+ */
67
+ export const setParamValue = (id, value, displayValue) => {
68
+ return smartbi('InsightReport', 'setParamValue', [id, value, displayValue]);
69
+ };
70
+ /**
71
+ * 刷新对象
72
+ * @returns 无返回值
73
+ */
74
+ export const refreshObject = () => {
75
+ return smartbi('InsightReport', 'refreshObject', []);
76
+ };
77
+ /**
78
+ * 关闭透视分析
79
+ * @returns 无返回值
80
+ */
81
+ export const close = () => {
82
+ return smartbi('InsightReport', 'close', []);
83
+ };
84
+ /**
85
+ * 获取执行状态
86
+ * @returns 返回执行状态信息
87
+ */
88
+ export const getExecutingState = () => {
89
+ return smartbi('InsightReport', 'getExecutingState', []);
90
+ };
91
+ /**
92
+ * 取得报表的指定页
93
+ * @param pageIndex 页码
94
+ * @returns 返回报表数据
95
+ */
96
+ export const getPage = (pageIndex) => {
97
+ return smartbi('InsightReport', 'getPage', [pageIndex]);
98
+ };
@@ -0,0 +1,37 @@
1
+ import type { IDocument, DocumentTreeNode, CategoryResource } from '../types';
2
+ /**
3
+ * 搜索被引用的资源(影响性分析)
4
+ * @param resId 要搜索的资源ID
5
+ * @param recursive 是否获取子节点
6
+ * @returns 返回树结构的被引用的资源列表
7
+ */
8
+ export declare const searchByReferenced: (resId: string, recursive: boolean) => Promise<DocumentTreeNode[]>;
9
+ /**
10
+ * 搜索引用到的资源(血统分析)
11
+ * @param resId 要搜索的资源ID
12
+ * @param recursive 是否获取子节点
13
+ * @returns 返回树结构的被引用的资源列表
14
+ */
15
+ export declare const searchReferringTo: (resId: string, recursive: boolean) => Promise<DocumentTreeNode[]>;
16
+ /**
17
+ * 检索当前用户是否具有权限检索对应的资源节点
18
+ * @param docs 要搜索的所有资源节点
19
+ * @returns 返回判断结果列表
20
+ */
21
+ export declare const checkPermission: (docs: IDocument[]) => Promise<boolean[]>;
22
+ /**
23
+ * 搜索被引用的资源(影响性分析)
24
+ * @param res 要搜索的资源
25
+ * @param filters 允许返回的资源类型
26
+ * @param recursive 是否递归
27
+ * @returns 返回引用的资源
28
+ */
29
+ export declare const searchByReferencedRecursive: (res: CategoryResource, filters: string[], recursive: boolean) => Promise<IDocument[]>;
30
+ /**
31
+ * 搜索引用到的资源(血统分析)
32
+ * @param res 要搜索的资源
33
+ * @param filters 允许返回的资源类型
34
+ * @param recursive 是否递归
35
+ * @returns 返回引用到的资源
36
+ */
37
+ export declare const searchReferringToRecursive: (res: CategoryResource, filters: string[], recursive: boolean) => Promise<IDocument[]>;
@@ -0,0 +1,47 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 搜索被引用的资源(影响性分析)
4
+ * @param resId 要搜索的资源ID
5
+ * @param recursive 是否获取子节点
6
+ * @returns 返回树结构的被引用的资源列表
7
+ */
8
+ export const searchByReferenced = (resId, recursive) => {
9
+ return smartbi('MetadataService', 'searchByReferenced', [resId, recursive]);
10
+ };
11
+ /**
12
+ * 搜索引用到的资源(血统分析)
13
+ * @param resId 要搜索的资源ID
14
+ * @param recursive 是否获取子节点
15
+ * @returns 返回树结构的被引用的资源列表
16
+ */
17
+ export const searchReferringTo = (resId, recursive) => {
18
+ return smartbi('MetadataService', 'searchReferringTo', [resId, recursive]);
19
+ };
20
+ /**
21
+ * 检索当前用户是否具有权限检索对应的资源节点
22
+ * @param docs 要搜索的所有资源节点
23
+ * @returns 返回判断结果列表
24
+ */
25
+ export const checkPermission = (docs) => {
26
+ return smartbi('MetadataService', 'checkPermission', [docs.toString()]);
27
+ };
28
+ /**
29
+ * 搜索被引用的资源(影响性分析)
30
+ * @param res 要搜索的资源
31
+ * @param filters 允许返回的资源类型
32
+ * @param recursive 是否递归
33
+ * @returns 返回引用的资源
34
+ */
35
+ export const searchByReferencedRecursive = (res, filters, recursive) => {
36
+ return smartbi('MetadataService', 'searchByReferencedRecursive', [JSON.stringify(res), filters.toString(), recursive]);
37
+ };
38
+ /**
39
+ * 搜索引用到的资源(血统分析)
40
+ * @param res 要搜索的资源
41
+ * @param filters 允许返回的资源类型
42
+ * @param recursive 是否递归
43
+ * @returns 返回引用到的资源
44
+ */
45
+ export const searchReferringToRecursive = (res, filters, recursive) => {
46
+ return smartbi('MetadataService', 'searchReferringToRecursive', [JSON.stringify(res), filters.toString(), recursive]);
47
+ };
@@ -0,0 +1,49 @@
1
+ import type { OfficeReportExportType, Parameter, RunningInfo } from '../types';
2
+ /**
3
+ * 打开Word分析报告
4
+ * @param id Word分析报告id
5
+ * @returns 无返回值
6
+ */
7
+ export declare const openOfficeReport: (id: string) => Promise<void>;
8
+ /**
9
+ * 关闭Word分析报告
10
+ * @returns 无返回值
11
+ */
12
+ export declare const closeOfficeReport: () => Promise<void>;
13
+ /**
14
+ * 获取Word分析报告参数列表
15
+ * @returns 返回参数列表
16
+ */
17
+ export declare const getOfficeReportParamList: () => Promise<Parameter[]>;
18
+ /**
19
+ * 根据参数ID获取参数备选值
20
+ * @param paramId 参数ID
21
+ * @returns 返回参数备选值列表
22
+ */
23
+ export declare const getOfficeReportParamStandbyValue: (paramId: string) => Promise<any[]>;
24
+ /**
25
+ * 根据参数ID获取参数默认值
26
+ * @param pid 参数ID
27
+ * @returns 返回参数默认值
28
+ */
29
+ export declare const getOfficeReportParamDefaultValueByPID: (pid: string) => Promise<string>;
30
+ /**
31
+ * 设置参数值
32
+ * @param id 参数ID
33
+ * @param value 参数真实值
34
+ * @param displayValue 参数显示值
35
+ * @returns 无返回值
36
+ */
37
+ export declare const setOfficeReportParamValue: (id: string, value: string, displayValue: string) => Promise<void>;
38
+ /**
39
+ * 导出Word分析报告
40
+ * @param type 导出类型
41
+ * @param os 输出流
42
+ * @returns 无返回值
43
+ */
44
+ export declare const exportOfficeReport: (type: OfficeReportExportType | string, os: any) => Promise<void>;
45
+ /**
46
+ * 获取执行状态
47
+ * @returns 返回执行状态信息
48
+ */
49
+ export declare const getOfficeReportExecutingState: () => Promise<RunningInfo>;
@@ -0,0 +1,65 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 打开Word分析报告
4
+ * @param id Word分析报告id
5
+ * @returns 无返回值
6
+ */
7
+ export const openOfficeReport = (id) => {
8
+ return smartbi('OfficeReport', 'open', [id]);
9
+ };
10
+ /**
11
+ * 关闭Word分析报告
12
+ * @returns 无返回值
13
+ */
14
+ export const closeOfficeReport = () => {
15
+ return smartbi('OfficeReport', 'close', []);
16
+ };
17
+ /**
18
+ * 获取Word分析报告参数列表
19
+ * @returns 返回参数列表
20
+ */
21
+ export const getOfficeReportParamList = () => {
22
+ return smartbi('OfficeReport', 'getParamList', []);
23
+ };
24
+ /**
25
+ * 根据参数ID获取参数备选值
26
+ * @param paramId 参数ID
27
+ * @returns 返回参数备选值列表
28
+ */
29
+ export const getOfficeReportParamStandbyValue = (paramId) => {
30
+ return smartbi('OfficeReport', 'getParamStandbyValue', [paramId]);
31
+ };
32
+ /**
33
+ * 根据参数ID获取参数默认值
34
+ * @param pid 参数ID
35
+ * @returns 返回参数默认值
36
+ */
37
+ export const getOfficeReportParamDefaultValueByPID = (pid) => {
38
+ return smartbi('OfficeReport', 'getParamDefaultValueByPID', [pid]);
39
+ };
40
+ /**
41
+ * 设置参数值
42
+ * @param id 参数ID
43
+ * @param value 参数真实值
44
+ * @param displayValue 参数显示值
45
+ * @returns 无返回值
46
+ */
47
+ export const setOfficeReportParamValue = (id, value, displayValue) => {
48
+ return smartbi('OfficeReport', 'setParamValue', [id, value, displayValue]);
49
+ };
50
+ /**
51
+ * 导出Word分析报告
52
+ * @param type 导出类型
53
+ * @param os 输出流
54
+ * @returns 无返回值
55
+ */
56
+ export const exportOfficeReport = (type, os) => {
57
+ return smartbi('OfficeReport', 'doExport', [type, os]);
58
+ };
59
+ /**
60
+ * 获取执行状态
61
+ * @returns 返回执行状态信息
62
+ */
63
+ export const getOfficeReportExecutingState = () => {
64
+ return smartbi('OfficeReport', 'getExecutingState', []);
65
+ };
@@ -0,0 +1,36 @@
1
+ import type { NameValuePair } from '../types';
2
+ /**
3
+ * 打开报表
4
+ * @param reportId 报表ID
5
+ * @returns 返回报表的JSON对象
6
+ */
7
+ export declare const openReport: (reportId: string) => Promise<any>;
8
+ /**
9
+ * 关闭报表
10
+ * @param clientId 客户端ID
11
+ * @returns 无返回值
12
+ */
13
+ export declare const closeReport: (clientId: string) => Promise<void>;
14
+ /**
15
+ * 获取参数备选值
16
+ * @param panelId 参数面板会话ID
17
+ * @param paramId 参数ID
18
+ * @returns 返回参数备选值列表
19
+ */
20
+ export declare const getParamStandbyValue: (panelId: string, paramId: string) => Promise<NameValuePair[]>;
21
+ /**
22
+ * 根据参数ID获取参数默认值
23
+ * @param panelId 参数面板会话ID
24
+ * @param paramId 参数ID
25
+ * @returns 返回参数默认值的JSON数组
26
+ */
27
+ export declare const getParamDefaultValueByPID: (panelId: string, paramId: string) => Promise<any[]>;
28
+ /**
29
+ * 设置参数值
30
+ * @param panelId 参数面板ID
31
+ * @param paramId 参数ID
32
+ * @param value 参数真实值
33
+ * @param displayValue 参数显示值
34
+ * @returns 返回是否设置成功的布尔值
35
+ */
36
+ export declare const setParamValue: (panelId: string, paramId: string, value: string, displayValue: string) => Promise<boolean>;
@@ -0,0 +1,46 @@
1
+ import { smartbi } from "../index";
2
+ /**
3
+ * 打开报表
4
+ * @param reportId 报表ID
5
+ * @returns 返回报表的JSON对象
6
+ */
7
+ export const openReport = (reportId) => {
8
+ return smartbi('OfficeReportService', 'openReport', [reportId]);
9
+ };
10
+ /**
11
+ * 关闭报表
12
+ * @param clientId 客户端ID
13
+ * @returns 无返回值
14
+ */
15
+ export const closeReport = (clientId) => {
16
+ return smartbi('OfficeReportService', 'closeReport', [clientId]);
17
+ };
18
+ /**
19
+ * 获取参数备选值
20
+ * @param panelId 参数面板会话ID
21
+ * @param paramId 参数ID
22
+ * @returns 返回参数备选值列表
23
+ */
24
+ export const getParamStandbyValue = (panelId, paramId) => {
25
+ return smartbi('OfficeReportService', 'getParamStandbyValue', [panelId, paramId]);
26
+ };
27
+ /**
28
+ * 根据参数ID获取参数默认值
29
+ * @param panelId 参数面板会话ID
30
+ * @param paramId 参数ID
31
+ * @returns 返回参数默认值的JSON数组
32
+ */
33
+ export const getParamDefaultValueByPID = (panelId, paramId) => {
34
+ return smartbi('OfficeReportService', 'getParamDefaultValueByPID', [panelId, paramId]);
35
+ };
36
+ /**
37
+ * 设置参数值
38
+ * @param panelId 参数面板ID
39
+ * @param paramId 参数ID
40
+ * @param value 参数真实值
41
+ * @param displayValue 参数显示值
42
+ * @returns 返回是否设置成功的布尔值
43
+ */
44
+ export const setParamValue = (panelId, paramId, value, displayValue) => {
45
+ return smartbi('OfficeReportService', 'setParamValue', [panelId, paramId, value, displayValue]);
46
+ };