@mcp-abap-adt/adt-clients 0.1.5 → 0.1.7
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/clients/CrudClient.d.ts +56 -2
- package/dist/clients/CrudClient.d.ts.map +1 -1
- package/dist/clients/CrudClient.js +417 -41
- package/dist/clients/ReadOnlyClient.d.ts +14 -12
- package/dist/clients/ReadOnlyClient.d.ts.map +1 -1
- package/dist/clients/ReadOnlyClient.js +29 -12
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import { ReadOnlyClient } from './ReadOnlyClient';
|
|
|
8
8
|
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
9
9
|
import { AxiosResponse } from 'axios';
|
|
10
10
|
export declare class CrudClient extends ReadOnlyClient {
|
|
11
|
-
private
|
|
11
|
+
private crudState;
|
|
12
12
|
constructor(connection: AbapConnection);
|
|
13
13
|
getCreateResult(): AxiosResponse | undefined;
|
|
14
14
|
getLockHandle(): string | undefined;
|
|
@@ -17,7 +17,6 @@ export declare class CrudClient extends ReadOnlyClient {
|
|
|
17
17
|
getActivateResult(): AxiosResponse | undefined;
|
|
18
18
|
getCheckResult(): AxiosResponse | undefined;
|
|
19
19
|
getValidationResult(): any | undefined;
|
|
20
|
-
getReadResult(): AxiosResponse | undefined;
|
|
21
20
|
createProgram(programName: string, description: string, packageName: string, transportRequest?: string, options?: {
|
|
22
21
|
masterSystem?: string;
|
|
23
22
|
responsible?: string;
|
|
@@ -54,6 +53,61 @@ export declare class CrudClient extends ReadOnlyClient {
|
|
|
54
53
|
activateInterface(interfaceName: string): Promise<this>;
|
|
55
54
|
checkInterface(interfaceName: string): Promise<this>;
|
|
56
55
|
validateInterface(interfaceName: string): Promise<this>;
|
|
56
|
+
createFunctionModule(functionModuleName: string, functionGroupName: string, description: string, packageName: string, transportRequest?: string): Promise<this>;
|
|
57
|
+
lockFunctionModule(functionModuleName: string, functionGroupName: string): Promise<this>;
|
|
58
|
+
unlockFunctionModule(functionModuleName: string, functionGroupName: string, lockHandle?: string): Promise<this>;
|
|
59
|
+
updateFunctionModule(functionModuleName: string, functionGroupName: string, sourceCode: string, lockHandle?: string): Promise<this>;
|
|
60
|
+
activateFunctionModule(functionModuleName: string, functionGroupName: string): Promise<this>;
|
|
61
|
+
checkFunctionModule(functionModuleName: string, functionGroupName: string): Promise<this>;
|
|
62
|
+
validateFunctionModule(functionModuleName: string, functionGroupName: string): Promise<this>;
|
|
63
|
+
createFunctionGroup(functionGroupName: string, description: string, packageName: string, transportRequest?: string): Promise<this>;
|
|
64
|
+
lockFunctionGroup(functionGroupName: string): Promise<this>;
|
|
65
|
+
unlockFunctionGroup(functionGroupName: string, lockHandle?: string): Promise<this>;
|
|
66
|
+
activateFunctionGroup(functionGroupName: string): Promise<this>;
|
|
67
|
+
checkFunctionGroup(functionGroupName: string): Promise<this>;
|
|
68
|
+
validateFunctionGroup(functionGroupName: string): Promise<this>;
|
|
69
|
+
createDataElement(dataElementName: string, description: string, packageName: string, transportRequest?: string): Promise<this>;
|
|
70
|
+
lockDataElement(dataElementName: string): Promise<this>;
|
|
71
|
+
unlockDataElement(dataElementName: string, lockHandle?: string): Promise<this>;
|
|
72
|
+
updateDataElement(dataElementName: string, properties: any, lockHandle?: string): Promise<this>;
|
|
73
|
+
activateDataElement(dataElementName: string): Promise<this>;
|
|
74
|
+
checkDataElement(dataElementName: string): Promise<this>;
|
|
75
|
+
validateDataElement(dataElementName: string): Promise<this>;
|
|
76
|
+
createDomain(domainName: string, description: string, packageName: string, transportRequest?: string): Promise<this>;
|
|
77
|
+
lockDomain(domainName: string): Promise<this>;
|
|
78
|
+
unlockDomain(domainName: string, lockHandle?: string): Promise<this>;
|
|
79
|
+
updateDomain(domainName: string, properties: any, lockHandle?: string): Promise<this>;
|
|
80
|
+
activateDomain(domainName: string): Promise<this>;
|
|
81
|
+
checkDomain(domainName: string): Promise<this>;
|
|
82
|
+
validateDomain(domainName: string): Promise<this>;
|
|
83
|
+
createStructure(structureName: string, description: string, packageName: string, transportRequest?: string): Promise<this>;
|
|
84
|
+
lockStructure(structureName: string): Promise<this>;
|
|
85
|
+
unlockStructure(structureName: string, lockHandle?: string): Promise<this>;
|
|
86
|
+
updateStructure(structureName: string, ddlCode: string, lockHandle?: string): Promise<this>;
|
|
87
|
+
activateStructure(structureName: string): Promise<this>;
|
|
88
|
+
checkStructure(structureName: string): Promise<this>;
|
|
89
|
+
validateStructure(structureName: string): Promise<this>;
|
|
90
|
+
createTable(tableName: string, packageName: string, transportRequest?: string): Promise<this>;
|
|
91
|
+
lockTable(tableName: string): Promise<this>;
|
|
92
|
+
unlockTable(tableName: string, lockHandle?: string): Promise<this>;
|
|
93
|
+
updateTable(tableName: string, ddlCode: string, lockHandle?: string): Promise<this>;
|
|
94
|
+
activateTable(tableName: string): Promise<this>;
|
|
95
|
+
checkTable(tableName: string): Promise<this>;
|
|
96
|
+
validateTable(tableName: string): Promise<this>;
|
|
97
|
+
createView(viewName: string, description: string, packageName: string, transportRequest?: string): Promise<this>;
|
|
98
|
+
lockView(viewName: string): Promise<this>;
|
|
99
|
+
unlockView(viewName: string, lockHandle?: string): Promise<this>;
|
|
100
|
+
updateView(viewName: string, ddlSource: string, lockHandle?: string): Promise<this>;
|
|
101
|
+
activateView(viewName: string): Promise<this>;
|
|
102
|
+
checkView(viewName: string): Promise<this>;
|
|
103
|
+
validateView(viewName: string): Promise<this>;
|
|
104
|
+
createPackage(packageName: string, superPackage: string, description: string, transportRequest?: string): Promise<this>;
|
|
105
|
+
validatePackage(packageName: string, superPackage: string): Promise<this>;
|
|
106
|
+
lockPackage(packageName: string, superPackage: string): Promise<this>;
|
|
107
|
+
unlockPackage(packageName: string, superPackage: string, lockHandle?: string): Promise<this>;
|
|
108
|
+
updatePackage(packageName: string, superPackage: string, updatedDescription: string, lockHandle?: string): Promise<this>;
|
|
109
|
+
checkPackage(packageName: string, superPackage: string): Promise<this>;
|
|
110
|
+
createTransport(description: string, transportType?: 'workbench' | 'customizing'): Promise<this>;
|
|
57
111
|
/**
|
|
58
112
|
* Activate multiple ABAP objects in batch
|
|
59
113
|
* Uses ADT activation/runs endpoint for batch activation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudClient.d.ts","sourceRoot":"","sources":["../../src/clients/CrudClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAyBtC,qBAAa,UAAW,SAAQ,cAAc;IAC5C,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"CrudClient.d.ts","sourceRoot":"","sources":["../../src/clients/CrudClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAyBtC,qBAAa,UAAW,SAAQ,cAAc;IAC5C,OAAO,CAAC,SAAS,CAAuB;gBAE5B,UAAU,EAAE,cAAc;IAKtC,eAAe,IAAI,aAAa,GAAG,SAAS;IAC5C,aAAa,IAAI,MAAM,GAAG,SAAS;IACnC,eAAe,IAAI,aAAa,GAAG,SAAS;IAC5C,eAAe,IAAI,aAAa,GAAG,SAAS;IAC5C,iBAAiB,IAAI,aAAa,GAAG,SAAS;IAC9C,cAAc,IAAI,aAAa,GAAG,SAAS;IAC3C,mBAAmB,IAAI,GAAG,GAAG,SAAS;IAIhC,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,gBAAgB,CAAC,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,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,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxH,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAStE,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAStG;;;OAGG;IACG,oBAAoB,CACxB,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAC7C,QAAQ,GAAE,OAAc,GACvB,OAAO,CAAC,aAAa,CAAC;IAOzB;;OAEG;IACH,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG,GAAG;QACnD,SAAS,EAAE,OAAO,CAAC;QACnB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,QAAQ,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACjF;CAIF"}
|
|
@@ -44,157 +44,533 @@ const ReadOnlyClient_1 = require("./ReadOnlyClient");
|
|
|
44
44
|
const program_1 = require("../core/program");
|
|
45
45
|
const class_1 = require("../core/class");
|
|
46
46
|
const interface_1 = require("../core/interface");
|
|
47
|
+
const dataElement_1 = require("../core/dataElement");
|
|
48
|
+
const domain_1 = require("../core/domain");
|
|
49
|
+
const structure_1 = require("../core/structure");
|
|
50
|
+
const table_1 = require("../core/table");
|
|
51
|
+
const view_1 = require("../core/view");
|
|
52
|
+
const functionGroup_1 = require("../core/functionGroup");
|
|
53
|
+
const functionModule_1 = require("../core/functionModule");
|
|
54
|
+
const package_1 = require("../core/package");
|
|
55
|
+
const transport_1 = require("../core/transport");
|
|
47
56
|
class CrudClient extends ReadOnlyClient_1.ReadOnlyClient {
|
|
48
|
-
|
|
57
|
+
crudState = {};
|
|
49
58
|
constructor(connection) {
|
|
50
59
|
super(connection);
|
|
51
60
|
}
|
|
52
|
-
// State getters
|
|
53
|
-
getCreateResult() { return this.
|
|
54
|
-
getLockHandle() { return this.
|
|
55
|
-
getUnlockResult() { return this.
|
|
56
|
-
getUpdateResult() { return this.
|
|
57
|
-
getActivateResult() { return this.
|
|
58
|
-
getCheckResult() { return this.
|
|
59
|
-
getValidationResult() { return this.
|
|
60
|
-
getReadResult() { return this.state.readResult; }
|
|
61
|
+
// State getters (readResult inherited from ReadOnlyClient)
|
|
62
|
+
getCreateResult() { return this.crudState.createResult; }
|
|
63
|
+
getLockHandle() { return this.crudState.lockHandle; }
|
|
64
|
+
getUnlockResult() { return this.crudState.unlockResult; }
|
|
65
|
+
getUpdateResult() { return this.crudState.updateResult; }
|
|
66
|
+
getActivateResult() { return this.crudState.activateResult; }
|
|
67
|
+
getCheckResult() { return this.crudState.checkResult; }
|
|
68
|
+
getValidationResult() { return this.crudState.validationResult; }
|
|
61
69
|
// ==================== Program operations ====================
|
|
62
70
|
async createProgram(programName, description, packageName, transportRequest, options) {
|
|
63
71
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description, packageName, transportRequest, ...options });
|
|
64
72
|
await builder.create();
|
|
65
|
-
this.
|
|
73
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
66
74
|
return this;
|
|
67
75
|
}
|
|
68
76
|
async lockProgram(programName) {
|
|
69
77
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
70
78
|
await builder.lock();
|
|
71
|
-
this.
|
|
79
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
72
80
|
return this;
|
|
73
81
|
}
|
|
74
82
|
async unlockProgram(programName, lockHandle) {
|
|
75
83
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
76
|
-
builder.lockHandle = lockHandle || this.
|
|
84
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
77
85
|
await builder.unlock();
|
|
78
|
-
this.
|
|
79
|
-
this.
|
|
86
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
87
|
+
this.crudState.lockHandle = undefined;
|
|
80
88
|
return this;
|
|
81
89
|
}
|
|
82
90
|
async updateProgram(programName, sourceCode, lockHandle) {
|
|
83
91
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '', sourceCode });
|
|
84
|
-
builder.lockHandle = lockHandle || this.
|
|
92
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
85
93
|
await builder.update();
|
|
86
|
-
this.
|
|
94
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
87
95
|
return this;
|
|
88
96
|
}
|
|
89
97
|
async activateProgram(programName) {
|
|
90
98
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
91
99
|
await builder.activate();
|
|
92
|
-
this.
|
|
100
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
93
101
|
return this;
|
|
94
102
|
}
|
|
95
103
|
async checkProgram(programName) {
|
|
96
104
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
97
105
|
await builder.check();
|
|
98
|
-
this.
|
|
106
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
99
107
|
return this;
|
|
100
108
|
}
|
|
101
109
|
async validateProgram(programName) {
|
|
102
110
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
103
111
|
await builder.validate();
|
|
104
|
-
this.
|
|
112
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
105
113
|
return this;
|
|
106
114
|
}
|
|
107
115
|
// ==================== Class operations ====================
|
|
108
116
|
async createClass(className, description, packageName, transportRequest, options) {
|
|
109
117
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description, packageName, transportRequest, ...options });
|
|
110
118
|
await builder.create();
|
|
111
|
-
this.
|
|
119
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
112
120
|
return this;
|
|
113
121
|
}
|
|
114
122
|
async lockClass(className) {
|
|
115
123
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
116
124
|
await builder.lock();
|
|
117
|
-
this.
|
|
125
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
118
126
|
return this;
|
|
119
127
|
}
|
|
120
128
|
async unlockClass(className, lockHandle) {
|
|
121
129
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
122
|
-
builder.lockHandle = lockHandle || this.
|
|
130
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
123
131
|
await builder.unlock();
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
132
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
133
|
+
this.crudState.lockHandle = undefined;
|
|
126
134
|
return this;
|
|
127
135
|
}
|
|
128
136
|
async updateClass(className, sourceCode, lockHandle) {
|
|
129
137
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
130
|
-
builder.lockHandle = lockHandle || this.
|
|
138
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
131
139
|
builder.setCode(sourceCode);
|
|
132
140
|
await builder.update();
|
|
133
|
-
this.
|
|
141
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
134
142
|
return this;
|
|
135
143
|
}
|
|
136
144
|
async activateClass(className) {
|
|
137
145
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
138
146
|
await builder.activate();
|
|
139
|
-
this.
|
|
147
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
140
148
|
return this;
|
|
141
149
|
}
|
|
142
150
|
async checkClass(className) {
|
|
143
151
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
144
152
|
await builder.check();
|
|
145
|
-
this.
|
|
153
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
146
154
|
return this;
|
|
147
155
|
}
|
|
148
156
|
async validateClass(className) {
|
|
149
157
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
150
158
|
await builder.validate();
|
|
151
|
-
this.
|
|
159
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
152
160
|
return this;
|
|
153
161
|
}
|
|
154
162
|
// ==================== Interface operations ====================
|
|
155
163
|
async createInterface(interfaceName, description, packageName, transportRequest, options) {
|
|
156
164
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description, packageName, transportRequest, ...options });
|
|
157
165
|
await builder.create();
|
|
158
|
-
this.
|
|
166
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
159
167
|
return this;
|
|
160
168
|
}
|
|
161
169
|
async lockInterface(interfaceName) {
|
|
162
170
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
163
171
|
await builder.lock();
|
|
164
|
-
this.
|
|
172
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
165
173
|
return this;
|
|
166
174
|
}
|
|
167
175
|
async unlockInterface(interfaceName, lockHandle) {
|
|
168
176
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
169
|
-
builder.lockHandle = lockHandle || this.
|
|
177
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
170
178
|
await builder.unlock();
|
|
171
|
-
this.
|
|
172
|
-
this.
|
|
179
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
180
|
+
this.crudState.lockHandle = undefined;
|
|
173
181
|
return this;
|
|
174
182
|
}
|
|
175
183
|
async updateInterface(interfaceName, sourceCode, lockHandle) {
|
|
176
184
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '', sourceCode });
|
|
177
|
-
builder.lockHandle = lockHandle || this.
|
|
185
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
178
186
|
await builder.update();
|
|
179
|
-
this.
|
|
187
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
180
188
|
return this;
|
|
181
189
|
}
|
|
182
190
|
async activateInterface(interfaceName) {
|
|
183
191
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
184
192
|
await builder.activate();
|
|
185
|
-
this.
|
|
193
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
186
194
|
return this;
|
|
187
195
|
}
|
|
188
196
|
async checkInterface(interfaceName) {
|
|
189
197
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
190
198
|
await builder.check();
|
|
191
|
-
this.
|
|
199
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
192
200
|
return this;
|
|
193
201
|
}
|
|
194
202
|
async validateInterface(interfaceName) {
|
|
195
203
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
196
204
|
await builder.validate();
|
|
197
|
-
this.
|
|
205
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
206
|
+
return this;
|
|
207
|
+
}
|
|
208
|
+
// ==================== FunctionModule operations ====================
|
|
209
|
+
async createFunctionModule(functionModuleName, functionGroupName, description, packageName, transportRequest) {
|
|
210
|
+
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, {
|
|
211
|
+
functionModuleName,
|
|
212
|
+
functionGroupName,
|
|
213
|
+
description,
|
|
214
|
+
packageName,
|
|
215
|
+
transportRequest
|
|
216
|
+
});
|
|
217
|
+
await builder.create();
|
|
218
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
219
|
+
return this;
|
|
220
|
+
}
|
|
221
|
+
async lockFunctionModule(functionModuleName, functionGroupName) {
|
|
222
|
+
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
223
|
+
await builder.lock();
|
|
224
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
225
|
+
return this;
|
|
226
|
+
}
|
|
227
|
+
async unlockFunctionModule(functionModuleName, functionGroupName, lockHandle) {
|
|
228
|
+
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
229
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
230
|
+
await builder.unlock();
|
|
231
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
232
|
+
this.crudState.lockHandle = undefined;
|
|
233
|
+
return this;
|
|
234
|
+
}
|
|
235
|
+
async updateFunctionModule(functionModuleName, functionGroupName, sourceCode, lockHandle) {
|
|
236
|
+
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '', sourceCode });
|
|
237
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
238
|
+
await builder.update();
|
|
239
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
240
|
+
return this;
|
|
241
|
+
}
|
|
242
|
+
async activateFunctionModule(functionModuleName, functionGroupName) {
|
|
243
|
+
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
244
|
+
await builder.activate();
|
|
245
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
246
|
+
return this;
|
|
247
|
+
}
|
|
248
|
+
async checkFunctionModule(functionModuleName, functionGroupName) {
|
|
249
|
+
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
250
|
+
await builder.check();
|
|
251
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
252
|
+
return this;
|
|
253
|
+
}
|
|
254
|
+
async validateFunctionModule(functionModuleName, functionGroupName) {
|
|
255
|
+
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
256
|
+
await builder.validate();
|
|
257
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
258
|
+
return this;
|
|
259
|
+
}
|
|
260
|
+
// ==================== FunctionGroup operations ====================
|
|
261
|
+
async createFunctionGroup(functionGroupName, description, packageName, transportRequest) {
|
|
262
|
+
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description, packageName, transportRequest });
|
|
263
|
+
await builder.create();
|
|
264
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
265
|
+
return this;
|
|
266
|
+
}
|
|
267
|
+
async lockFunctionGroup(functionGroupName) {
|
|
268
|
+
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
269
|
+
await builder.lock();
|
|
270
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
271
|
+
return this;
|
|
272
|
+
}
|
|
273
|
+
async unlockFunctionGroup(functionGroupName, lockHandle) {
|
|
274
|
+
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
275
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
276
|
+
await builder.unlock();
|
|
277
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
278
|
+
this.crudState.lockHandle = undefined;
|
|
279
|
+
return this;
|
|
280
|
+
}
|
|
281
|
+
async activateFunctionGroup(functionGroupName) {
|
|
282
|
+
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
283
|
+
await builder.activate();
|
|
284
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
285
|
+
return this;
|
|
286
|
+
}
|
|
287
|
+
async checkFunctionGroup(functionGroupName) {
|
|
288
|
+
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
289
|
+
await builder.check();
|
|
290
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
291
|
+
return this;
|
|
292
|
+
}
|
|
293
|
+
async validateFunctionGroup(functionGroupName) {
|
|
294
|
+
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
295
|
+
await builder.validate();
|
|
296
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
297
|
+
return this;
|
|
298
|
+
}
|
|
299
|
+
// ==================== DataElement operations ====================
|
|
300
|
+
async createDataElement(dataElementName, description, packageName, transportRequest) {
|
|
301
|
+
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description, packageName, transportRequest });
|
|
302
|
+
await builder.create();
|
|
303
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
304
|
+
return this;
|
|
305
|
+
}
|
|
306
|
+
async lockDataElement(dataElementName) {
|
|
307
|
+
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
308
|
+
await builder.lock();
|
|
309
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
310
|
+
return this;
|
|
311
|
+
}
|
|
312
|
+
async unlockDataElement(dataElementName, lockHandle) {
|
|
313
|
+
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
314
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
315
|
+
await builder.unlock();
|
|
316
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
317
|
+
this.crudState.lockHandle = undefined;
|
|
318
|
+
return this;
|
|
319
|
+
}
|
|
320
|
+
async updateDataElement(dataElementName, properties, lockHandle) {
|
|
321
|
+
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '', ...properties });
|
|
322
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
323
|
+
await builder.update();
|
|
324
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
325
|
+
return this;
|
|
326
|
+
}
|
|
327
|
+
async activateDataElement(dataElementName) {
|
|
328
|
+
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
329
|
+
await builder.activate();
|
|
330
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
331
|
+
return this;
|
|
332
|
+
}
|
|
333
|
+
async checkDataElement(dataElementName) {
|
|
334
|
+
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
335
|
+
await builder.check();
|
|
336
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
337
|
+
return this;
|
|
338
|
+
}
|
|
339
|
+
async validateDataElement(dataElementName) {
|
|
340
|
+
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
341
|
+
await builder.validate();
|
|
342
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
343
|
+
return this;
|
|
344
|
+
}
|
|
345
|
+
// ==================== Domain operations ====================
|
|
346
|
+
async createDomain(domainName, description, packageName, transportRequest) {
|
|
347
|
+
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description, packageName, transportRequest });
|
|
348
|
+
await builder.create();
|
|
349
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
350
|
+
return this;
|
|
351
|
+
}
|
|
352
|
+
async lockDomain(domainName) {
|
|
353
|
+
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
354
|
+
await builder.lock();
|
|
355
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
356
|
+
return this;
|
|
357
|
+
}
|
|
358
|
+
async unlockDomain(domainName, lockHandle) {
|
|
359
|
+
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
360
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
361
|
+
await builder.unlock();
|
|
362
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
363
|
+
this.crudState.lockHandle = undefined;
|
|
364
|
+
return this;
|
|
365
|
+
}
|
|
366
|
+
async updateDomain(domainName, properties, lockHandle) {
|
|
367
|
+
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '', ...properties });
|
|
368
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
369
|
+
await builder.update();
|
|
370
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
371
|
+
return this;
|
|
372
|
+
}
|
|
373
|
+
async activateDomain(domainName) {
|
|
374
|
+
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
375
|
+
await builder.activate();
|
|
376
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
377
|
+
return this;
|
|
378
|
+
}
|
|
379
|
+
async checkDomain(domainName) {
|
|
380
|
+
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
381
|
+
await builder.check();
|
|
382
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
383
|
+
return this;
|
|
384
|
+
}
|
|
385
|
+
async validateDomain(domainName) {
|
|
386
|
+
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
387
|
+
await builder.validate();
|
|
388
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
389
|
+
return this;
|
|
390
|
+
}
|
|
391
|
+
// ==================== Structure operations ====================
|
|
392
|
+
async createStructure(structureName, description, packageName, transportRequest) {
|
|
393
|
+
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description, packageName, transportRequest });
|
|
394
|
+
await builder.create();
|
|
395
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
396
|
+
return this;
|
|
397
|
+
}
|
|
398
|
+
async lockStructure(structureName) {
|
|
399
|
+
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
400
|
+
await builder.lock();
|
|
401
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
402
|
+
return this;
|
|
403
|
+
}
|
|
404
|
+
async unlockStructure(structureName, lockHandle) {
|
|
405
|
+
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
406
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
407
|
+
await builder.unlock();
|
|
408
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
409
|
+
this.crudState.lockHandle = undefined;
|
|
410
|
+
return this;
|
|
411
|
+
}
|
|
412
|
+
async updateStructure(structureName, ddlCode, lockHandle) {
|
|
413
|
+
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '', ddlCode });
|
|
414
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
415
|
+
await builder.update();
|
|
416
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
417
|
+
return this;
|
|
418
|
+
}
|
|
419
|
+
async activateStructure(structureName) {
|
|
420
|
+
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
421
|
+
await builder.activate();
|
|
422
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
423
|
+
return this;
|
|
424
|
+
}
|
|
425
|
+
async checkStructure(structureName) {
|
|
426
|
+
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
427
|
+
await builder.check();
|
|
428
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
429
|
+
return this;
|
|
430
|
+
}
|
|
431
|
+
async validateStructure(structureName) {
|
|
432
|
+
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
433
|
+
await builder.validate();
|
|
434
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
435
|
+
return this;
|
|
436
|
+
}
|
|
437
|
+
// ==================== Table operations ====================
|
|
438
|
+
async createTable(tableName, packageName, transportRequest) {
|
|
439
|
+
const builder = new table_1.TableBuilder(this.connection, {}, { tableName, packageName, transportRequest });
|
|
440
|
+
await builder.create();
|
|
441
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
442
|
+
return this;
|
|
443
|
+
}
|
|
444
|
+
async lockTable(tableName) {
|
|
445
|
+
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
446
|
+
await builder.lock();
|
|
447
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
448
|
+
return this;
|
|
449
|
+
}
|
|
450
|
+
async unlockTable(tableName, lockHandle) {
|
|
451
|
+
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
452
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
453
|
+
await builder.unlock();
|
|
454
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
455
|
+
this.crudState.lockHandle = undefined;
|
|
456
|
+
return this;
|
|
457
|
+
}
|
|
458
|
+
async updateTable(tableName, ddlCode, lockHandle) {
|
|
459
|
+
const builder = new table_1.TableBuilder(this.connection, {}, { tableName, ddlCode });
|
|
460
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
461
|
+
await builder.update();
|
|
462
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
463
|
+
return this;
|
|
464
|
+
}
|
|
465
|
+
async activateTable(tableName) {
|
|
466
|
+
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
467
|
+
await builder.activate();
|
|
468
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
469
|
+
return this;
|
|
470
|
+
}
|
|
471
|
+
async checkTable(tableName) {
|
|
472
|
+
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
473
|
+
await builder.check();
|
|
474
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
475
|
+
return this;
|
|
476
|
+
}
|
|
477
|
+
async validateTable(tableName) {
|
|
478
|
+
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
479
|
+
await builder.validate();
|
|
480
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
481
|
+
return this;
|
|
482
|
+
}
|
|
483
|
+
// ==================== View operations ====================
|
|
484
|
+
async createView(viewName, description, packageName, transportRequest) {
|
|
485
|
+
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description, packageName, transportRequest });
|
|
486
|
+
await builder.create();
|
|
487
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
488
|
+
return this;
|
|
489
|
+
}
|
|
490
|
+
async lockView(viewName) {
|
|
491
|
+
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
492
|
+
await builder.lock();
|
|
493
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
494
|
+
return this;
|
|
495
|
+
}
|
|
496
|
+
async unlockView(viewName, lockHandle) {
|
|
497
|
+
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
498
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
499
|
+
await builder.unlock();
|
|
500
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
501
|
+
this.crudState.lockHandle = undefined;
|
|
502
|
+
return this;
|
|
503
|
+
}
|
|
504
|
+
async updateView(viewName, ddlSource, lockHandle) {
|
|
505
|
+
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '', ddlSource });
|
|
506
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
507
|
+
await builder.update();
|
|
508
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
509
|
+
return this;
|
|
510
|
+
}
|
|
511
|
+
async activateView(viewName) {
|
|
512
|
+
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
513
|
+
await builder.activate();
|
|
514
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
515
|
+
return this;
|
|
516
|
+
}
|
|
517
|
+
async checkView(viewName) {
|
|
518
|
+
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
519
|
+
await builder.check();
|
|
520
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
521
|
+
return this;
|
|
522
|
+
}
|
|
523
|
+
async validateView(viewName) {
|
|
524
|
+
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
525
|
+
await builder.validate();
|
|
526
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
527
|
+
return this;
|
|
528
|
+
}
|
|
529
|
+
// ==================== Package operations ====================
|
|
530
|
+
async createPackage(packageName, superPackage, description, transportRequest) {
|
|
531
|
+
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description, transportRequest });
|
|
532
|
+
await builder.create();
|
|
533
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
534
|
+
return this;
|
|
535
|
+
}
|
|
536
|
+
async validatePackage(packageName, superPackage) {
|
|
537
|
+
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '' });
|
|
538
|
+
await builder.validate();
|
|
539
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
540
|
+
return this;
|
|
541
|
+
}
|
|
542
|
+
async lockPackage(packageName, superPackage) {
|
|
543
|
+
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '' });
|
|
544
|
+
await builder.lock();
|
|
545
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
546
|
+
return this;
|
|
547
|
+
}
|
|
548
|
+
async unlockPackage(packageName, superPackage, lockHandle) {
|
|
549
|
+
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '' });
|
|
550
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
551
|
+
await builder.unlock();
|
|
552
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
553
|
+
this.crudState.lockHandle = undefined;
|
|
554
|
+
return this;
|
|
555
|
+
}
|
|
556
|
+
async updatePackage(packageName, superPackage, updatedDescription, lockHandle) {
|
|
557
|
+
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '', updatedDescription });
|
|
558
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
559
|
+
await builder.update();
|
|
560
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
561
|
+
return this;
|
|
562
|
+
}
|
|
563
|
+
async checkPackage(packageName, superPackage) {
|
|
564
|
+
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '' });
|
|
565
|
+
await builder.check();
|
|
566
|
+
// checkResult is void for Package
|
|
567
|
+
return this;
|
|
568
|
+
}
|
|
569
|
+
// ==================== Transport operations ====================
|
|
570
|
+
async createTransport(description, transportType) {
|
|
571
|
+
const builder = new transport_1.TransportBuilder(this.connection, {}, { description, transportType });
|
|
572
|
+
await builder.create();
|
|
573
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
198
574
|
return this;
|
|
199
575
|
}
|
|
200
576
|
// ==================== Batch operations ====================
|
|
@@ -205,7 +581,7 @@ class CrudClient extends ReadOnlyClient_1.ReadOnlyClient {
|
|
|
205
581
|
async activateObjectsGroup(objects, preaudit = true) {
|
|
206
582
|
const { activateObjectsGroup } = await Promise.resolve().then(() => __importStar(require('../core/managementOperations')));
|
|
207
583
|
const result = await activateObjectsGroup(this.connection, objects, preaudit);
|
|
208
|
-
this.
|
|
584
|
+
this.crudState.activateResult = result;
|
|
209
585
|
return result;
|
|
210
586
|
}
|
|
211
587
|
/**
|
|
@@ -8,18 +8,20 @@ import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
|
8
8
|
import { AxiosResponse } from 'axios';
|
|
9
9
|
export declare class ReadOnlyClient {
|
|
10
10
|
protected connection: AbapConnection;
|
|
11
|
+
private state;
|
|
11
12
|
constructor(connection: AbapConnection);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
getReadResult(): AxiosResponse | undefined;
|
|
14
|
+
readProgram(programName: string): Promise<this>;
|
|
15
|
+
readClass(className: string): Promise<this>;
|
|
16
|
+
readInterface(interfaceName: string): Promise<this>;
|
|
17
|
+
readDataElement(dataElementName: string): Promise<this>;
|
|
18
|
+
readDomain(domainName: string): Promise<this>;
|
|
19
|
+
readStructure(structureName: string): Promise<this>;
|
|
20
|
+
readTable(tableName: string): Promise<this>;
|
|
21
|
+
readView(viewName: string): Promise<this>;
|
|
22
|
+
readFunctionGroup(functionGroupName: string): Promise<this>;
|
|
23
|
+
readFunctionModule(functionModuleName: string, functionGroupName: string): Promise<this>;
|
|
24
|
+
readPackage(packageName: string): Promise<this>;
|
|
25
|
+
readTransport(transportRequest: string): Promise<this>;
|
|
24
26
|
}
|
|
25
27
|
//# sourceMappingURL=ReadOnlyClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadOnlyClient.d.ts","sourceRoot":"","sources":["../../src/clients/ReadOnlyClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ReadOnlyClient.d.ts","sourceRoot":"","sources":["../../src/clients/ReadOnlyClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAkBtC,qBAAa,cAAc;IACzB,SAAS,CAAC,UAAU,EAAE,cAAc,CAAC;IACrC,OAAO,CAAC,KAAK,CAA2B;gBAE5B,UAAU,EAAE,cAAc;IAKtC,aAAa,IAAI,aAAa,GAAG,SAAS;IAKpC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/C,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnD,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQvD,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ7C,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnD,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQzC,iBAAiB,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3D,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxF,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/C,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAM7D"}
|
|
@@ -21,80 +21,97 @@ const package_1 = require("../core/package");
|
|
|
21
21
|
const transport_1 = require("../core/transport");
|
|
22
22
|
class ReadOnlyClient {
|
|
23
23
|
connection;
|
|
24
|
+
state = {};
|
|
24
25
|
constructor(connection) {
|
|
25
26
|
this.connection = connection;
|
|
26
27
|
}
|
|
28
|
+
// State getter
|
|
29
|
+
getReadResult() {
|
|
30
|
+
return this.state.readResult;
|
|
31
|
+
}
|
|
27
32
|
// Program operations
|
|
28
33
|
async readProgram(programName) {
|
|
29
34
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
30
35
|
await builder.read();
|
|
31
|
-
|
|
36
|
+
this.state.readResult = builder.getState().readResult;
|
|
37
|
+
return this;
|
|
32
38
|
}
|
|
33
39
|
// Class operations
|
|
34
40
|
async readClass(className) {
|
|
35
41
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
36
42
|
await builder.read();
|
|
37
|
-
|
|
43
|
+
this.state.readResult = builder.getState().readResult;
|
|
44
|
+
return this;
|
|
38
45
|
}
|
|
39
46
|
// Interface operations
|
|
40
47
|
async readInterface(interfaceName) {
|
|
41
48
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
42
49
|
await builder.read();
|
|
43
|
-
|
|
50
|
+
this.state.readResult = builder.getState().readResult;
|
|
51
|
+
return this;
|
|
44
52
|
}
|
|
45
53
|
// DataElement operations
|
|
46
54
|
async readDataElement(dataElementName) {
|
|
47
55
|
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
48
56
|
await builder.read();
|
|
49
|
-
|
|
57
|
+
this.state.readResult = builder.getState().readResult;
|
|
58
|
+
return this;
|
|
50
59
|
}
|
|
51
60
|
// Domain operations
|
|
52
61
|
async readDomain(domainName) {
|
|
53
62
|
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
54
63
|
await builder.read();
|
|
55
|
-
|
|
64
|
+
this.state.readResult = builder.getState().readResult;
|
|
65
|
+
return this;
|
|
56
66
|
}
|
|
57
67
|
// Structure operations
|
|
58
68
|
async readStructure(structureName) {
|
|
59
69
|
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
60
70
|
await builder.read();
|
|
61
|
-
|
|
71
|
+
this.state.readResult = builder.getState().readResult;
|
|
72
|
+
return this;
|
|
62
73
|
}
|
|
63
74
|
// Table operations
|
|
64
75
|
async readTable(tableName) {
|
|
65
76
|
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
66
77
|
await builder.read();
|
|
67
|
-
|
|
78
|
+
this.state.readResult = builder.getState().readResult;
|
|
79
|
+
return this;
|
|
68
80
|
}
|
|
69
81
|
// View operations
|
|
70
82
|
async readView(viewName) {
|
|
71
83
|
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
72
84
|
await builder.read();
|
|
73
|
-
|
|
85
|
+
this.state.readResult = builder.getState().readResult;
|
|
86
|
+
return this;
|
|
74
87
|
}
|
|
75
88
|
// FunctionGroup operations
|
|
76
89
|
async readFunctionGroup(functionGroupName) {
|
|
77
90
|
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
78
91
|
await builder.read();
|
|
79
|
-
|
|
92
|
+
this.state.readResult = builder.getState().readResult;
|
|
93
|
+
return this;
|
|
80
94
|
}
|
|
81
95
|
// FunctionModule operations
|
|
82
96
|
async readFunctionModule(functionModuleName, functionGroupName) {
|
|
83
97
|
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
84
98
|
await builder.read();
|
|
85
|
-
|
|
99
|
+
this.state.readResult = builder.getState().readResult;
|
|
100
|
+
return this;
|
|
86
101
|
}
|
|
87
102
|
// Package operations
|
|
88
103
|
async readPackage(packageName) {
|
|
89
104
|
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, description: '', superPackage: '' });
|
|
90
105
|
await builder.read();
|
|
91
|
-
|
|
106
|
+
this.state.readResult = builder.getState().readResult;
|
|
107
|
+
return this;
|
|
92
108
|
}
|
|
93
109
|
// Transport operations
|
|
94
110
|
async readTransport(transportRequest) {
|
|
95
111
|
const builder = new transport_1.TransportBuilder(this.connection, {}, { description: '' });
|
|
96
112
|
await builder.read(transportRequest);
|
|
97
|
-
|
|
113
|
+
this.state.readResult = builder.getState().readResult;
|
|
114
|
+
return this;
|
|
98
115
|
}
|
|
99
116
|
}
|
|
100
117
|
exports.ReadOnlyClient = ReadOnlyClient;
|
package/package.json
CHANGED