smartbi-toolkit 1.1.3 → 1.2.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 (65) hide show
  1. package/README.md +59 -12
  2. package/dist/common-Cnq1SoER.d.ts +25 -0
  3. package/dist/console-BJttltN4.js +93 -0
  4. package/dist/index.d.ts +39 -0
  5. package/dist/index.js +111 -0
  6. package/dist/service/AnalysisReportService.d.ts +97 -0
  7. package/dist/service/AnalysisReportService.js +138 -0
  8. package/dist/service/BusinessThemeService.d.ts +11 -0
  9. package/dist/service/BusinessThemeService.js +20 -0
  10. package/dist/service/BusinessViewService.d.ts +98 -0
  11. package/dist/service/BusinessViewService.js +146 -0
  12. package/dist/service/CatalogService.d.ts +192 -0
  13. package/dist/service/CatalogService.js +300 -0
  14. package/dist/service/ClientCombinedReportService.d.ts +67 -0
  15. package/dist/service/ClientCombinedReportService.js +96 -0
  16. package/dist/service/ClientInsightService.d.ts +87 -0
  17. package/dist/service/ClientInsightService.js +123 -0
  18. package/dist/service/ClientReportService.d.ts +166 -0
  19. package/dist/service/ClientReportService.js +244 -0
  20. package/dist/service/CombinedReportService.d.ts +11 -0
  21. package/dist/service/CombinedReportService.js +14 -0
  22. package/dist/service/DataSourceService.d.ts +182 -0
  23. package/dist/service/DataSourceService.js +306 -0
  24. package/dist/service/GraphicReportService.d.ts +11 -0
  25. package/dist/service/GraphicReportService.js +14 -0
  26. package/dist/service/InsightReport.d.ts +75 -0
  27. package/dist/service/InsightReport.js +118 -0
  28. package/dist/service/MetadataService.d.ts +41 -0
  29. package/dist/service/MetadataService.js +60 -0
  30. package/dist/service/OfficeReport.d.ts +53 -0
  31. package/dist/service/OfficeReport.js +74 -0
  32. package/dist/service/OfficeReportService.d.ts +40 -0
  33. package/dist/service/OfficeReportService.js +56 -0
  34. package/dist/service/OltpMetadataService.d.ts +23 -0
  35. package/dist/service/OltpMetadataService.js +30 -0
  36. package/dist/service/ParameterService.d.ts +15 -0
  37. package/dist/service/ParameterService.js +22 -0
  38. package/dist/service/PoolService.d.ts +14 -0
  39. package/dist/service/PoolService.js +21 -0
  40. package/dist/service/PortalService.d.ts +70 -0
  41. package/dist/service/PortalService.js +106 -0
  42. package/dist/service/Report.d.ts +182 -0
  43. package/dist/service/Report.js +275 -0
  44. package/dist/service/SSReport.d.ts +90 -0
  45. package/dist/service/SSReport.js +127 -0
  46. package/dist/service/ScheduleTaskService.d.ts +15 -0
  47. package/dist/service/ScheduleTaskService.js +22 -0
  48. package/dist/service/SimpleReportService.d.ts +15 -0
  49. package/dist/service/SimpleReportService.js +22 -0
  50. package/dist/service/SpreadSheetReportService.d.ts +47 -0
  51. package/dist/service/SpreadSheetReportService.js +65 -0
  52. package/dist/service/SystemConfigService.d.ts +21 -0
  53. package/dist/service/SystemConfigService.js +28 -0
  54. package/dist/service/TimeConsuming.d.ts +10 -0
  55. package/dist/service/TimeConsuming.js +13 -0
  56. package/dist/service/TimeConsumingService.d.ts +8 -0
  57. package/dist/service/TimeConsumingService.js +13 -0
  58. package/dist/service/UserManagerService.d.ts +240 -0
  59. package/dist/service/UserManagerService.js +365 -0
  60. package/dist/types-DOYMZhxT.d.ts +409 -0
  61. package/dist/vite-plugin/vite-plugin-smartbi.d.ts +21 -0
  62. package/dist/vite-plugin/vite-plugin-smartbi.js +54 -0
  63. package/dist/vite-plugin/vite-plugin-smartbix.d.ts +17 -0
  64. package/dist/vite-plugin/vite-plugin-smartbix.js +101 -0
  65. package/package.json +59 -141
package/README.md CHANGED
@@ -51,7 +51,7 @@ noop()
51
51
  该工具为vite插件,可以一键生成ext扩展包,但需要有java和Apache Ant环境
52
52
 
53
53
  ```javascript
54
- import vitePluginSmartbi from 'smartbi-toolkit/VitePluginSmartbi'
54
+ import vitePluginSmartbi from 'smartbi-toolkit/vite-plugin/VitePluginSmartbi'
55
55
 
56
56
  export default defineConfig({
57
57
  plugins: [
@@ -69,7 +69,7 @@ export type VitePluginSmartbiOptions = {
69
69
  */
70
70
  name: string
71
71
  /**
72
- * 插件别名
72
+ * 插件名称
73
73
  */
74
74
  alias?: string
75
75
  /**
@@ -80,6 +80,10 @@ export type VitePluginSmartbiOptions = {
80
80
  * 优先级
81
81
  */
82
82
  priority?: number
83
+ /**
84
+ * 插件版本
85
+ */
86
+ version?: string
83
87
  /**
84
88
  * 输出目录
85
89
  */
@@ -92,19 +96,63 @@ export type VitePluginSmartbiOptions = {
92
96
  * vision到html中间的路径
93
97
  */
94
98
  appendPath?: string,
99
+ };
100
+ ```
101
+
102
+
103
+ ### ext新扩展包构建工具,通过vite实现 对应smartbix那套的扩展包
104
+ 环境同上,构建工具封装
105
+
106
+ ```javascript
107
+ import vitePluginSmartbi from 'smartbi-toolkit/vite-plugin/VitePluginSmartbix'
108
+
109
+ export default defineConfig({
110
+ plugins: [
111
+ VitePluginSmartbix({
112
+ name:'ext-test',
113
+ })
114
+ ],
115
+ })
116
+ ```
117
+ #### 参数说明
118
+ ```typescript
119
+ export type VitePluginSmartbiOptions = {
120
+ /**
121
+ * 插件名称
122
+ */
123
+ name: string
124
+ /**
125
+ * 插件名称
126
+ */
127
+ alias?: string
128
+ /**
129
+ * 插件描述
130
+ */
131
+ desc?: string
132
+ /**
133
+ * 优先级
134
+ */
135
+ priority?: number
95
136
  /**
96
137
  * 插件版本
97
138
  */
98
139
  version?: string
140
+ /**
141
+ * 扩展根目录
142
+ */
143
+ libRoot?: string
144
+ /**
145
+ * 输出路径
146
+ */
147
+ output?: string,
99
148
  };
100
149
  ```
101
150
 
151
+ ### 在smartbi-toolkit/service/xxxxService中,实现官方文档定义的接口
102
152
 
103
- ### 在smartbi-toolkit/xxxxService中,实现你官方文档定义的接口
104
-
105
- * 代码大部分由AI通过官方文档生成,基本和官方保持一致,部分ts类型等可能存在错误
106
- * 如遇到接口不可用,可以尝试使用smartbi()方法调用,如果依旧不可以,请查看官方文档,官方文档内也有相当大的一部分方法不可以
107
- * 大部分接口均由AI通过官方文档生成JsDoc
153
+ * 代码大部分由AI通过官方文档生成,基本和官方保持一致,部分ts类型等可能存在错误。
154
+ * 如遇到接口不可用,可以尝试使用smartbi()方法调用,如果依旧不可以,请查看官方文档。(注:官方文档内也有相当大的一部分方法不可以)
155
+ * 大部分接口均由AI通过官方文档生成jsdoc
108
156
  * 官方文档https://wiki.smartbi.com.cn/api/javaapi/index.html
109
157
 
110
158
 
@@ -112,11 +160,10 @@ export type VitePluginSmartbiOptions = {
112
160
 
113
161
  ### todo 开发中功能,后续实现
114
162
  1. 其他服务接口
115
- * Smartbi-SDK.jar中包含的,但官方文档没有的接口
116
- * 其他可通过rmi调用的接口
163
+ * Smartbi-SDK.jar中包含的,但官方文档没有的接口
117
164
  2. TS类型优化
118
- * TS类型没有完善,部分通过AI生成,后续需要从SDK中提取完整的类型信息
119
- 3. 封装参数
120
- * 目前参数封装为数组,后续需要封装为对象
165
+ * TS类型没有完善,部分通过AI生成,后续需要从SDK中提取完整的类型信息
166
+ 3. 封装参数(可能会做)
167
+ * 目前参数封装为数组,后续需要封装为对象
121
168
 
122
169
 
@@ -0,0 +1,25 @@
1
+ //#region src/common/common.d.ts
2
+ type WebProjectConfig = {
3
+ /**
4
+ * 插件名称
5
+ */
6
+ name: string;
7
+ /**
8
+ * 插件名称
9
+ */
10
+ alias?: string;
11
+ /**
12
+ * 插件描述
13
+ */
14
+ desc?: string;
15
+ /**
16
+ * 优先级
17
+ */
18
+ priority?: number;
19
+ /**
20
+ * 插件版本
21
+ */
22
+ version?: string;
23
+ };
24
+ //#endregion
25
+ export { WebProjectConfig as t };
@@ -0,0 +1,93 @@
1
+ import { ensureFile } from "fs-extra";
2
+ import { writeFile } from "fs/promises";
3
+ import { resolve } from "node:path";
4
+ import chalk from "chalk";
5
+
6
+ //#region src/common/common.ts
7
+ const buildWebProject = ({ name, alias, desc, priority, version }, rootPath) => {
8
+ return {
9
+ web: `<web-app/>`,
10
+ applicationContext: `<?xml version="1.0" encoding="UTF-8"?>
11
+ <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
12
+ <beans>
13
+ <bean id="framework" class="smartbi.framework.Framework" factory-method="getInstance">
14
+ <property name="modules">
15
+ <map>
16
+ </map>
17
+ </property>
18
+ </bean>
19
+ <bean id="rmi" class="smartbi.framework.rmi.RMIModule" factory-method="getInstance">
20
+ <property name="modules">
21
+ <map>
22
+ </map>
23
+ </property>
24
+ </bean>
25
+ </beans>
26
+ `,
27
+ extension: `<?xml version="1.0" encoding="UTF-8"?>
28
+ <!DOCTYPE extension SYSTEM "extension.dtd">
29
+ <extension name="${name}" alias="${alias || name}" desc="${desc || name}" :priority="${priority || 100}" version="${version || "1.0"}">
30
+ <enable-jsp-processor />
31
+ </extension>
32
+ `,
33
+ portlet: `<?xml version="1.0" encoding="UTF-8"?>
34
+ <portlet-app>
35
+ </portlet-app>
36
+ `,
37
+ build: `<?xml version="1.0" encoding="UTF-8"?>
38
+ <project name="${name}" default="dist">
39
+ <target name="dist" >
40
+ <tstamp>
41
+ <format property="today" pattern="yyyy-MM-dd HH:mm:ss"/>
42
+ </tstamp>
43
+ <echo file="${resolve(rootPath, "META-INF/version.txt")}" message="\${today}"/>
44
+
45
+ <jar destfile="${resolve(rootPath, `../${name}.ext`)}" duplicate="preserve">
46
+ <fileset dir="${rootPath}"/>
47
+ </jar>
48
+ </target>
49
+ </project>
50
+ `
51
+ };
52
+ };
53
+ const makeWebDir = (rootPath, config) => {
54
+ return new Promise((r) => {
55
+ const { web, applicationContext, extension, portlet, build } = buildWebProject(config, rootPath);
56
+ const paths = {
57
+ "WEB-INF/web.xml": web,
58
+ "META-INF/applicationContext.xml": applicationContext,
59
+ "META-INF/extension.xml": extension,
60
+ "META-INF/portlet.xml": portlet
61
+ };
62
+ const plist = Object.keys(paths).map((_path) => {
63
+ return new Promise((r) => {
64
+ const filePath = resolve(rootPath, _path);
65
+ ensureFile(filePath).then(() => {
66
+ return writeFile(filePath, paths[_path]);
67
+ }).then(() => {
68
+ r();
69
+ });
70
+ });
71
+ });
72
+ Promise.all(plist).then(() => {
73
+ writeFile(resolve(rootPath, "../build.xml"), build).then(() => {
74
+ r();
75
+ });
76
+ });
77
+ });
78
+ };
79
+
80
+ //#endregion
81
+ //#region src/common/console.ts
82
+ const info = (msg) => {
83
+ console.log(chalk.blue(msg));
84
+ };
85
+ const error = (msg) => {
86
+ console.log(chalk.red(msg));
87
+ };
88
+ const success = (msg) => {
89
+ console.log(chalk.green(msg));
90
+ };
91
+
92
+ //#endregion
93
+ export { makeWebDir as i, info as n, success as r, error as t };
@@ -0,0 +1,39 @@
1
+ import * as axios$1 from "axios";
2
+
3
+ //#region src/index.d.ts
4
+ type SmartbiDev = {
5
+ username: string;
6
+ password: string;
7
+ };
8
+ declare const setSmartbiEnv: ({
9
+ path,
10
+ dev,
11
+ noop,
12
+ mode
13
+ }: {
14
+ path?: "/smartbi" | "" | string;
15
+ dev?: SmartbiDev;
16
+ mode?: "dev" | "prod";
17
+ noop?: number;
18
+ }) => void;
19
+ /**
20
+ * pending:登录中
21
+ * online:已登录
22
+ * offline:未登录
23
+ */
24
+ type Status = 'pending' | 'online' | 'offline';
25
+ declare const setStatus: (value: Status) => void, startHeatBeat: () => void, stopHeatBeat: () => void;
26
+ declare const smartbi: <T>(className: string, methodName: string, params: Array<string | number | boolean | null | undefined>, requireLogin?: boolean) => Promise<T>;
27
+ /**
28
+ * 登录smartbi服务
29
+ */
30
+ declare const login: (form?: {
31
+ username: string;
32
+ password: string;
33
+ }) => Promise<unknown>;
34
+ /**
35
+ * 心跳
36
+ */
37
+ declare const noop: () => Promise<axios$1.AxiosResponse<any, any, {}>>;
38
+ //#endregion
39
+ export { SmartbiDev, login, noop, setSmartbiEnv, setStatus, smartbi, startHeatBeat, stopHeatBeat };
package/dist/index.js ADDED
@@ -0,0 +1,111 @@
1
+ import axios from "axios";
2
+
3
+ //#region src/index.ts
4
+ const __smartbi_env = {
5
+ username: "",
6
+ password: "",
7
+ smartbiPath: "/smartbi",
8
+ mode: "prod",
9
+ noop: 3e4
10
+ };
11
+ const HEADERS = {
12
+ "Content-Type": "application/x-www-form-urlencoded",
13
+ "X-Requested-With": "XMLHttpRequest"
14
+ };
15
+ const setSmartbiEnv = ({ path = "/smartbi", dev, noop = 3e4, mode = "prod" }) => {
16
+ __smartbi_env.username = dev?.username || "";
17
+ __smartbi_env.password = dev?.password || "";
18
+ __smartbi_env.smartbiPath = path;
19
+ __smartbi_env.mode = mode;
20
+ __smartbi_env.noop = noop;
21
+ if (dev) console.log("请勿将账号信息直接赋值到username和password中,避免暴露账号密码,如需要,可考虑从环境变量.env文件中获取");
22
+ };
23
+ const smartbiInit = () => {
24
+ const postList = /* @__PURE__ */ new Set();
25
+ let timer = 0;
26
+ let status = "offline";
27
+ return {
28
+ stopHeatBeat() {
29
+ try {
30
+ clearInterval(timer);
31
+ } catch (e) {
32
+ console.error(e);
33
+ }
34
+ },
35
+ startHeatBeat() {
36
+ this.stopHeatBeat();
37
+ timer = setInterval(() => {
38
+ if (status === "online") noop().then(() => {});
39
+ }, __smartbi_env.noop);
40
+ },
41
+ setStatus(value) {
42
+ status = value;
43
+ },
44
+ emit() {
45
+ postList.forEach((call) => {
46
+ call();
47
+ });
48
+ postList.clear();
49
+ },
50
+ on(call) {
51
+ postList.add(call);
52
+ },
53
+ handler(requireLogin) {
54
+ return new Promise((resolve) => {
55
+ if (requireLogin) {
56
+ if (status === "offline") {
57
+ status = "pending";
58
+ login().then(() => {
59
+ emit();
60
+ resolve();
61
+ });
62
+ } else if (status === "online") resolve();
63
+ else if (status === "pending") on(() => {
64
+ resolve();
65
+ });
66
+ } else resolve();
67
+ });
68
+ }
69
+ };
70
+ };
71
+ const { emit, on, handler, setStatus, startHeatBeat, stopHeatBeat } = smartbiInit();
72
+ const smartbi = (className, methodName, params, requireLogin = __smartbi_env.mode === "dev") => {
73
+ return new Promise((resolve, reject) => {
74
+ handler(requireLogin).then(() => {
75
+ return axios.post(`${__smartbi_env.smartbiPath}/vision/RMIServlet`, {
76
+ className,
77
+ methodName,
78
+ params: JSON.stringify(params)
79
+ }, { headers: HEADERS });
80
+ }).then((res) => {
81
+ if (res.data.retCode === 0) resolve(res.data.result);
82
+ else {
83
+ console.error("smartbi返回状态错误");
84
+ console.error(res.data.stackTrace);
85
+ reject(new Error(res.data.stackTrace));
86
+ }
87
+ }).catch((e) => {
88
+ reject(e);
89
+ });
90
+ });
91
+ };
92
+ /**
93
+ * 登录smartbi服务
94
+ */
95
+ const login = (form) => {
96
+ return new Promise((resolve) => {
97
+ smartbi("UserService", "login", [form?.username || __smartbi_env.username, form?.password || __smartbi_env.password], false).then((value) => {
98
+ setStatus("online");
99
+ resolve(value);
100
+ });
101
+ });
102
+ };
103
+ /**
104
+ * 心跳
105
+ */
106
+ const noop = () => {
107
+ return axios.get(__smartbi_env.smartbiPath + "/vision/noop.jsp", { headers: HEADERS });
108
+ };
109
+
110
+ //#endregion
111
+ export { login, noop, setSmartbiEnv, setStatus, smartbi, startHeatBeat, stopHeatBeat };
@@ -0,0 +1,97 @@
1
+ import { B as RunningInfo, C as IParameter, D as NameValuePair, j as Parameter, r as AllExportTypeMap, w as IResult } from "../types-DOYMZhxT.js";
2
+
3
+ //#region src/service/AnalysisReportService.d.ts
4
+ /**
5
+ * 打开多维报表
6
+ * @param reportId 报表ID
7
+ * @returns 返回报表客户端ID
8
+ */
9
+ declare const openAnalysisReport: (reportId: string) => Promise<string>;
10
+ /**
11
+ * 打开多维报表(不初始化)
12
+ * @param reportId 报表ID
13
+ * @returns 返回报表客户端ID
14
+ */
15
+ declare const openOlapReportWithoutInit: (reportId: string) => Promise<string>;
16
+ /**
17
+ * 关闭多维报表
18
+ * @param clientId 客户端ID
19
+ * @returns 无返回值
20
+ */
21
+ declare const closeAnalysisReport: (clientId: string) => Promise<void>;
22
+ /**
23
+ * 设置多维报表参数值
24
+ * @param clientId 客户端ID
25
+ * @param id 参数ID
26
+ * @param value 参数值
27
+ * @param displayValue 参数显示值
28
+ * @returns 无返回值
29
+ */
30
+ declare const setParamValue: (clientId: string, id: string, value: string, displayValue: string) => Promise<void>;
31
+ /**
32
+ * 执行多维查询
33
+ * @param clientId 客户端ID
34
+ * @returns 返回查询结果
35
+ */
36
+ declare const executeQuery: (clientId: string) => Promise<IResult>;
37
+ /**
38
+ * 导出报表
39
+ * @param clientId 客户端ID
40
+ * @param exportType 导出类型
41
+ * @param delimiter 分割符
42
+ * @param os 输出流
43
+ * @param resourceBasePath 资源路径前缀(可选)
44
+ * @param valueType 值类型(可选)
45
+ * @returns 无返回值
46
+ */
47
+ declare const doExport: (clientId: string, exportType: keyof AllExportTypeMap | string, delimiter: string, os: any, // 输出流
48
+ resourceBasePath?: string, valueType?: string) => Promise<void>;
49
+ /**
50
+ * 设置参数为默认值
51
+ * @param clientId 客户端ID
52
+ * @param paramId 参数ID
53
+ * @returns 无返回值
54
+ */
55
+ declare const setParameterValueAsDefault: (clientId: string, paramId: string) => Promise<void>;
56
+ /**
57
+ * 获取参数
58
+ * @param clientId 客户端ID
59
+ * @param paramId 参数ID
60
+ * @returns 返回参数信息
61
+ */
62
+ declare const getParameter: (clientId: string, paramId: string) => Promise<IParameter>;
63
+ /**
64
+ * 获取参数显示值
65
+ * @param clientId 客户端ID
66
+ * @param paramId 参数ID
67
+ * @returns 返回参数显示值
68
+ */
69
+ declare const getParameterDisplayValue: (clientId: string, paramId: string) => Promise<string>;
70
+ /**
71
+ * 获取参数默认值
72
+ * @param clientId 客户端ID
73
+ * @param paramId 参数ID
74
+ * @returns 返回参数默认值列表
75
+ */
76
+ declare const getParameterDefaultValue: (clientId: string, paramId: string) => Promise<string[]>;
77
+ /**
78
+ * 获取所有参数
79
+ * @param clientId 客户端ID
80
+ * @returns 返回参数列表
81
+ */
82
+ declare const getParameters: (clientId: string) => Promise<Parameter[]>;
83
+ /**
84
+ * 获取参数候选值列表
85
+ * @param clientId 客户端ID
86
+ * @param paramId 参数ID
87
+ * @returns 返回候选值列表
88
+ */
89
+ declare const getParamStandbyValue: (clientId: string, paramId: string) => Promise<NameValuePair[]>;
90
+ /**
91
+ * 获取执行状态
92
+ * @param clientId 客户端ID
93
+ * @returns 返回执行状态信息
94
+ */
95
+ declare const getExecutingState: (clientId: string) => Promise<RunningInfo>;
96
+ //#endregion
97
+ export { closeAnalysisReport, doExport, executeQuery, getExecutingState, getParamStandbyValue, getParameter, getParameterDefaultValue, getParameterDisplayValue, getParameters, openAnalysisReport, openOlapReportWithoutInit, setParamValue, setParameterValueAsDefault };
@@ -0,0 +1,138 @@
1
+ import { smartbi } from "../index.js";
2
+
3
+ //#region src/service/AnalysisReportService.ts
4
+ /**
5
+ * 打开多维报表
6
+ * @param reportId 报表ID
7
+ * @returns 返回报表客户端ID
8
+ */
9
+ const openAnalysisReport = (reportId) => {
10
+ return smartbi("AnalysisReportService", "openAnalysisReport", [reportId]);
11
+ };
12
+ /**
13
+ * 打开多维报表(不初始化)
14
+ * @param reportId 报表ID
15
+ * @returns 返回报表客户端ID
16
+ */
17
+ const openOlapReportWithoutInit = (reportId) => {
18
+ return smartbi("AnalysisReportService", "openOlapReportWithoutInit", [reportId]);
19
+ };
20
+ /**
21
+ * 关闭多维报表
22
+ * @param clientId 客户端ID
23
+ * @returns 无返回值
24
+ */
25
+ const closeAnalysisReport = (clientId) => {
26
+ return smartbi("AnalysisReportService", "closeAnalysisReport", [clientId]);
27
+ };
28
+ /**
29
+ * 设置多维报表参数值
30
+ * @param clientId 客户端ID
31
+ * @param id 参数ID
32
+ * @param value 参数值
33
+ * @param displayValue 参数显示值
34
+ * @returns 无返回值
35
+ */
36
+ const setParamValue = (clientId, id, value, displayValue) => {
37
+ return smartbi("AnalysisReportService", "setParamValue", [
38
+ clientId,
39
+ id,
40
+ value,
41
+ displayValue
42
+ ]);
43
+ };
44
+ /**
45
+ * 执行多维查询
46
+ * @param clientId 客户端ID
47
+ * @returns 返回查询结果
48
+ */
49
+ const executeQuery = (clientId) => {
50
+ return smartbi("AnalysisReportService", "executeQuery", [clientId]);
51
+ };
52
+ /**
53
+ * 导出报表
54
+ * @param clientId 客户端ID
55
+ * @param exportType 导出类型
56
+ * @param delimiter 分割符
57
+ * @param os 输出流
58
+ * @param resourceBasePath 资源路径前缀(可选)
59
+ * @param valueType 值类型(可选)
60
+ * @returns 无返回值
61
+ */
62
+ const doExport = (clientId, exportType, delimiter, os, resourceBasePath, valueType) => {
63
+ const params = [
64
+ clientId,
65
+ exportType,
66
+ delimiter,
67
+ os
68
+ ];
69
+ if (resourceBasePath !== void 0) {
70
+ params.push(resourceBasePath);
71
+ if (valueType !== void 0) params.push(valueType);
72
+ }
73
+ return smartbi("AnalysisReportService", "doExport", params);
74
+ };
75
+ /**
76
+ * 设置参数为默认值
77
+ * @param clientId 客户端ID
78
+ * @param paramId 参数ID
79
+ * @returns 无返回值
80
+ */
81
+ const setParameterValueAsDefault = (clientId, paramId) => {
82
+ return smartbi("AnalysisReportService", "setParameterValueAsDefault", [clientId, paramId]);
83
+ };
84
+ /**
85
+ * 获取参数
86
+ * @param clientId 客户端ID
87
+ * @param paramId 参数ID
88
+ * @returns 返回参数信息
89
+ */
90
+ const getParameter = (clientId, paramId) => {
91
+ return smartbi("AnalysisReportService", "getParameter", [clientId, paramId]);
92
+ };
93
+ /**
94
+ * 获取参数显示值
95
+ * @param clientId 客户端ID
96
+ * @param paramId 参数ID
97
+ * @returns 返回参数显示值
98
+ */
99
+ const getParameterDisplayValue = (clientId, paramId) => {
100
+ return smartbi("AnalysisReportService", "getParameterDisplayValue", [clientId, paramId]);
101
+ };
102
+ /**
103
+ * 获取参数默认值
104
+ * @param clientId 客户端ID
105
+ * @param paramId 参数ID
106
+ * @returns 返回参数默认值列表
107
+ */
108
+ const getParameterDefaultValue = (clientId, paramId) => {
109
+ return smartbi("AnalysisReportService", "getParameterDefaultValue", [clientId, paramId]);
110
+ };
111
+ /**
112
+ * 获取所有参数
113
+ * @param clientId 客户端ID
114
+ * @returns 返回参数列表
115
+ */
116
+ const getParameters = (clientId) => {
117
+ return smartbi("AnalysisReportService", "getParameters", [clientId]);
118
+ };
119
+ /**
120
+ * 获取参数候选值列表
121
+ * @param clientId 客户端ID
122
+ * @param paramId 参数ID
123
+ * @returns 返回候选值列表
124
+ */
125
+ const getParamStandbyValue = (clientId, paramId) => {
126
+ return smartbi("AnalysisReportService", "getParamStandbyValue", [clientId, paramId]);
127
+ };
128
+ /**
129
+ * 获取执行状态
130
+ * @param clientId 客户端ID
131
+ * @returns 返回执行状态信息
132
+ */
133
+ const getExecutingState = (clientId) => {
134
+ return smartbi("AnalysisReportService", "getExecutingState", [clientId]);
135
+ };
136
+
137
+ //#endregion
138
+ export { closeAnalysisReport, doExport, executeQuery, getExecutingState, getParamStandbyValue, getParameter, getParameterDefaultValue, getParameterDisplayValue, getParameters, openAnalysisReport, openOlapReportWithoutInit, setParamValue, setParameterValueAsDefault };
@@ -0,0 +1,11 @@
1
+ //#region src/service/BusinessThemeService.d.ts
2
+ /**
3
+ * 创建业务对象
4
+ * @param businessThemeId 业务主题ID
5
+ * @param parentId 业务对象父ID
6
+ * @param tableId 表ID
7
+ * @returns 无返回值
8
+ */
9
+ declare const createBusinessThemeObject: (businessThemeId: string, parentId: string, tableId: string) => Promise<void>;
10
+ //#endregion
11
+ export { createBusinessThemeObject };
@@ -0,0 +1,20 @@
1
+ import { smartbi } from "../index.js";
2
+
3
+ //#region src/service/BusinessThemeService.ts
4
+ /**
5
+ * 创建业务对象
6
+ * @param businessThemeId 业务主题ID
7
+ * @param parentId 业务对象父ID
8
+ * @param tableId 表ID
9
+ * @returns 无返回值
10
+ */
11
+ const createBusinessThemeObject = (businessThemeId, parentId, tableId) => {
12
+ return smartbi("BusinessThemeService", "createBusinessThemeObject", [
13
+ businessThemeId,
14
+ parentId,
15
+ tableId
16
+ ]);
17
+ };
18
+
19
+ //#endregion
20
+ export { createBusinessThemeObject };