@bimatrix-aud-platform/aud_mcp_server 1.1.36 → 1.1.38
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/dist/generators/mtsd-builder.d.ts +191 -0
- package/dist/generators/mtsd-builder.js +967 -0
- package/dist/generators/report-template.d.ts +43 -0
- package/dist/generators/report-template.js +723 -0
- package/dist/index.js +395 -1
- package/dist/resources/encrypted-commands.d.ts +2 -0
- package/dist/resources/encrypted-commands.js +3 -0
- package/dist/utils/aud-api-client.d.ts +19 -0
- package/dist/utils/aud-api-client.js +158 -3
- package/dist/utils/report-publisher.d.ts +95 -0
- package/dist/utils/report-publisher.js +537 -0
- package/package.json +3 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MtsdBuilder — Fluent API for building MTSD documents.
|
|
3
|
+
*
|
|
4
|
+
* AI writes a simple JS script using this API, the MCP tool executes it
|
|
5
|
+
* via Node.js `vm` module, and the result is a schema-compliant MTSD JSON.
|
|
6
|
+
*/
|
|
7
|
+
export interface ElementOpts {
|
|
8
|
+
left?: number;
|
|
9
|
+
top?: number;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
zIndex?: number;
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
dock?: string;
|
|
15
|
+
margin?: string;
|
|
16
|
+
holdSize?: boolean;
|
|
17
|
+
bg?: string;
|
|
18
|
+
border?: {
|
|
19
|
+
color?: string;
|
|
20
|
+
lineType?: string;
|
|
21
|
+
thickness?: string;
|
|
22
|
+
radius?: string;
|
|
23
|
+
};
|
|
24
|
+
font?: {
|
|
25
|
+
size?: number;
|
|
26
|
+
bold?: boolean;
|
|
27
|
+
italic?: boolean;
|
|
28
|
+
color?: string;
|
|
29
|
+
family?: string;
|
|
30
|
+
align?: string;
|
|
31
|
+
valign?: string;
|
|
32
|
+
};
|
|
33
|
+
color?: string;
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
style?: {
|
|
36
|
+
type?: number;
|
|
37
|
+
boxStyle?: string;
|
|
38
|
+
};
|
|
39
|
+
dataSource?: string;
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}
|
|
42
|
+
export declare class DataGridBuilder {
|
|
43
|
+
private _parent;
|
|
44
|
+
private _element;
|
|
45
|
+
private _columns;
|
|
46
|
+
constructor(parent: ElementContainer, element: Record<string, any>);
|
|
47
|
+
addColumn(name: string, opts?: {
|
|
48
|
+
header?: string;
|
|
49
|
+
width?: number;
|
|
50
|
+
type?: string;
|
|
51
|
+
align?: string;
|
|
52
|
+
headerAlign?: string;
|
|
53
|
+
format?: string;
|
|
54
|
+
editable?: boolean;
|
|
55
|
+
visible?: boolean;
|
|
56
|
+
sortable?: boolean;
|
|
57
|
+
filterable?: boolean;
|
|
58
|
+
keyType?: number;
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
}): DataGridBuilder;
|
|
61
|
+
/** Finish grid configuration and return to parent */
|
|
62
|
+
end(): any;
|
|
63
|
+
/** Get the built element (internal) */
|
|
64
|
+
_getElement(): Record<string, any>;
|
|
65
|
+
}
|
|
66
|
+
declare abstract class ElementContainer {
|
|
67
|
+
protected _elements: Record<string, any>[];
|
|
68
|
+
protected _gridBuilders: DataGridBuilder[];
|
|
69
|
+
addLabel(name: string, text: string, opts?: ElementOpts): this;
|
|
70
|
+
addButton(name: string, text: string, opts?: ElementOpts): this;
|
|
71
|
+
addCalendar(name: string, opts?: ElementOpts): this;
|
|
72
|
+
addTextBox(name: string, opts?: ElementOpts): this;
|
|
73
|
+
addNumberBox(name: string, opts?: ElementOpts & {
|
|
74
|
+
format?: string;
|
|
75
|
+
value?: number;
|
|
76
|
+
min?: number;
|
|
77
|
+
max?: number;
|
|
78
|
+
}): this;
|
|
79
|
+
addComboBox(name: string, opts?: ElementOpts & {
|
|
80
|
+
labelField?: string;
|
|
81
|
+
valueField?: string;
|
|
82
|
+
}): this;
|
|
83
|
+
addCheckBox(name: string, text: string, opts?: ElementOpts & {
|
|
84
|
+
checkedValue?: string;
|
|
85
|
+
uncheckedValue?: string;
|
|
86
|
+
checked?: boolean;
|
|
87
|
+
}): this;
|
|
88
|
+
addImage(name: string, opts?: ElementOpts): this;
|
|
89
|
+
addChart(name: string, opts?: ElementOpts): this;
|
|
90
|
+
addOlapGrid(name: string, opts?: ElementOpts): this;
|
|
91
|
+
addMaskTextBox(name: string, opts?: ElementOpts & {
|
|
92
|
+
format?: string;
|
|
93
|
+
}): this;
|
|
94
|
+
addRichTextBox(name: string, opts?: ElementOpts): this;
|
|
95
|
+
addMultiComboBox(name: string, opts?: ElementOpts & {
|
|
96
|
+
labelField?: string;
|
|
97
|
+
valueField?: string;
|
|
98
|
+
}): this;
|
|
99
|
+
addPickList(name: string, opts?: ElementOpts): this;
|
|
100
|
+
addRadioButton(name: string, text: string, opts?: ElementOpts & {
|
|
101
|
+
groupName?: string;
|
|
102
|
+
checkedValue?: string;
|
|
103
|
+
checked?: boolean;
|
|
104
|
+
}): this;
|
|
105
|
+
addTree(name: string, opts?: ElementOpts): this;
|
|
106
|
+
addColorSelector(name: string, opts?: ElementOpts): this;
|
|
107
|
+
addSlider(name: string, opts?: ElementOpts): this;
|
|
108
|
+
addCalendarYear(name: string, opts?: ElementOpts): this;
|
|
109
|
+
addCalendarYM(name: string, opts?: ElementOpts): this;
|
|
110
|
+
addFileUploadButton(name: string, text?: string, opts?: ElementOpts & {
|
|
111
|
+
allowExt?: string;
|
|
112
|
+
saveFolderName?: string;
|
|
113
|
+
}): this;
|
|
114
|
+
addTreeGrid(name: string, opts?: ElementOpts): DataGridBuilder;
|
|
115
|
+
addIGrid(name: string, opts?: ElementOpts & {
|
|
116
|
+
serverScript?: string;
|
|
117
|
+
templateCode?: string;
|
|
118
|
+
}): this;
|
|
119
|
+
addCompactDataGrid(name: string, opts?: ElementOpts): DataGridBuilder;
|
|
120
|
+
addTreeView(name: string, opts?: ElementOpts): this;
|
|
121
|
+
addPieChart(name: string, opts?: ElementOpts): this;
|
|
122
|
+
addScatterChart(name: string, opts?: ElementOpts): this;
|
|
123
|
+
addPolygonChart(name: string, opts?: ElementOpts): this;
|
|
124
|
+
addTab(name: string, opts?: ElementOpts): this;
|
|
125
|
+
addTableLayout(name: string, opts?: ElementOpts): this;
|
|
126
|
+
addAddIn(name: string, opts?: ElementOpts): this;
|
|
127
|
+
addUserComponent(name: string, opts?: ElementOpts & {
|
|
128
|
+
reportCode?: string;
|
|
129
|
+
}): this;
|
|
130
|
+
addWebContainer(name: string, opts?: ElementOpts & {
|
|
131
|
+
url?: string;
|
|
132
|
+
}): this;
|
|
133
|
+
addDiagramControl(name: string, opts?: ElementOpts): this;
|
|
134
|
+
addSlicer(name: string, opts?: ElementOpts): this;
|
|
135
|
+
addGroup(name: string, opts?: ElementOpts): GroupBuilder;
|
|
136
|
+
addDataGrid(name: string, opts?: ElementOpts): DataGridBuilder;
|
|
137
|
+
/** Generic element adder for types not covered by specific methods */
|
|
138
|
+
addElement(type: string, name: string, opts?: ElementOpts): this;
|
|
139
|
+
protected _addElement(element: Record<string, any>): void;
|
|
140
|
+
protected _applyPassThrough(element: Record<string, any>, opts: ElementOpts): void;
|
|
141
|
+
/** Finalize all pending grid builders */
|
|
142
|
+
protected _finalizeGrids(): void;
|
|
143
|
+
_getElements(): Record<string, any>[];
|
|
144
|
+
}
|
|
145
|
+
export declare class GroupBuilder extends ElementContainer {
|
|
146
|
+
private _parentContainer;
|
|
147
|
+
private _groupElement;
|
|
148
|
+
constructor(parent: ElementContainer, groupElement: Record<string, any>);
|
|
149
|
+
/** Return to parent container (for chaining) */
|
|
150
|
+
end(): any;
|
|
151
|
+
protected _addElement(element: Record<string, any>): void;
|
|
152
|
+
_finalize(): void;
|
|
153
|
+
}
|
|
154
|
+
export declare class MtsdBuilder extends ElementContainer {
|
|
155
|
+
private _reportName;
|
|
156
|
+
private _reportCode;
|
|
157
|
+
private _formId;
|
|
158
|
+
private _dataSources;
|
|
159
|
+
private _variables;
|
|
160
|
+
private _scriptText;
|
|
161
|
+
private _moduleCode;
|
|
162
|
+
constructor(reportName: string, opts?: {
|
|
163
|
+
moduleCode?: string;
|
|
164
|
+
});
|
|
165
|
+
/** Add a DataSource */
|
|
166
|
+
addDataSource(name: string, connection: string, sql: string, opts?: {
|
|
167
|
+
columns?: Array<{
|
|
168
|
+
name: string;
|
|
169
|
+
type?: string;
|
|
170
|
+
}>;
|
|
171
|
+
useMeta?: boolean;
|
|
172
|
+
useCache?: boolean;
|
|
173
|
+
encrypted?: boolean;
|
|
174
|
+
}): this;
|
|
175
|
+
/** Add a Variable */
|
|
176
|
+
addVariable(name: string, value?: string, type?: string): this;
|
|
177
|
+
/** Set client script text */
|
|
178
|
+
setScript(text: string): this;
|
|
179
|
+
/** Get the report code */
|
|
180
|
+
getReportCode(): string;
|
|
181
|
+
/** Build the complete MTSD document */
|
|
182
|
+
build(): Record<string, any>;
|
|
183
|
+
/** Alias for build() */
|
|
184
|
+
toJSON(): Record<string, any>;
|
|
185
|
+
}
|
|
186
|
+
export declare function executeMtsdScript(scriptText: string): {
|
|
187
|
+
success: boolean;
|
|
188
|
+
mtsd?: Record<string, any>;
|
|
189
|
+
error?: string;
|
|
190
|
+
};
|
|
191
|
+
export {};
|