@mcp-abap-adt/adt-clients 0.1.6 → 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 +1 -2
- package/dist/clients/CrudClient.d.ts.map +1 -1
- package/dist/clients/CrudClient.js +117 -118
- 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;
|
|
@@ -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;IA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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"}
|
|
@@ -54,156 +54,155 @@ const functionModule_1 = require("../core/functionModule");
|
|
|
54
54
|
const package_1 = require("../core/package");
|
|
55
55
|
const transport_1 = require("../core/transport");
|
|
56
56
|
class CrudClient extends ReadOnlyClient_1.ReadOnlyClient {
|
|
57
|
-
|
|
57
|
+
crudState = {};
|
|
58
58
|
constructor(connection) {
|
|
59
59
|
super(connection);
|
|
60
60
|
}
|
|
61
|
-
// State getters
|
|
62
|
-
getCreateResult() { return this.
|
|
63
|
-
getLockHandle() { return this.
|
|
64
|
-
getUnlockResult() { return this.
|
|
65
|
-
getUpdateResult() { return this.
|
|
66
|
-
getActivateResult() { return this.
|
|
67
|
-
getCheckResult() { return this.
|
|
68
|
-
getValidationResult() { return this.
|
|
69
|
-
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; }
|
|
70
69
|
// ==================== Program operations ====================
|
|
71
70
|
async createProgram(programName, description, packageName, transportRequest, options) {
|
|
72
71
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description, packageName, transportRequest, ...options });
|
|
73
72
|
await builder.create();
|
|
74
|
-
this.
|
|
73
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
75
74
|
return this;
|
|
76
75
|
}
|
|
77
76
|
async lockProgram(programName) {
|
|
78
77
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
79
78
|
await builder.lock();
|
|
80
|
-
this.
|
|
79
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
81
80
|
return this;
|
|
82
81
|
}
|
|
83
82
|
async unlockProgram(programName, lockHandle) {
|
|
84
83
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
85
|
-
builder.lockHandle = lockHandle || this.
|
|
84
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
86
85
|
await builder.unlock();
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
86
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
87
|
+
this.crudState.lockHandle = undefined;
|
|
89
88
|
return this;
|
|
90
89
|
}
|
|
91
90
|
async updateProgram(programName, sourceCode, lockHandle) {
|
|
92
91
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '', sourceCode });
|
|
93
|
-
builder.lockHandle = lockHandle || this.
|
|
92
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
94
93
|
await builder.update();
|
|
95
|
-
this.
|
|
94
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
96
95
|
return this;
|
|
97
96
|
}
|
|
98
97
|
async activateProgram(programName) {
|
|
99
98
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
100
99
|
await builder.activate();
|
|
101
|
-
this.
|
|
100
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
102
101
|
return this;
|
|
103
102
|
}
|
|
104
103
|
async checkProgram(programName) {
|
|
105
104
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
106
105
|
await builder.check();
|
|
107
|
-
this.
|
|
106
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
108
107
|
return this;
|
|
109
108
|
}
|
|
110
109
|
async validateProgram(programName) {
|
|
111
110
|
const builder = new program_1.ProgramBuilder(this.connection, {}, { programName, description: '' });
|
|
112
111
|
await builder.validate();
|
|
113
|
-
this.
|
|
112
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
114
113
|
return this;
|
|
115
114
|
}
|
|
116
115
|
// ==================== Class operations ====================
|
|
117
116
|
async createClass(className, description, packageName, transportRequest, options) {
|
|
118
117
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description, packageName, transportRequest, ...options });
|
|
119
118
|
await builder.create();
|
|
120
|
-
this.
|
|
119
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
121
120
|
return this;
|
|
122
121
|
}
|
|
123
122
|
async lockClass(className) {
|
|
124
123
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
125
124
|
await builder.lock();
|
|
126
|
-
this.
|
|
125
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
127
126
|
return this;
|
|
128
127
|
}
|
|
129
128
|
async unlockClass(className, lockHandle) {
|
|
130
129
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
131
|
-
builder.lockHandle = lockHandle || this.
|
|
130
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
132
131
|
await builder.unlock();
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
132
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
133
|
+
this.crudState.lockHandle = undefined;
|
|
135
134
|
return this;
|
|
136
135
|
}
|
|
137
136
|
async updateClass(className, sourceCode, lockHandle) {
|
|
138
137
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
139
|
-
builder.lockHandle = lockHandle || this.
|
|
138
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
140
139
|
builder.setCode(sourceCode);
|
|
141
140
|
await builder.update();
|
|
142
|
-
this.
|
|
141
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
143
142
|
return this;
|
|
144
143
|
}
|
|
145
144
|
async activateClass(className) {
|
|
146
145
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
147
146
|
await builder.activate();
|
|
148
|
-
this.
|
|
147
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
149
148
|
return this;
|
|
150
149
|
}
|
|
151
150
|
async checkClass(className) {
|
|
152
151
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
153
152
|
await builder.check();
|
|
154
|
-
this.
|
|
153
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
155
154
|
return this;
|
|
156
155
|
}
|
|
157
156
|
async validateClass(className) {
|
|
158
157
|
const builder = new class_1.ClassBuilder(this.connection, {}, { className, description: '' });
|
|
159
158
|
await builder.validate();
|
|
160
|
-
this.
|
|
159
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
161
160
|
return this;
|
|
162
161
|
}
|
|
163
162
|
// ==================== Interface operations ====================
|
|
164
163
|
async createInterface(interfaceName, description, packageName, transportRequest, options) {
|
|
165
164
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description, packageName, transportRequest, ...options });
|
|
166
165
|
await builder.create();
|
|
167
|
-
this.
|
|
166
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
168
167
|
return this;
|
|
169
168
|
}
|
|
170
169
|
async lockInterface(interfaceName) {
|
|
171
170
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
172
171
|
await builder.lock();
|
|
173
|
-
this.
|
|
172
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
174
173
|
return this;
|
|
175
174
|
}
|
|
176
175
|
async unlockInterface(interfaceName, lockHandle) {
|
|
177
176
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
178
|
-
builder.lockHandle = lockHandle || this.
|
|
177
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
179
178
|
await builder.unlock();
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
179
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
180
|
+
this.crudState.lockHandle = undefined;
|
|
182
181
|
return this;
|
|
183
182
|
}
|
|
184
183
|
async updateInterface(interfaceName, sourceCode, lockHandle) {
|
|
185
184
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '', sourceCode });
|
|
186
|
-
builder.lockHandle = lockHandle || this.
|
|
185
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
187
186
|
await builder.update();
|
|
188
|
-
this.
|
|
187
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
189
188
|
return this;
|
|
190
189
|
}
|
|
191
190
|
async activateInterface(interfaceName) {
|
|
192
191
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
193
192
|
await builder.activate();
|
|
194
|
-
this.
|
|
193
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
195
194
|
return this;
|
|
196
195
|
}
|
|
197
196
|
async checkInterface(interfaceName) {
|
|
198
197
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
199
198
|
await builder.check();
|
|
200
|
-
this.
|
|
199
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
201
200
|
return this;
|
|
202
201
|
}
|
|
203
202
|
async validateInterface(interfaceName) {
|
|
204
203
|
const builder = new interface_1.InterfaceBuilder(this.connection, {}, { interfaceName, description: '' });
|
|
205
204
|
await builder.validate();
|
|
206
|
-
this.
|
|
205
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
207
206
|
return this;
|
|
208
207
|
}
|
|
209
208
|
// ==================== FunctionModule operations ====================
|
|
@@ -216,349 +215,349 @@ class CrudClient extends ReadOnlyClient_1.ReadOnlyClient {
|
|
|
216
215
|
transportRequest
|
|
217
216
|
});
|
|
218
217
|
await builder.create();
|
|
219
|
-
this.
|
|
218
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
220
219
|
return this;
|
|
221
220
|
}
|
|
222
221
|
async lockFunctionModule(functionModuleName, functionGroupName) {
|
|
223
222
|
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
224
223
|
await builder.lock();
|
|
225
|
-
this.
|
|
224
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
226
225
|
return this;
|
|
227
226
|
}
|
|
228
227
|
async unlockFunctionModule(functionModuleName, functionGroupName, lockHandle) {
|
|
229
228
|
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
230
|
-
builder.lockHandle = lockHandle || this.
|
|
229
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
231
230
|
await builder.unlock();
|
|
232
|
-
this.
|
|
233
|
-
this.
|
|
231
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
232
|
+
this.crudState.lockHandle = undefined;
|
|
234
233
|
return this;
|
|
235
234
|
}
|
|
236
235
|
async updateFunctionModule(functionModuleName, functionGroupName, sourceCode, lockHandle) {
|
|
237
236
|
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '', sourceCode });
|
|
238
|
-
builder.lockHandle = lockHandle || this.
|
|
237
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
239
238
|
await builder.update();
|
|
240
|
-
this.
|
|
239
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
241
240
|
return this;
|
|
242
241
|
}
|
|
243
242
|
async activateFunctionModule(functionModuleName, functionGroupName) {
|
|
244
243
|
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
245
244
|
await builder.activate();
|
|
246
|
-
this.
|
|
245
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
247
246
|
return this;
|
|
248
247
|
}
|
|
249
248
|
async checkFunctionModule(functionModuleName, functionGroupName) {
|
|
250
249
|
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
251
250
|
await builder.check();
|
|
252
|
-
this.
|
|
251
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
253
252
|
return this;
|
|
254
253
|
}
|
|
255
254
|
async validateFunctionModule(functionModuleName, functionGroupName) {
|
|
256
255
|
const builder = new functionModule_1.FunctionModuleBuilder(this.connection, {}, { functionModuleName, functionGroupName, description: '' });
|
|
257
256
|
await builder.validate();
|
|
258
|
-
this.
|
|
257
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
259
258
|
return this;
|
|
260
259
|
}
|
|
261
260
|
// ==================== FunctionGroup operations ====================
|
|
262
261
|
async createFunctionGroup(functionGroupName, description, packageName, transportRequest) {
|
|
263
262
|
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description, packageName, transportRequest });
|
|
264
263
|
await builder.create();
|
|
265
|
-
this.
|
|
264
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
266
265
|
return this;
|
|
267
266
|
}
|
|
268
267
|
async lockFunctionGroup(functionGroupName) {
|
|
269
268
|
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
270
269
|
await builder.lock();
|
|
271
|
-
this.
|
|
270
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
272
271
|
return this;
|
|
273
272
|
}
|
|
274
273
|
async unlockFunctionGroup(functionGroupName, lockHandle) {
|
|
275
274
|
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
276
|
-
builder.lockHandle = lockHandle || this.
|
|
275
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
277
276
|
await builder.unlock();
|
|
278
|
-
this.
|
|
279
|
-
this.
|
|
277
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
278
|
+
this.crudState.lockHandle = undefined;
|
|
280
279
|
return this;
|
|
281
280
|
}
|
|
282
281
|
async activateFunctionGroup(functionGroupName) {
|
|
283
282
|
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
284
283
|
await builder.activate();
|
|
285
|
-
this.
|
|
284
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
286
285
|
return this;
|
|
287
286
|
}
|
|
288
287
|
async checkFunctionGroup(functionGroupName) {
|
|
289
288
|
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
290
289
|
await builder.check();
|
|
291
|
-
this.
|
|
290
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
292
291
|
return this;
|
|
293
292
|
}
|
|
294
293
|
async validateFunctionGroup(functionGroupName) {
|
|
295
294
|
const builder = new functionGroup_1.FunctionGroupBuilder(this.connection, {}, { functionGroupName, description: '' });
|
|
296
295
|
await builder.validate();
|
|
297
|
-
this.
|
|
296
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
298
297
|
return this;
|
|
299
298
|
}
|
|
300
299
|
// ==================== DataElement operations ====================
|
|
301
300
|
async createDataElement(dataElementName, description, packageName, transportRequest) {
|
|
302
301
|
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description, packageName, transportRequest });
|
|
303
302
|
await builder.create();
|
|
304
|
-
this.
|
|
303
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
305
304
|
return this;
|
|
306
305
|
}
|
|
307
306
|
async lockDataElement(dataElementName) {
|
|
308
307
|
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
309
308
|
await builder.lock();
|
|
310
|
-
this.
|
|
309
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
311
310
|
return this;
|
|
312
311
|
}
|
|
313
312
|
async unlockDataElement(dataElementName, lockHandle) {
|
|
314
313
|
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
315
|
-
builder.lockHandle = lockHandle || this.
|
|
314
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
316
315
|
await builder.unlock();
|
|
317
|
-
this.
|
|
318
|
-
this.
|
|
316
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
317
|
+
this.crudState.lockHandle = undefined;
|
|
319
318
|
return this;
|
|
320
319
|
}
|
|
321
320
|
async updateDataElement(dataElementName, properties, lockHandle) {
|
|
322
321
|
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '', ...properties });
|
|
323
|
-
builder.lockHandle = lockHandle || this.
|
|
322
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
324
323
|
await builder.update();
|
|
325
|
-
this.
|
|
324
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
326
325
|
return this;
|
|
327
326
|
}
|
|
328
327
|
async activateDataElement(dataElementName) {
|
|
329
328
|
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
330
329
|
await builder.activate();
|
|
331
|
-
this.
|
|
330
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
332
331
|
return this;
|
|
333
332
|
}
|
|
334
333
|
async checkDataElement(dataElementName) {
|
|
335
334
|
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
336
335
|
await builder.check();
|
|
337
|
-
this.
|
|
336
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
338
337
|
return this;
|
|
339
338
|
}
|
|
340
339
|
async validateDataElement(dataElementName) {
|
|
341
340
|
const builder = new dataElement_1.DataElementBuilder(this.connection, {}, { dataElementName, description: '' });
|
|
342
341
|
await builder.validate();
|
|
343
|
-
this.
|
|
342
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
344
343
|
return this;
|
|
345
344
|
}
|
|
346
345
|
// ==================== Domain operations ====================
|
|
347
346
|
async createDomain(domainName, description, packageName, transportRequest) {
|
|
348
347
|
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description, packageName, transportRequest });
|
|
349
348
|
await builder.create();
|
|
350
|
-
this.
|
|
349
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
351
350
|
return this;
|
|
352
351
|
}
|
|
353
352
|
async lockDomain(domainName) {
|
|
354
353
|
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
355
354
|
await builder.lock();
|
|
356
|
-
this.
|
|
355
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
357
356
|
return this;
|
|
358
357
|
}
|
|
359
358
|
async unlockDomain(domainName, lockHandle) {
|
|
360
359
|
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
361
|
-
builder.lockHandle = lockHandle || this.
|
|
360
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
362
361
|
await builder.unlock();
|
|
363
|
-
this.
|
|
364
|
-
this.
|
|
362
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
363
|
+
this.crudState.lockHandle = undefined;
|
|
365
364
|
return this;
|
|
366
365
|
}
|
|
367
366
|
async updateDomain(domainName, properties, lockHandle) {
|
|
368
367
|
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '', ...properties });
|
|
369
|
-
builder.lockHandle = lockHandle || this.
|
|
368
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
370
369
|
await builder.update();
|
|
371
|
-
this.
|
|
370
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
372
371
|
return this;
|
|
373
372
|
}
|
|
374
373
|
async activateDomain(domainName) {
|
|
375
374
|
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
376
375
|
await builder.activate();
|
|
377
|
-
this.
|
|
376
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
378
377
|
return this;
|
|
379
378
|
}
|
|
380
379
|
async checkDomain(domainName) {
|
|
381
380
|
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
382
381
|
await builder.check();
|
|
383
|
-
this.
|
|
382
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
384
383
|
return this;
|
|
385
384
|
}
|
|
386
385
|
async validateDomain(domainName) {
|
|
387
386
|
const builder = new domain_1.DomainBuilder(this.connection, {}, { domainName, description: '' });
|
|
388
387
|
await builder.validate();
|
|
389
|
-
this.
|
|
388
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
390
389
|
return this;
|
|
391
390
|
}
|
|
392
391
|
// ==================== Structure operations ====================
|
|
393
392
|
async createStructure(structureName, description, packageName, transportRequest) {
|
|
394
393
|
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description, packageName, transportRequest });
|
|
395
394
|
await builder.create();
|
|
396
|
-
this.
|
|
395
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
397
396
|
return this;
|
|
398
397
|
}
|
|
399
398
|
async lockStructure(structureName) {
|
|
400
399
|
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
401
400
|
await builder.lock();
|
|
402
|
-
this.
|
|
401
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
403
402
|
return this;
|
|
404
403
|
}
|
|
405
404
|
async unlockStructure(structureName, lockHandle) {
|
|
406
405
|
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
407
|
-
builder.lockHandle = lockHandle || this.
|
|
406
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
408
407
|
await builder.unlock();
|
|
409
|
-
this.
|
|
410
|
-
this.
|
|
408
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
409
|
+
this.crudState.lockHandle = undefined;
|
|
411
410
|
return this;
|
|
412
411
|
}
|
|
413
412
|
async updateStructure(structureName, ddlCode, lockHandle) {
|
|
414
413
|
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '', ddlCode });
|
|
415
|
-
builder.lockHandle = lockHandle || this.
|
|
414
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
416
415
|
await builder.update();
|
|
417
|
-
this.
|
|
416
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
418
417
|
return this;
|
|
419
418
|
}
|
|
420
419
|
async activateStructure(structureName) {
|
|
421
420
|
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
422
421
|
await builder.activate();
|
|
423
|
-
this.
|
|
422
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
424
423
|
return this;
|
|
425
424
|
}
|
|
426
425
|
async checkStructure(structureName) {
|
|
427
426
|
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
428
427
|
await builder.check();
|
|
429
|
-
this.
|
|
428
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
430
429
|
return this;
|
|
431
430
|
}
|
|
432
431
|
async validateStructure(structureName) {
|
|
433
432
|
const builder = new structure_1.StructureBuilder(this.connection, {}, { structureName, description: '' });
|
|
434
433
|
await builder.validate();
|
|
435
|
-
this.
|
|
434
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
436
435
|
return this;
|
|
437
436
|
}
|
|
438
437
|
// ==================== Table operations ====================
|
|
439
438
|
async createTable(tableName, packageName, transportRequest) {
|
|
440
439
|
const builder = new table_1.TableBuilder(this.connection, {}, { tableName, packageName, transportRequest });
|
|
441
440
|
await builder.create();
|
|
442
|
-
this.
|
|
441
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
443
442
|
return this;
|
|
444
443
|
}
|
|
445
444
|
async lockTable(tableName) {
|
|
446
445
|
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
447
446
|
await builder.lock();
|
|
448
|
-
this.
|
|
447
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
449
448
|
return this;
|
|
450
449
|
}
|
|
451
450
|
async unlockTable(tableName, lockHandle) {
|
|
452
451
|
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
453
|
-
builder.lockHandle = lockHandle || this.
|
|
452
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
454
453
|
await builder.unlock();
|
|
455
|
-
this.
|
|
456
|
-
this.
|
|
454
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
455
|
+
this.crudState.lockHandle = undefined;
|
|
457
456
|
return this;
|
|
458
457
|
}
|
|
459
458
|
async updateTable(tableName, ddlCode, lockHandle) {
|
|
460
459
|
const builder = new table_1.TableBuilder(this.connection, {}, { tableName, ddlCode });
|
|
461
|
-
builder.lockHandle = lockHandle || this.
|
|
460
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
462
461
|
await builder.update();
|
|
463
|
-
this.
|
|
462
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
464
463
|
return this;
|
|
465
464
|
}
|
|
466
465
|
async activateTable(tableName) {
|
|
467
466
|
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
468
467
|
await builder.activate();
|
|
469
|
-
this.
|
|
468
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
470
469
|
return this;
|
|
471
470
|
}
|
|
472
471
|
async checkTable(tableName) {
|
|
473
472
|
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
474
473
|
await builder.check();
|
|
475
|
-
this.
|
|
474
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
476
475
|
return this;
|
|
477
476
|
}
|
|
478
477
|
async validateTable(tableName) {
|
|
479
478
|
const builder = new table_1.TableBuilder(this.connection, {}, { tableName });
|
|
480
479
|
await builder.validate();
|
|
481
|
-
this.
|
|
480
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
482
481
|
return this;
|
|
483
482
|
}
|
|
484
483
|
// ==================== View operations ====================
|
|
485
484
|
async createView(viewName, description, packageName, transportRequest) {
|
|
486
485
|
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description, packageName, transportRequest });
|
|
487
486
|
await builder.create();
|
|
488
|
-
this.
|
|
487
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
489
488
|
return this;
|
|
490
489
|
}
|
|
491
490
|
async lockView(viewName) {
|
|
492
491
|
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
493
492
|
await builder.lock();
|
|
494
|
-
this.
|
|
493
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
495
494
|
return this;
|
|
496
495
|
}
|
|
497
496
|
async unlockView(viewName, lockHandle) {
|
|
498
497
|
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
499
|
-
builder.lockHandle = lockHandle || this.
|
|
498
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
500
499
|
await builder.unlock();
|
|
501
|
-
this.
|
|
502
|
-
this.
|
|
500
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
501
|
+
this.crudState.lockHandle = undefined;
|
|
503
502
|
return this;
|
|
504
503
|
}
|
|
505
504
|
async updateView(viewName, ddlSource, lockHandle) {
|
|
506
505
|
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '', ddlSource });
|
|
507
|
-
builder.lockHandle = lockHandle || this.
|
|
506
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
508
507
|
await builder.update();
|
|
509
|
-
this.
|
|
508
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
510
509
|
return this;
|
|
511
510
|
}
|
|
512
511
|
async activateView(viewName) {
|
|
513
512
|
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
514
513
|
await builder.activate();
|
|
515
|
-
this.
|
|
514
|
+
this.crudState.activateResult = builder.getState().activateResult;
|
|
516
515
|
return this;
|
|
517
516
|
}
|
|
518
517
|
async checkView(viewName) {
|
|
519
518
|
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
520
519
|
await builder.check();
|
|
521
|
-
this.
|
|
520
|
+
this.crudState.checkResult = builder.getState().checkResult;
|
|
522
521
|
return this;
|
|
523
522
|
}
|
|
524
523
|
async validateView(viewName) {
|
|
525
524
|
const builder = new view_1.ViewBuilder(this.connection, {}, { viewName, description: '' });
|
|
526
525
|
await builder.validate();
|
|
527
|
-
this.
|
|
526
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
528
527
|
return this;
|
|
529
528
|
}
|
|
530
529
|
// ==================== Package operations ====================
|
|
531
530
|
async createPackage(packageName, superPackage, description, transportRequest) {
|
|
532
531
|
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description, transportRequest });
|
|
533
532
|
await builder.create();
|
|
534
|
-
this.
|
|
533
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
535
534
|
return this;
|
|
536
535
|
}
|
|
537
536
|
async validatePackage(packageName, superPackage) {
|
|
538
537
|
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '' });
|
|
539
538
|
await builder.validate();
|
|
540
|
-
this.
|
|
539
|
+
this.crudState.validationResult = builder.getState().validationResult;
|
|
541
540
|
return this;
|
|
542
541
|
}
|
|
543
542
|
async lockPackage(packageName, superPackage) {
|
|
544
543
|
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '' });
|
|
545
544
|
await builder.lock();
|
|
546
|
-
this.
|
|
545
|
+
this.crudState.lockHandle = builder.getState().lockHandle;
|
|
547
546
|
return this;
|
|
548
547
|
}
|
|
549
548
|
async unlockPackage(packageName, superPackage, lockHandle) {
|
|
550
549
|
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '' });
|
|
551
|
-
builder.lockHandle = lockHandle || this.
|
|
550
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
552
551
|
await builder.unlock();
|
|
553
|
-
this.
|
|
554
|
-
this.
|
|
552
|
+
this.crudState.unlockResult = builder.getState().unlockResult;
|
|
553
|
+
this.crudState.lockHandle = undefined;
|
|
555
554
|
return this;
|
|
556
555
|
}
|
|
557
556
|
async updatePackage(packageName, superPackage, updatedDescription, lockHandle) {
|
|
558
557
|
const builder = new package_1.PackageBuilder(this.connection, {}, { packageName, superPackage, description: '', updatedDescription });
|
|
559
|
-
builder.lockHandle = lockHandle || this.
|
|
558
|
+
builder.lockHandle = lockHandle || this.crudState.lockHandle;
|
|
560
559
|
await builder.update();
|
|
561
|
-
this.
|
|
560
|
+
this.crudState.updateResult = builder.getState().updateResult;
|
|
562
561
|
return this;
|
|
563
562
|
}
|
|
564
563
|
async checkPackage(packageName, superPackage) {
|
|
@@ -571,7 +570,7 @@ class CrudClient extends ReadOnlyClient_1.ReadOnlyClient {
|
|
|
571
570
|
async createTransport(description, transportType) {
|
|
572
571
|
const builder = new transport_1.TransportBuilder(this.connection, {}, { description, transportType });
|
|
573
572
|
await builder.create();
|
|
574
|
-
this.
|
|
573
|
+
this.crudState.createResult = builder.getState().createResult;
|
|
575
574
|
return this;
|
|
576
575
|
}
|
|
577
576
|
// ==================== Batch operations ====================
|
|
@@ -582,7 +581,7 @@ class CrudClient extends ReadOnlyClient_1.ReadOnlyClient {
|
|
|
582
581
|
async activateObjectsGroup(objects, preaudit = true) {
|
|
583
582
|
const { activateObjectsGroup } = await Promise.resolve().then(() => __importStar(require('../core/managementOperations')));
|
|
584
583
|
const result = await activateObjectsGroup(this.connection, objects, preaudit);
|
|
585
|
-
this.
|
|
584
|
+
this.crudState.activateResult = result;
|
|
586
585
|
return result;
|
|
587
586
|
}
|
|
588
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