smartbi-toolkit 1.1.0 → 1.1.2
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 +86 -10
- package/package.json +8 -2
- package/dist/index.d.ts +0 -22
- package/dist/index.js +0 -99
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -18
- package/dist/methods/AnalysisReportService.d.ts +0 -93
- package/dist/methods/AnalysisReportService.js +0 -126
- package/dist/methods/BusinessThemeService.d.ts +0 -8
- package/dist/methods/BusinessThemeService.js +0 -11
- package/dist/methods/BusinessViewService.d.ts +0 -94
- package/dist/methods/BusinessViewService.js +0 -120
- package/dist/methods/CatalogService.d.ts +0 -182
- package/dist/methods/CatalogService.js +0 -224
- package/dist/methods/ClientCombinedReportService.d.ts +0 -63
- package/dist/methods/ClientCombinedReportService.js +0 -82
- package/dist/methods/ClientInsightService.d.ts +0 -83
- package/dist/methods/ClientInsightService.js +0 -107
- package/dist/methods/ClientReportService.d.ts +0 -162
- package/dist/methods/ClientReportService.js +0 -206
- package/dist/methods/CombinedReportService.d.ts +0 -7
- package/dist/methods/CombinedReportService.js +0 -10
- package/dist/methods/DataSourceService.d.ts +0 -178
- package/dist/methods/DataSourceService.js +0 -220
- package/dist/methods/GraphicReportService.d.ts +0 -6
- package/dist/methods/GraphicReportService.js +0 -10
- package/dist/methods/InsightReport.d.ts +0 -71
- package/dist/methods/InsightReport.js +0 -98
- package/dist/methods/MetadataService.d.ts +0 -37
- package/dist/methods/MetadataService.js +0 -47
- package/dist/methods/OfficeReport.d.ts +0 -49
- package/dist/methods/OfficeReport.js +0 -65
- package/dist/methods/OfficeReportService.d.ts +0 -36
- package/dist/methods/OfficeReportService.js +0 -46
- package/dist/methods/OltpMetadataService.d.ts +0 -19
- package/dist/methods/OltpMetadataService.js +0 -25
- package/dist/methods/ParameterService.d.ts +0 -12
- package/dist/methods/ParameterService.js +0 -18
- package/dist/methods/PoolService.d.ts +0 -11
- package/dist/methods/PoolService.js +0 -17
- package/dist/methods/PortalService.d.ts +0 -66
- package/dist/methods/PortalService.js +0 -89
- package/dist/methods/Report.d.ts +0 -178
- package/dist/methods/Report.js +0 -230
- package/dist/methods/SSReport.d.ts +0 -86
- package/dist/methods/SSReport.js +0 -114
- package/dist/methods/ScheduleTaskService.d.ts +0 -12
- package/dist/methods/ScheduleTaskService.js +0 -18
- package/dist/methods/SimpleReportService.d.ts +0 -12
- package/dist/methods/SimpleReportService.js +0 -18
- package/dist/methods/SpreadSheetReportService.d.ts +0 -43
- package/dist/methods/SpreadSheetReportService.js +0 -55
- package/dist/methods/SystemConfigService.d.ts +0 -28
- package/dist/methods/SystemConfigService.js +0 -24
- package/dist/methods/TimeConsuming.d.ts +0 -6
- package/dist/methods/TimeConsuming.js +0 -9
- package/dist/methods/TimeConsumingService.d.ts +0 -5
- package/dist/methods/TimeConsumingService.js +0 -9
- package/dist/methods/UserManagerService.d.ts +0 -258
- package/dist/methods/UserManagerService.js +0 -332
- package/dist/types.d.ts +0 -442
- package/dist/types.js +0 -125
- package/dist/vite-plugin-smartbi/index.d.ts +0 -36
- package/dist/vite-plugin-smartbi/index.js +0 -107
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { smartbi } from "../index";
|
|
2
|
-
/**
|
|
3
|
-
* 根据数据集(可视化查询、原生SQL查询、SQL查询)的ID查询其SQL语句
|
|
4
|
-
* @param bizViewId (可视化查询、原生SQL查询、SQL查询)的ID
|
|
5
|
-
* @returns 返回其SQL语句
|
|
6
|
-
*/
|
|
7
|
-
export const getSqlString = (bizViewId) => {
|
|
8
|
-
return smartbi('BusinessViewService', 'getSqlString', [bizViewId]);
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* 打开业务查询以备读取结果集数据
|
|
12
|
-
* @param bizViewId 业务查询ID
|
|
13
|
-
* @param paramsJsonArrStr 报表的参数信息
|
|
14
|
-
* @param rowsPerPage 加载数据时每页返回的行数
|
|
15
|
-
* @param getTotalRows 是否获取总行数
|
|
16
|
-
* @returns 返回查询基本元数据信息
|
|
17
|
-
*/
|
|
18
|
-
export const openLoadDataView = (bizViewId, paramsJsonArrStr, rowsPerPage, getTotalRows) => {
|
|
19
|
-
return smartbi('BusinessViewService', 'openLoadDataView', [bizViewId, paramsJsonArrStr, rowsPerPage, getTotalRows]);
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* 按页读取结果集数据
|
|
23
|
-
* @param loadDataClientId 打开查询后的客户端标识
|
|
24
|
-
* @param pageNum 页码(第1页的页码为0,第2页的页码为1,如此类推)
|
|
25
|
-
* @returns 返回原始报表数据
|
|
26
|
-
*/
|
|
27
|
-
export const loadViewData = (loadDataClientId, pageNum) => {
|
|
28
|
-
return smartbi('BusinessViewService', 'loadViewData', [loadDataClientId, pageNum]);
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* 按页读取结果集数据
|
|
32
|
-
* @param loadDataClientId 打开查询后的客户端标识
|
|
33
|
-
* @param pageNum 页码(第1页的页码为0,第2页的页码为1,如此类推)
|
|
34
|
-
* @param dataFormatMap 数据格式映射,如:"DOUBLE", "<浮点型-默认值>",目前仅支持double
|
|
35
|
-
* @returns 返回原始报表数据
|
|
36
|
-
*/
|
|
37
|
-
export const loadViewDataWithDataformat = (loadDataClientId, pageNum, dataFormatMap) => {
|
|
38
|
-
return smartbi('BusinessViewService', 'loadViewDataWithDataformat', [loadDataClientId, pageNum, dataFormatMap.toString()]);
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* 关闭业务查询
|
|
42
|
-
* @param loadDataClientId 打开查询后的客户端标识
|
|
43
|
-
* @returns 无返回值
|
|
44
|
-
*/
|
|
45
|
-
export const closeLoadDataView = (loadDataClientId) => {
|
|
46
|
-
return smartbi('BusinessViewService', 'closeLoadDataView', [loadDataClientId]);
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* 打开业务查询
|
|
50
|
-
* @param bizViewId 打开业务查询ID
|
|
51
|
-
* @returns 返回业务查询结果
|
|
52
|
-
*/
|
|
53
|
-
export const openBusinessView = (bizViewId) => {
|
|
54
|
-
return smartbi('BusinessViewService', 'openBusinessView', [bizViewId]);
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* 关闭业务查询
|
|
58
|
-
* @param bizViewClientId 打开查询后的客户端标识
|
|
59
|
-
* @returns 无返回值
|
|
60
|
-
*/
|
|
61
|
-
export const closeBusinessView = (bizViewClientId) => {
|
|
62
|
-
return smartbi('BusinessViewService', 'closeBusinessView', [bizViewClientId]);
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* 检测输出字段
|
|
66
|
-
* @param bizViewClientId 打开查询后的客户端标识
|
|
67
|
-
* @returns 无返回值
|
|
68
|
-
*/
|
|
69
|
-
export const getRawSqlOutputField = (bizViewClientId) => {
|
|
70
|
-
return smartbi('BusinessViewService', 'getRawSqlOutputField', [bizViewClientId]);
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* 检测输出字段
|
|
74
|
-
* @param clientId 客户端ID
|
|
75
|
-
* @returns 返回输出字段
|
|
76
|
-
*/
|
|
77
|
-
export const detectOutputFields = (clientId) => {
|
|
78
|
-
return smartbi('BusinessViewService', 'detectOutputFields', [clientId]);
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* 覆盖业务视图
|
|
82
|
-
* @param bizViewClientId 业务视图ID
|
|
83
|
-
* @returns 无返回值
|
|
84
|
-
*/
|
|
85
|
-
export const overwriteBusinessView = (bizViewClientId) => {
|
|
86
|
-
return smartbi('BusinessViewService', 'overwriteBusinessView', [bizViewClientId]);
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* 创建"原生SQL查询"数据集,并保存到指定目录下
|
|
90
|
-
* @param datasourceId 数据源ID
|
|
91
|
-
* @param sql "原生SQL查询"的SQL语句
|
|
92
|
-
* @param name 数据集的名称
|
|
93
|
-
* @param alias 数据集的别名
|
|
94
|
-
* @param desc 数据集的描述
|
|
95
|
-
* @param folderId 用来保存数据集的指定目录ID
|
|
96
|
-
* @returns 返回所创建的"原生SQL查询"数据集ID
|
|
97
|
-
*/
|
|
98
|
-
export const createRawSqlQueryBusinessViewAndSave = (datasourceId, sql, name, alias, desc, folderId) => {
|
|
99
|
-
return smartbi('BusinessViewService', 'createRawSqlQueryBusinessViewAndSave', [datasourceId, sql, name, alias, desc, folderId]);
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* 更新指定的"原生SQL查询"数据集的SQL语句,并自动检测输出字段
|
|
103
|
-
* @param businessViewId "原生SQL查询"数据集ID
|
|
104
|
-
* @param sql 新的SQL语句
|
|
105
|
-
* @returns 返回数据集ID
|
|
106
|
-
*/
|
|
107
|
-
export const updateRawSqlQueryBusinessView = (businessViewId, sql) => {
|
|
108
|
-
return smartbi('BusinessViewService', 'updateRawSqlQueryBusinessView', [businessViewId, sql]);
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* 设置输出字段信息
|
|
112
|
-
* @param businessViewClientId clientId
|
|
113
|
-
* @param fieldId 字段信息
|
|
114
|
-
* @param propertyName 属性名,如alias,desc,dataType,dataFormat,orderby,transformRule
|
|
115
|
-
* @param propertyValue 属性值
|
|
116
|
-
* @returns 无返回值
|
|
117
|
-
*/
|
|
118
|
-
export const setOutputFieldInfo = (businessViewClientId, fieldId, propertyName, propertyValue) => {
|
|
119
|
-
return smartbi('BusinessViewService', 'setOutputFieldInfo', [businessViewClientId, fieldId, propertyName, propertyValue]);
|
|
120
|
-
};
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import type { AccessType, CatalogElementType, HiddenInBrowse, ICatalogElement, ICatalogSearchResult, IResourcePermission, IResourcePermissionItem, PermissionDescendType, PermissionType } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* 判断某个资源是否可访问。
|
|
4
|
-
* 参数:
|
|
5
|
-
* elementId - 资源ID
|
|
6
|
-
* type - 访问类型:
|
|
7
|
-
* 1.引用权限:REF
|
|
8
|
-
* 2.查看权限:READ
|
|
9
|
-
* 3.编辑权限:WRITE
|
|
10
|
-
* @param elementId 资源ID
|
|
11
|
-
* @param type 访问类型
|
|
12
|
-
* @returns 返回是否有权限的布尔值
|
|
13
|
-
*/
|
|
14
|
-
export declare const isCatalogElementAccessible: (elementId: string, type: AccessType) => Promise<boolean>;
|
|
15
|
-
/**
|
|
16
|
-
* 获取资源树的顶层节点列表
|
|
17
|
-
* @returns 返回顶层节点列表,节点类型为ICatalogElement
|
|
18
|
-
*/
|
|
19
|
-
export declare const getRootElements: () => Promise<ICatalogElement[]>;
|
|
20
|
-
/**
|
|
21
|
-
* 获得指定节点的子节点列表
|
|
22
|
-
* @param nodeId 指定节点ID
|
|
23
|
-
* @returns 返回子节点列表,节点类型为ICatalogElement
|
|
24
|
-
*/
|
|
25
|
-
export declare const getChildElements: (nodeId: string) => Promise<ICatalogElement[]>;
|
|
26
|
-
/**
|
|
27
|
-
* 创建目录
|
|
28
|
-
* @param parentNodeId 父目录ID
|
|
29
|
-
* @param name 目录名称
|
|
30
|
-
* @param alias 目录别名
|
|
31
|
-
* @param desc 目录描述
|
|
32
|
-
* @param type 目录类型,此项可为空,系统会自动根据父目录的类型进行设置
|
|
33
|
-
* @param hiddenInBrowse 是否在浏览模块中隐藏此目录
|
|
34
|
-
* @returns 返回创建的目录对象,类型为ICatalogElement
|
|
35
|
-
*/
|
|
36
|
-
export declare const createFolder: (parentNodeId: string, name: string, alias: string, desc: string, type: CatalogElementType | string, hiddenInBrowse: HiddenInBrowse) => Promise<ICatalogElement>;
|
|
37
|
-
/**
|
|
38
|
-
* 通过ID创建目录
|
|
39
|
-
* @param parentNodeId 父目录ID
|
|
40
|
-
* @param id 目录ID
|
|
41
|
-
* @param name 目录名称
|
|
42
|
-
* @param alias 目录别名
|
|
43
|
-
* @param desc 目录描述
|
|
44
|
-
* @param type 目录类型,此项可为空,系统会自动根据父目录的类型进行设置
|
|
45
|
-
* @param hiddenInBrowse 是否在浏览模块中隐藏此目录
|
|
46
|
-
* @returns 返回创建的目录对象,类型为ICatalogElement
|
|
47
|
-
*/
|
|
48
|
-
export declare const createFolderById: (parentNodeId: string, id: string, name: string, alias: string, desc: string, type: CatalogElementType | string, hiddenInBrowse: HiddenInBrowse) => Promise<ICatalogElement>;
|
|
49
|
-
/**
|
|
50
|
-
* 通过ID访问资源
|
|
51
|
-
* @param elementId 资源ID
|
|
52
|
-
* @returns 返回资源对象,类型为ICatalogElement
|
|
53
|
-
*/
|
|
54
|
-
export declare const getCatalogElementById: (elementId: string) => Promise<ICatalogElement>;
|
|
55
|
-
/**
|
|
56
|
-
* 通过类型获取结点
|
|
57
|
-
* @param type 节点类型
|
|
58
|
-
* @returns 返回指定类型的节点列表,节点类型为ICatalogElement
|
|
59
|
-
*/
|
|
60
|
-
export declare const getCatalogElementByType: (type: CatalogElementType | string) => Promise<ICatalogElement[]>;
|
|
61
|
-
/**
|
|
62
|
-
* 获取目录下指定类型的子元素
|
|
63
|
-
* @param parentNodeId 父节点ID
|
|
64
|
-
* @param types 要获取的子元素类型数组
|
|
65
|
-
* @returns 返回指定类型的子元素列表,节点类型为ICatalogElement
|
|
66
|
-
*/
|
|
67
|
-
export declare const getChildElementsByTypes: (parentNodeId: string, types: (CatalogElementType | string)[]) => Promise<ICatalogElement[]>;
|
|
68
|
-
/**
|
|
69
|
-
* 获取资源直接被授予的权限信息
|
|
70
|
-
* @param resId 资源ID
|
|
71
|
-
* @returns 返回资源直接被授予的权限信息,类型为IResourcePermission
|
|
72
|
-
*/
|
|
73
|
-
export declare const getAssignedPermissions: (resId: string) => Promise<IResourcePermission>;
|
|
74
|
-
/**
|
|
75
|
-
* 获取资源继承的权限信息
|
|
76
|
-
* @param resId 资源ID
|
|
77
|
-
* @returns 返回资源继承的权限信息列表,类型为IResourcePermissionItem[]
|
|
78
|
-
*/
|
|
79
|
-
export declare const getInheritedPermissions: (resId: string) => Promise<IResourcePermissionItem[]>;
|
|
80
|
-
/**
|
|
81
|
-
* 通过ID删除资源
|
|
82
|
-
* @param id 资源ID
|
|
83
|
-
* @returns 无返回值
|
|
84
|
-
*/
|
|
85
|
-
export declare const deleteCatalogElement: (id: string) => Promise<void>;
|
|
86
|
-
/**
|
|
87
|
-
* 根据别名或名称模糊查询资源信息
|
|
88
|
-
* @param alias 别名或名称关键字
|
|
89
|
-
* @param purview 权限范围
|
|
90
|
-
* @returns 返回搜索结果列表,类型为ICatalogSearchResult[]
|
|
91
|
-
*/
|
|
92
|
-
export declare const searchCatalogElementLikeAlias: (alias: string, purview: string) => Promise<ICatalogSearchResult[]>;
|
|
93
|
-
/**
|
|
94
|
-
* 设置该资源的组权限
|
|
95
|
-
* @param elementId 资源ID
|
|
96
|
-
* @param groupId 组ID
|
|
97
|
-
* @param type 权限类型
|
|
98
|
-
* @param inherited 是否继承
|
|
99
|
-
* @param permissionDescendType 权限下降类型
|
|
100
|
-
* @param isGroupDescend 是否组下降
|
|
101
|
-
* @returns 无返回值
|
|
102
|
-
*/
|
|
103
|
-
export declare const setAssignedPermissionByGroup: (elementId: string, groupId: string, type: PermissionType, inherited: boolean, permissionDescendType: PermissionDescendType, isGroupDescend: boolean) => Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* 设置该资源的角色权限
|
|
106
|
-
* @param elementId 资源ID
|
|
107
|
-
* @param roleId 角色ID
|
|
108
|
-
* @param type 权限类型
|
|
109
|
-
* @param inherited 是否继承
|
|
110
|
-
* @param permissionDescendType 权限下降类型
|
|
111
|
-
* @returns 无返回值
|
|
112
|
-
*/
|
|
113
|
-
export declare const setAssignedPermissionByRole: (elementId: string, roleId: string, type: PermissionType, inherited: boolean, permissionDescendType: PermissionDescendType) => Promise<void>;
|
|
114
|
-
/**
|
|
115
|
-
* 设置该资源的用户权限
|
|
116
|
-
* @param elementId 资源ID
|
|
117
|
-
* @param userId 用户ID
|
|
118
|
-
* @param type 权限类型
|
|
119
|
-
* @param inherited 是否继承
|
|
120
|
-
* @param permissionDescendType 权限下降类型
|
|
121
|
-
* @returns 无返回值
|
|
122
|
-
*/
|
|
123
|
-
export declare const setAssignedPermissionByUser: (elementId: string, userId: string, type: PermissionType, inherited: boolean, permissionDescendType: PermissionDescendType) => Promise<void>;
|
|
124
|
-
/**
|
|
125
|
-
* 更换资源节点的图片
|
|
126
|
-
* @param id 资源ID
|
|
127
|
-
* @param image 图片路径或图片数据
|
|
128
|
-
* @returns 无返回值
|
|
129
|
-
*/
|
|
130
|
-
export declare const updateCatalogElementImage: (id: string, image: string) => Promise<void>;
|
|
131
|
-
/**
|
|
132
|
-
* 根据ID修改资源信息
|
|
133
|
-
* @param id 资源ID
|
|
134
|
-
* @param jsonNodeConfig JSON节点配置
|
|
135
|
-
* @param wholeExtended 完整扩展信息
|
|
136
|
-
* @returns 无返回值
|
|
137
|
-
*/
|
|
138
|
-
export declare const updateCatalogNode: (id: string, jsonNodeConfig: string, wholeExtended: string) => Promise<void>;
|
|
139
|
-
/**
|
|
140
|
-
* 创建WEB链接
|
|
141
|
-
* @param parentFolderId 父文件夹ID
|
|
142
|
-
* @param urlName URL名称
|
|
143
|
-
* @param urlAlias URL别名
|
|
144
|
-
* @param urlDesc URL描述
|
|
145
|
-
* @param url URL地址
|
|
146
|
-
* @param setting 设置参数
|
|
147
|
-
* @returns 返回新创建的URL链接ID
|
|
148
|
-
*/
|
|
149
|
-
export declare const createURLLink: (parentFolderId: string, urlName: string, urlAlias: string, urlDesc: string, url: string, setting: string) => Promise<string>;
|
|
150
|
-
/**
|
|
151
|
-
* 更新WEB链接
|
|
152
|
-
* @param urlID URL ID
|
|
153
|
-
* @param urlAlias URL别名
|
|
154
|
-
* @param urlDesc URL描述
|
|
155
|
-
* @param url URL地址
|
|
156
|
-
* @param setting 设置参数
|
|
157
|
-
* @returns 无返回值
|
|
158
|
-
*/
|
|
159
|
-
export declare const updateURLLink: (urlID: string, urlAlias: string, urlDesc: string, url: string, setting: string) => Promise<void>;
|
|
160
|
-
/**
|
|
161
|
-
* 复制粘贴并返回新ID
|
|
162
|
-
* @param toId 目标ID
|
|
163
|
-
* @param srcId 源ID
|
|
164
|
-
* @param name 名称
|
|
165
|
-
* @param alias 别名
|
|
166
|
-
* @param desc 描述
|
|
167
|
-
* @returns 返回新创建元素的ID
|
|
168
|
-
*/
|
|
169
|
-
export declare const copyAndPasteReturnNewId: (toId: string, srcId: string, name: string, alias: string, desc: string) => Promise<string>;
|
|
170
|
-
/**
|
|
171
|
-
* 创建资源树结点
|
|
172
|
-
* 注意:此方法是单纯新建一个树结点,调用此方法前,必须存在此结点类型的实体资源.
|
|
173
|
-
* @param parentId 父ID
|
|
174
|
-
* @param id ID
|
|
175
|
-
* @param name 名称
|
|
176
|
-
* @param alias 别名
|
|
177
|
-
* @param desc 描述
|
|
178
|
-
* @param order 顺序
|
|
179
|
-
* @param type 类型
|
|
180
|
-
* @returns 返回创建的资源节点,类型为ICatalogElement
|
|
181
|
-
*/
|
|
182
|
-
export declare const createCatalogElement: (parentId: string, id: string, name: string, alias: string, desc: string, order: number, type: CatalogElementType | string) => Promise<ICatalogElement>;
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import { smartbi } from "../index";
|
|
2
|
-
/**
|
|
3
|
-
* 判断某个资源是否可访问。
|
|
4
|
-
* 参数:
|
|
5
|
-
* elementId - 资源ID
|
|
6
|
-
* type - 访问类型:
|
|
7
|
-
* 1.引用权限:REF
|
|
8
|
-
* 2.查看权限:READ
|
|
9
|
-
* 3.编辑权限:WRITE
|
|
10
|
-
* @param elementId 资源ID
|
|
11
|
-
* @param type 访问类型
|
|
12
|
-
* @returns 返回是否有权限的布尔值
|
|
13
|
-
*/
|
|
14
|
-
export const isCatalogElementAccessible = (elementId, type) => {
|
|
15
|
-
return smartbi('CatalogService', 'isCatalogElementAccessible', [elementId, type]);
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* 获取资源树的顶层节点列表
|
|
19
|
-
* @returns 返回顶层节点列表,节点类型为ICatalogElement
|
|
20
|
-
*/
|
|
21
|
-
export const getRootElements = () => {
|
|
22
|
-
return smartbi('CatalogService', 'getRootElements', []);
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* 获得指定节点的子节点列表
|
|
26
|
-
* @param nodeId 指定节点ID
|
|
27
|
-
* @returns 返回子节点列表,节点类型为ICatalogElement
|
|
28
|
-
*/
|
|
29
|
-
export const getChildElements = (nodeId) => {
|
|
30
|
-
return smartbi('CatalogService', 'getChildElements', [nodeId]);
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* 创建目录
|
|
34
|
-
* @param parentNodeId 父目录ID
|
|
35
|
-
* @param name 目录名称
|
|
36
|
-
* @param alias 目录别名
|
|
37
|
-
* @param desc 目录描述
|
|
38
|
-
* @param type 目录类型,此项可为空,系统会自动根据父目录的类型进行设置
|
|
39
|
-
* @param hiddenInBrowse 是否在浏览模块中隐藏此目录
|
|
40
|
-
* @returns 返回创建的目录对象,类型为ICatalogElement
|
|
41
|
-
*/
|
|
42
|
-
export const createFolder = (parentNodeId, name, alias, desc, type, hiddenInBrowse) => {
|
|
43
|
-
return smartbi('CatalogService', 'createFolder', [parentNodeId, name, alias, desc, type, hiddenInBrowse]);
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* 通过ID创建目录
|
|
47
|
-
* @param parentNodeId 父目录ID
|
|
48
|
-
* @param id 目录ID
|
|
49
|
-
* @param name 目录名称
|
|
50
|
-
* @param alias 目录别名
|
|
51
|
-
* @param desc 目录描述
|
|
52
|
-
* @param type 目录类型,此项可为空,系统会自动根据父目录的类型进行设置
|
|
53
|
-
* @param hiddenInBrowse 是否在浏览模块中隐藏此目录
|
|
54
|
-
* @returns 返回创建的目录对象,类型为ICatalogElement
|
|
55
|
-
*/
|
|
56
|
-
export const createFolderById = (parentNodeId, id, name, alias, desc, type, hiddenInBrowse) => {
|
|
57
|
-
return smartbi('CatalogService', 'createFolderById', [parentNodeId, id, name, alias, desc, type, hiddenInBrowse]);
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* 通过ID访问资源
|
|
61
|
-
* @param elementId 资源ID
|
|
62
|
-
* @returns 返回资源对象,类型为ICatalogElement
|
|
63
|
-
*/
|
|
64
|
-
export const getCatalogElementById = (elementId) => {
|
|
65
|
-
return smartbi('CatalogService', 'getCatalogElementById', [elementId]);
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* 通过类型获取结点
|
|
69
|
-
* @param type 节点类型
|
|
70
|
-
* @returns 返回指定类型的节点列表,节点类型为ICatalogElement
|
|
71
|
-
*/
|
|
72
|
-
export const getCatalogElementByType = (type) => {
|
|
73
|
-
return smartbi('CatalogService', 'getCatalogElementByType', [type]);
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* 获取目录下指定类型的子元素
|
|
77
|
-
* @param parentNodeId 父节点ID
|
|
78
|
-
* @param types 要获取的子元素类型数组
|
|
79
|
-
* @returns 返回指定类型的子元素列表,节点类型为ICatalogElement
|
|
80
|
-
*/
|
|
81
|
-
export const getChildElementsByTypes = (parentNodeId, types) => {
|
|
82
|
-
return smartbi('CatalogService', 'getChildElementsByTypes', [parentNodeId, types.toString()]);
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* 获取资源直接被授予的权限信息
|
|
86
|
-
* @param resId 资源ID
|
|
87
|
-
* @returns 返回资源直接被授予的权限信息,类型为IResourcePermission
|
|
88
|
-
*/
|
|
89
|
-
export const getAssignedPermissions = (resId) => {
|
|
90
|
-
return smartbi('CatalogService', 'getAssignedPermissions', [resId]);
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* 获取资源继承的权限信息
|
|
94
|
-
* @param resId 资源ID
|
|
95
|
-
* @returns 返回资源继承的权限信息列表,类型为IResourcePermissionItem[]
|
|
96
|
-
*/
|
|
97
|
-
export const getInheritedPermissions = (resId) => {
|
|
98
|
-
return smartbi('CatalogService', 'getInheritedPermissions', [resId]);
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* 通过ID删除资源
|
|
102
|
-
* @param id 资源ID
|
|
103
|
-
* @returns 无返回值
|
|
104
|
-
*/
|
|
105
|
-
export const deleteCatalogElement = (id) => {
|
|
106
|
-
return smartbi('CatalogService', 'deleteCatalogElement', [id]);
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* 根据别名或名称模糊查询资源信息
|
|
110
|
-
* @param alias 别名或名称关键字
|
|
111
|
-
* @param purview 权限范围
|
|
112
|
-
* @returns 返回搜索结果列表,类型为ICatalogSearchResult[]
|
|
113
|
-
*/
|
|
114
|
-
export const searchCatalogElementLikeAlias = (alias, purview) => {
|
|
115
|
-
return smartbi('CatalogService', 'searchCatalogElementLikeAlias', [alias, purview]);
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* 设置该资源的组权限
|
|
119
|
-
* @param elementId 资源ID
|
|
120
|
-
* @param groupId 组ID
|
|
121
|
-
* @param type 权限类型
|
|
122
|
-
* @param inherited 是否继承
|
|
123
|
-
* @param permissionDescendType 权限下降类型
|
|
124
|
-
* @param isGroupDescend 是否组下降
|
|
125
|
-
* @returns 无返回值
|
|
126
|
-
*/
|
|
127
|
-
export const setAssignedPermissionByGroup = (elementId, groupId, type, inherited, permissionDescendType, isGroupDescend) => {
|
|
128
|
-
return smartbi('CatalogService', 'setAssignedPermissionByGroup', [elementId, groupId, type, inherited, permissionDescendType, isGroupDescend]);
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* 设置该资源的角色权限
|
|
132
|
-
* @param elementId 资源ID
|
|
133
|
-
* @param roleId 角色ID
|
|
134
|
-
* @param type 权限类型
|
|
135
|
-
* @param inherited 是否继承
|
|
136
|
-
* @param permissionDescendType 权限下降类型
|
|
137
|
-
* @returns 无返回值
|
|
138
|
-
*/
|
|
139
|
-
export const setAssignedPermissionByRole = (elementId, roleId, type, inherited, permissionDescendType) => {
|
|
140
|
-
return smartbi('CatalogService', 'setAssignedPermissionByRole', [elementId, roleId, type, inherited, permissionDescendType]);
|
|
141
|
-
};
|
|
142
|
-
/**
|
|
143
|
-
* 设置该资源的用户权限
|
|
144
|
-
* @param elementId 资源ID
|
|
145
|
-
* @param userId 用户ID
|
|
146
|
-
* @param type 权限类型
|
|
147
|
-
* @param inherited 是否继承
|
|
148
|
-
* @param permissionDescendType 权限下降类型
|
|
149
|
-
* @returns 无返回值
|
|
150
|
-
*/
|
|
151
|
-
export const setAssignedPermissionByUser = (elementId, userId, type, inherited, permissionDescendType) => {
|
|
152
|
-
return smartbi('CatalogService', 'setAssignedPermissionByUser', [elementId, userId, type, inherited, permissionDescendType]);
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* 更换资源节点的图片
|
|
156
|
-
* @param id 资源ID
|
|
157
|
-
* @param image 图片路径或图片数据
|
|
158
|
-
* @returns 无返回值
|
|
159
|
-
*/
|
|
160
|
-
export const updateCatalogElementImage = (id, image) => {
|
|
161
|
-
return smartbi('CatalogService', 'updateCatalogElementImage', [id, image]);
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* 根据ID修改资源信息
|
|
165
|
-
* @param id 资源ID
|
|
166
|
-
* @param jsonNodeConfig JSON节点配置
|
|
167
|
-
* @param wholeExtended 完整扩展信息
|
|
168
|
-
* @returns 无返回值
|
|
169
|
-
*/
|
|
170
|
-
export const updateCatalogNode = (id, jsonNodeConfig, wholeExtended) => {
|
|
171
|
-
return smartbi('CatalogService', 'updateCatalogNode', [id, jsonNodeConfig, wholeExtended]);
|
|
172
|
-
};
|
|
173
|
-
/**
|
|
174
|
-
* 创建WEB链接
|
|
175
|
-
* @param parentFolderId 父文件夹ID
|
|
176
|
-
* @param urlName URL名称
|
|
177
|
-
* @param urlAlias URL别名
|
|
178
|
-
* @param urlDesc URL描述
|
|
179
|
-
* @param url URL地址
|
|
180
|
-
* @param setting 设置参数
|
|
181
|
-
* @returns 返回新创建的URL链接ID
|
|
182
|
-
*/
|
|
183
|
-
export const createURLLink = (parentFolderId, urlName, urlAlias, urlDesc, url, setting) => {
|
|
184
|
-
return smartbi('CatalogService', 'createURLLink', [parentFolderId, urlName, urlAlias, urlDesc, url, setting]);
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* 更新WEB链接
|
|
188
|
-
* @param urlID URL ID
|
|
189
|
-
* @param urlAlias URL别名
|
|
190
|
-
* @param urlDesc URL描述
|
|
191
|
-
* @param url URL地址
|
|
192
|
-
* @param setting 设置参数
|
|
193
|
-
* @returns 无返回值
|
|
194
|
-
*/
|
|
195
|
-
export const updateURLLink = (urlID, urlAlias, urlDesc, url, setting) => {
|
|
196
|
-
return smartbi('CatalogService', 'updateURLLink', [urlID, urlAlias, urlDesc, url, setting]);
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* 复制粘贴并返回新ID
|
|
200
|
-
* @param toId 目标ID
|
|
201
|
-
* @param srcId 源ID
|
|
202
|
-
* @param name 名称
|
|
203
|
-
* @param alias 别名
|
|
204
|
-
* @param desc 描述
|
|
205
|
-
* @returns 返回新创建元素的ID
|
|
206
|
-
*/
|
|
207
|
-
export const copyAndPasteReturnNewId = (toId, srcId, name, alias, desc) => {
|
|
208
|
-
return smartbi('CatalogService', 'copyAndPasteReturnNewId', [toId, srcId, name, alias, desc]);
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* 创建资源树结点
|
|
212
|
-
* 注意:此方法是单纯新建一个树结点,调用此方法前,必须存在此结点类型的实体资源.
|
|
213
|
-
* @param parentId 父ID
|
|
214
|
-
* @param id ID
|
|
215
|
-
* @param name 名称
|
|
216
|
-
* @param alias 别名
|
|
217
|
-
* @param desc 描述
|
|
218
|
-
* @param order 顺序
|
|
219
|
-
* @param type 类型
|
|
220
|
-
* @returns 返回创建的资源节点,类型为ICatalogElement
|
|
221
|
-
*/
|
|
222
|
-
export const createCatalogElement = (parentId, id, name, alias, desc, order, type) => {
|
|
223
|
-
return smartbi('CatalogService', 'createCatalogElement', [parentId, id, name, alias, desc, order, type]);
|
|
224
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { IClientCombinedReportView } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* 打开一个即席查询报表
|
|
4
|
-
* @param queryId 报表ID
|
|
5
|
-
* @returns 返回打开的报表视图,类型为IClientCombinedReportView
|
|
6
|
-
*/
|
|
7
|
-
export declare const openQuery: (queryId: string) => Promise<IClientCombinedReportView>;
|
|
8
|
-
/**
|
|
9
|
-
* 打开一个即席查询报表(不初始化)
|
|
10
|
-
* @param queryId 报表ID
|
|
11
|
-
* @returns 返回打开的报表视图,类型为IClientCombinedReportView
|
|
12
|
-
*/
|
|
13
|
-
export declare const openQueryWithoutInit: (queryId: string) => Promise<IClientCombinedReportView>;
|
|
14
|
-
/**
|
|
15
|
-
* 同步条件面板参数
|
|
16
|
-
* @param combinedClientId combinedClientId
|
|
17
|
-
* @param condPanelClientId condPanelClientId
|
|
18
|
-
* @returns 无返回值
|
|
19
|
-
*/
|
|
20
|
-
export declare const updateConditionPanel: (combinedClientId: string, condPanelClientId: string) => Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* 将报表信息从服务端的会话状态中清除
|
|
23
|
-
* @param combinedClientId 客户ID
|
|
24
|
-
* @returns 无返回值
|
|
25
|
-
*/
|
|
26
|
-
export declare const removeFromSession: (combinedClientId: string) => Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* 克隆查询
|
|
29
|
-
* @param clientId 客户端ID
|
|
30
|
-
* @param parentNodeId 父节点ID
|
|
31
|
-
* @param name 名称
|
|
32
|
-
* @param alias 别名
|
|
33
|
-
* @param desc 描述
|
|
34
|
-
* @returns 返回新客户端ID
|
|
35
|
-
*/
|
|
36
|
-
export declare const cloneQuery: (clientId: string, parentNodeId: string, name: string, alias: string, desc: string) => Promise<string>;
|
|
37
|
-
/**
|
|
38
|
-
* 导出报表
|
|
39
|
-
* @param clientId 客户端ID
|
|
40
|
-
* @param reportId 报表ID
|
|
41
|
-
* @returns 无返回值
|
|
42
|
-
*/
|
|
43
|
-
export declare const dump: (clientId: string, reportId: string) => Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* 覆盖查询
|
|
46
|
-
* @param clientId 客户端ID
|
|
47
|
-
* @param replacedReportId 报表ID
|
|
48
|
-
* @param desc 描述
|
|
49
|
-
* @returns 返回true/false
|
|
50
|
-
*/
|
|
51
|
-
export declare const overwriteQuery: (clientId: string, replacedReportId: string, desc: string) => Promise<boolean>;
|
|
52
|
-
/**
|
|
53
|
-
* 获取即席查询的数据来源类型
|
|
54
|
-
* @param queryId 即席查询id
|
|
55
|
-
* @returns 返回数据来源类型
|
|
56
|
-
*/
|
|
57
|
-
export declare const getDataSourceType: (queryId: string) => Promise<string>;
|
|
58
|
-
/**
|
|
59
|
-
* 获取即席查询的类型
|
|
60
|
-
* @param reportId 即席查询id
|
|
61
|
-
* @returns 返回类型
|
|
62
|
-
*/
|
|
63
|
-
export declare const getExtendedType: (reportId: string) => Promise<string>;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
// ClientCombinedReportService 服务方法
|
|
2
|
-
import { smartbi } from "../index";
|
|
3
|
-
/**
|
|
4
|
-
* 打开一个即席查询报表
|
|
5
|
-
* @param queryId 报表ID
|
|
6
|
-
* @returns 返回打开的报表视图,类型为IClientCombinedReportView
|
|
7
|
-
*/
|
|
8
|
-
export const openQuery = (queryId) => {
|
|
9
|
-
return smartbi('ClientCombinedReportService', 'openQuery', [queryId]);
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* 打开一个即席查询报表(不初始化)
|
|
13
|
-
* @param queryId 报表ID
|
|
14
|
-
* @returns 返回打开的报表视图,类型为IClientCombinedReportView
|
|
15
|
-
*/
|
|
16
|
-
export const openQueryWithoutInit = (queryId) => {
|
|
17
|
-
return smartbi('ClientCombinedReportService', 'openQueryWithoutInit', [queryId]);
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* 同步条件面板参数
|
|
21
|
-
* @param combinedClientId combinedClientId
|
|
22
|
-
* @param condPanelClientId condPanelClientId
|
|
23
|
-
* @returns 无返回值
|
|
24
|
-
*/
|
|
25
|
-
export const updateConditionPanel = (combinedClientId, condPanelClientId) => {
|
|
26
|
-
return smartbi('ClientCombinedReportService', 'updateConditionPanel', [combinedClientId, condPanelClientId]);
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* 将报表信息从服务端的会话状态中清除
|
|
30
|
-
* @param combinedClientId 客户ID
|
|
31
|
-
* @returns 无返回值
|
|
32
|
-
*/
|
|
33
|
-
export const removeFromSession = (combinedClientId) => {
|
|
34
|
-
return smartbi('ClientCombinedReportService', 'removeFromSession', [combinedClientId]);
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* 克隆查询
|
|
38
|
-
* @param clientId 客户端ID
|
|
39
|
-
* @param parentNodeId 父节点ID
|
|
40
|
-
* @param name 名称
|
|
41
|
-
* @param alias 别名
|
|
42
|
-
* @param desc 描述
|
|
43
|
-
* @returns 返回新客户端ID
|
|
44
|
-
*/
|
|
45
|
-
export const cloneQuery = (clientId, parentNodeId, name, alias, desc) => {
|
|
46
|
-
return smartbi('ClientCombinedReportService', 'cloneQuery', [clientId, parentNodeId, name, alias, desc]);
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* 导出报表
|
|
50
|
-
* @param clientId 客户端ID
|
|
51
|
-
* @param reportId 报表ID
|
|
52
|
-
* @returns 无返回值
|
|
53
|
-
*/
|
|
54
|
-
export const dump = (clientId, reportId) => {
|
|
55
|
-
return smartbi('ClientCombinedReportService', 'dump', [clientId, reportId]);
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* 覆盖查询
|
|
59
|
-
* @param clientId 客户端ID
|
|
60
|
-
* @param replacedReportId 报表ID
|
|
61
|
-
* @param desc 描述
|
|
62
|
-
* @returns 返回true/false
|
|
63
|
-
*/
|
|
64
|
-
export const overwriteQuery = (clientId, replacedReportId, desc) => {
|
|
65
|
-
return smartbi('ClientCombinedReportService', 'overwriteQuery', [clientId, replacedReportId, desc]);
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* 获取即席查询的数据来源类型
|
|
69
|
-
* @param queryId 即席查询id
|
|
70
|
-
* @returns 返回数据来源类型
|
|
71
|
-
*/
|
|
72
|
-
export const getDataSourceType = (queryId) => {
|
|
73
|
-
return smartbi('ClientCombinedReportService', 'getDataSourceType', [queryId]);
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* 获取即席查询的类型
|
|
77
|
-
* @param reportId 即席查询id
|
|
78
|
-
* @returns 返回类型
|
|
79
|
-
*/
|
|
80
|
-
export const getExtendedType = (reportId) => {
|
|
81
|
-
return smartbi('ClientCombinedReportService', 'getExtendedType', [reportId]);
|
|
82
|
-
};
|