@mcp-abap-adt/adt-clients 37.2.0 → 37.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +21 -10
  2. package/dist/clients/AdtClient.d.ts +8 -4
  3. package/dist/clients/AdtClient.d.ts.map +1 -1
  4. package/dist/clients/AdtClient.js +7 -3
  5. package/dist/clients/AdtClientLegacy.d.ts +36 -9
  6. package/dist/clients/AdtClientLegacy.d.ts.map +1 -1
  7. package/dist/clients/AdtClientLegacy.js +89 -22
  8. package/dist/clients/AdtExecutorLegacy.d.ts +24 -7
  9. package/dist/clients/AdtExecutorLegacy.d.ts.map +1 -1
  10. package/dist/clients/AdtExecutorLegacy.js +26 -9
  11. package/dist/clients/absentOnLegacy.d.ts +13 -5
  12. package/dist/clients/absentOnLegacy.d.ts.map +1 -1
  13. package/dist/clients/absentOnLegacy.js +18 -9
  14. package/dist/clients/createAdtClient.d.ts +5 -4
  15. package/dist/clients/createAdtClient.d.ts.map +1 -1
  16. package/dist/clients/createAdtClient.js +5 -4
  17. package/dist/clients/createAdtExecutor.d.ts +2 -1
  18. package/dist/clients/createAdtExecutor.d.ts.map +1 -1
  19. package/dist/clients/createAdtExecutor.js +2 -1
  20. package/dist/core/class/AdtClassLegacy.d.ts +21 -19
  21. package/dist/core/class/AdtClassLegacy.d.ts.map +1 -1
  22. package/dist/core/class/AdtClassLegacy.js +22 -20
  23. package/dist/core/class/run.d.ts +3 -3
  24. package/dist/core/class/run.js +3 -3
  25. package/dist/core/ddl/AdtDdlLegacy.d.ts +23 -1
  26. package/dist/core/ddl/AdtDdlLegacy.d.ts.map +1 -1
  27. package/dist/core/ddl/AdtDdlLegacy.js +24 -1
  28. package/dist/core/functionGroup/AdtFunctionGroupLegacy.d.ts +24 -1
  29. package/dist/core/functionGroup/AdtFunctionGroupLegacy.d.ts.map +1 -1
  30. package/dist/core/functionGroup/AdtFunctionGroupLegacy.js +25 -1
  31. package/dist/core/functionInclude/AdtFunctionIncludeLegacy.d.ts +24 -0
  32. package/dist/core/functionInclude/AdtFunctionIncludeLegacy.d.ts.map +1 -0
  33. package/dist/core/functionInclude/AdtFunctionIncludeLegacy.js +26 -0
  34. package/dist/core/functionModule/AdtFunctionModuleLegacy.d.ts +23 -1
  35. package/dist/core/functionModule/AdtFunctionModuleLegacy.d.ts.map +1 -1
  36. package/dist/core/functionModule/AdtFunctionModuleLegacy.js +24 -1
  37. package/dist/core/include/AdtIncludeLegacy.d.ts +23 -0
  38. package/dist/core/include/AdtIncludeLegacy.d.ts.map +1 -0
  39. package/dist/core/include/AdtIncludeLegacy.js +25 -0
  40. package/dist/core/interface/AdtInterfaceLegacy.d.ts +24 -1
  41. package/dist/core/interface/AdtInterfaceLegacy.d.ts.map +1 -1
  42. package/dist/core/interface/AdtInterfaceLegacy.js +25 -1
  43. package/dist/core/messageClass/AdtMessageClassLegacy.d.ts +23 -0
  44. package/dist/core/messageClass/AdtMessageClassLegacy.d.ts.map +1 -0
  45. package/dist/core/messageClass/AdtMessageClassLegacy.js +25 -0
  46. package/dist/core/package/AdtPackageLegacy.d.ts +30 -4
  47. package/dist/core/package/AdtPackageLegacy.d.ts.map +1 -1
  48. package/dist/core/package/AdtPackageLegacy.js +38 -3
  49. package/dist/core/program/AdtProgramLegacy.d.ts +24 -1
  50. package/dist/core/program/AdtProgramLegacy.d.ts.map +1 -1
  51. package/dist/core/program/AdtProgramLegacy.js +25 -1
  52. package/dist/core/shared/AdtUtilsLegacy.d.ts +96 -8
  53. package/dist/core/shared/AdtUtilsLegacy.d.ts.map +1 -1
  54. package/dist/core/shared/AdtUtilsLegacy.js +166 -10
  55. package/dist/core/shared/abapUnit.d.ts +4 -5
  56. package/dist/core/shared/abapUnit.d.ts.map +1 -1
  57. package/dist/core/shared/abapUnit.js +4 -5
  58. package/dist/core/shared/deleteLegacy.d.ts +13 -6
  59. package/dist/core/shared/deleteLegacy.d.ts.map +1 -1
  60. package/dist/core/shared/deleteLegacy.js +13 -6
  61. package/dist/core/shared/refusalLegacy.d.ts +37 -0
  62. package/dist/core/shared/refusalLegacy.d.ts.map +1 -0
  63. package/dist/core/shared/refusalLegacy.js +68 -0
  64. package/dist/core/transport/AdtRequestLegacy.d.ts +59 -11
  65. package/dist/core/transport/AdtRequestLegacy.d.ts.map +1 -1
  66. package/dist/core/transport/AdtRequestLegacy.js +62 -10
  67. package/dist/executors/abapUnitRunLegacy.d.ts +25 -0
  68. package/dist/executors/abapUnitRunLegacy.d.ts.map +1 -0
  69. package/dist/executors/abapUnitRunLegacy.js +45 -0
  70. package/dist/executors/abapUnitRunner.d.ts +0 -5
  71. package/dist/executors/abapUnitRunner.d.ts.map +1 -1
  72. package/dist/executors/abapUnitRunner.js +0 -13
  73. package/dist/executors/class/ClassExecutorLegacy.d.ts +24 -0
  74. package/dist/executors/class/ClassExecutorLegacy.d.ts.map +1 -0
  75. package/dist/executors/class/ClassExecutorLegacy.js +38 -0
  76. package/dist/executors/class/ClassTestRunnerLegacy.d.ts +10 -18
  77. package/dist/executors/class/ClassTestRunnerLegacy.d.ts.map +1 -1
  78. package/dist/executors/class/ClassTestRunnerLegacy.js +15 -34
  79. package/dist/executors/class/index.d.ts +1 -0
  80. package/dist/executors/class/index.d.ts.map +1 -1
  81. package/dist/executors/class/index.js +3 -1
  82. package/dist/executors/functionGroup/FunctionGroupTestRunner.d.ts +0 -11
  83. package/dist/executors/functionGroup/FunctionGroupTestRunner.d.ts.map +1 -1
  84. package/dist/executors/functionGroup/FunctionGroupTestRunner.js +1 -21
  85. package/dist/executors/functionGroup/FunctionGroupTestRunnerLegacy.d.ts +18 -0
  86. package/dist/executors/functionGroup/FunctionGroupTestRunnerLegacy.d.ts.map +1 -0
  87. package/dist/executors/functionGroup/FunctionGroupTestRunnerLegacy.js +28 -0
  88. package/dist/executors/functionGroup/index.d.ts +2 -1
  89. package/dist/executors/functionGroup/index.d.ts.map +1 -1
  90. package/dist/executors/functionGroup/index.js +3 -2
  91. package/dist/executors/functionModule/FunctionModuleTestRunner.d.ts +0 -11
  92. package/dist/executors/functionModule/FunctionModuleTestRunner.d.ts.map +1 -1
  93. package/dist/executors/functionModule/FunctionModuleTestRunner.js +1 -21
  94. package/dist/executors/functionModule/FunctionModuleTestRunnerLegacy.d.ts +19 -0
  95. package/dist/executors/functionModule/FunctionModuleTestRunnerLegacy.d.ts.map +1 -0
  96. package/dist/executors/functionModule/FunctionModuleTestRunnerLegacy.js +34 -0
  97. package/dist/executors/functionModule/index.d.ts +2 -1
  98. package/dist/executors/functionModule/index.d.ts.map +1 -1
  99. package/dist/executors/functionModule/index.js +3 -2
  100. package/dist/executors/index.d.ts +2 -2
  101. package/dist/executors/index.d.ts.map +1 -1
  102. package/dist/executors/index.js +3 -1
  103. package/dist/executors/program/ProgramExecutorLegacy.d.ts +23 -0
  104. package/dist/executors/program/ProgramExecutorLegacy.d.ts.map +1 -0
  105. package/dist/executors/program/ProgramExecutorLegacy.js +37 -0
  106. package/dist/executors/program/ProgramTestRunner.d.ts +1 -2
  107. package/dist/executors/program/ProgramTestRunner.d.ts.map +1 -1
  108. package/dist/executors/program/ProgramTestRunner.js +1 -2
  109. package/dist/executors/program/ProgramTestRunnerLegacy.d.ts +8 -11
  110. package/dist/executors/program/ProgramTestRunnerLegacy.d.ts.map +1 -1
  111. package/dist/executors/program/ProgramTestRunnerLegacy.js +12 -16
  112. package/dist/executors/program/index.d.ts +1 -0
  113. package/dist/executors/program/index.d.ts.map +1 -1
  114. package/dist/executors/program/index.js +3 -1
  115. package/dist/utils/discoveryEndpoints.d.ts +2 -1
  116. package/dist/utils/discoveryEndpoints.d.ts.map +1 -1
  117. package/dist/utils/discoveryEndpoints.js +2 -1
  118. package/docs/usage/ADT_OBJECT_ENTITIES.md +9 -9
  119. package/docs/usage/CLIENT_API_REFERENCE.md +64 -9
  120. package/docs/usage/MIGRATION-24.md +4 -2
  121. package/docs/usage/OBJECT_LIFECYCLE.md +38 -1
  122. package/docs/usage/OPERATION_DELAYS.md +1 -1
  123. package/docs/usage/OPERATION_DELAYS_SUMMARY.md +1 -1
  124. package/docs/usage/RFC_CONNECTION.md +20 -21
  125. package/docs/usage/STATEFUL_SESSION_GUIDE.md +1 -1
  126. package/package.json +8 -5
@@ -1,10 +1,17 @@
1
1
  "use strict";
2
2
  /**
3
- * AdtClientLegacy - ADT Client for older SAP systems (BASIS < 7.50)
3
+ * AdtClientLegacy - ADT Client for older SAP systems (BASIS < 7.50), over RFC
4
+ *
5
+ * Supported and measured over RFC only (SAP_BASIS 7.40 SP04); the library does
6
+ * not detect or branch on the wire, and HTTP to a legacy system is unsupported.
4
7
  *
5
8
  * Extends AdtClient and overrides methods that differ on legacy systems:
6
9
  * - Object types absent on legacy answer a refusal from every member, without a request
7
- * - Supported types use legacy-compatible deletion (direct DELETE vs /deletion/delete)
10
+ * - The class, program, interface, function group, function module and DDL
11
+ * source delete with a direct DELETE under the object's lock handle (the
12
+ * caller's, from lock()) instead of /deletion/delete; every checkDeletion,
13
+ * and the deletes that need /sap/bc/adt/deletion/* (include, function
14
+ * include, message class, group delete), are refused without a request
8
15
  * - Content-Type defaults to v1 (AdtContentTypesBase)
9
16
  * - Transport requests use /sap/bc/cts/ instead of /sap/bc/adt/cts/
10
17
  *
@@ -16,6 +23,7 @@
16
23
  Object.defineProperty(exports, "__esModule", { value: true });
17
24
  exports.AdtClientLegacy = void 0;
18
25
  const accessControl_1 = require("../core/accessControl");
26
+ const appendStructure_1 = require("../core/appendStructure");
19
27
  const authorizationField_1 = require("../core/authorizationField");
20
28
  const behaviorDefinition_1 = require("../core/behaviorDefinition");
21
29
  const behaviorImplementation_1 = require("../core/behaviorImplementation");
@@ -29,15 +37,23 @@ const enhancement_1 = require("../core/enhancement");
29
37
  const featureToggle_1 = require("../core/featureToggle");
30
38
  const functionGroup_1 = require("../core/functionGroup");
31
39
  const AdtFunctionGroupLegacy_1 = require("../core/functionGroup/AdtFunctionGroupLegacy");
40
+ const functionInclude_1 = require("../core/functionInclude");
41
+ const AdtFunctionIncludeLegacy_1 = require("../core/functionInclude/AdtFunctionIncludeLegacy");
32
42
  const functionModule_1 = require("../core/functionModule");
33
43
  const AdtFunctionModuleLegacy_1 = require("../core/functionModule/AdtFunctionModuleLegacy");
44
+ const include_1 = require("../core/include");
45
+ const AdtIncludeLegacy_1 = require("../core/include/AdtIncludeLegacy");
34
46
  const interface_1 = require("../core/interface");
35
47
  const AdtInterfaceLegacy_1 = require("../core/interface/AdtInterfaceLegacy");
48
+ const messageClass_1 = require("../core/messageClass");
49
+ const AdtMessageClassLegacy_1 = require("../core/messageClass/AdtMessageClassLegacy");
36
50
  const metadataExtension_1 = require("../core/metadataExtension");
37
51
  const package_1 = require("../core/package");
38
52
  const AdtPackageLegacy_1 = require("../core/package/AdtPackageLegacy");
39
53
  const program_1 = require("../core/program");
40
54
  const AdtProgramLegacy_1 = require("../core/program/AdtProgramLegacy");
55
+ const scalarFunction_1 = require("../core/scalarFunction");
56
+ const scalarFunctionImplementation_1 = require("../core/scalarFunctionImplementation");
41
57
  const service_1 = require("../core/service");
42
58
  const serviceDefinition_1 = require("../core/serviceDefinition");
43
59
  const AdtUtilsLegacy_1 = require("../core/shared/AdtUtilsLegacy");
@@ -46,6 +62,7 @@ const utilResultSet_1 = require("../core/shared/utilResultSet");
46
62
  const structure_1 = require("../core/structure");
47
63
  const table_1 = require("../core/table");
48
64
  const tabletype_1 = require("../core/tabletype");
65
+ const transformation_1 = require("../core/transformation");
49
66
  const transport_1 = require("../core/transport");
50
67
  const AdtRequestLegacy_1 = require("../core/transport/AdtRequestLegacy");
51
68
  const objects_1 = require("../endpoints/objects");
@@ -60,24 +77,43 @@ class AdtClientLegacy extends AdtClient_1.AdtClient {
60
77
  }
61
78
  // --- Supported types with legacy overrides ---
62
79
  getProgram(results = program_1.programDocuments) {
80
+ this.assertConnected();
63
81
  return new AdtProgramLegacy_1.AdtProgramLegacy(this.connection, this.logger, this.systemContext, this.contentTypes, this.lockRegistry, results);
64
82
  }
65
83
  getClass(results = class_1.classDocuments) {
84
+ this.assertConnected();
66
85
  return new AdtClassLegacy_1.AdtClassLegacy(this.connection, this.logger, this.systemContext, this.contentTypes, this.lockRegistry, results);
67
86
  }
87
+ getFunctionInclude(results = functionInclude_1.functionIncludeDocuments) {
88
+ this.assertConnected();
89
+ return new AdtFunctionIncludeLegacy_1.AdtFunctionIncludeLegacy(this.connection, this.logger, this.systemContext, this.contentTypes, this.lockRegistry, results);
90
+ }
91
+ getInclude(results = include_1.includeDocuments) {
92
+ this.assertConnected();
93
+ return new AdtIncludeLegacy_1.AdtIncludeLegacy(this.connection, this.logger, this.contentTypes, results, this.systemContext);
94
+ }
95
+ getMessageClass(results = messageClass_1.messageClassDocuments) {
96
+ this.assertConnected();
97
+ return new AdtMessageClassLegacy_1.AdtMessageClassLegacy(this.connection, this.logger, this.systemContext, this.lockRegistry, results);
98
+ }
68
99
  getInterface(results = interface_1.interfaceDocuments) {
100
+ this.assertConnected();
69
101
  return new AdtInterfaceLegacy_1.AdtInterfaceLegacy(this.connection, this.logger, this.systemContext, this.contentTypes, this.lockRegistry, results);
70
102
  }
71
103
  getFunctionGroup(results = functionGroup_1.functionGroupDocuments) {
104
+ this.assertConnected();
72
105
  return new AdtFunctionGroupLegacy_1.AdtFunctionGroupLegacy(this.connection, this.logger, this.systemContext, this.contentTypes, this.lockRegistry, results);
73
106
  }
74
107
  getFunctionModule(results = functionModule_1.functionModuleDocuments) {
108
+ this.assertConnected();
75
109
  return new AdtFunctionModuleLegacy_1.AdtFunctionModuleLegacy(this.connection, this.logger, this.systemContext, this.contentTypes, this.lockRegistry, results);
76
110
  }
77
111
  getPackage(results = package_1.packageDocuments) {
112
+ this.assertConnected();
78
113
  return new AdtPackageLegacy_1.AdtPackageLegacy(this.connection, this.logger, this.systemContext, this.lockRegistry, results);
79
114
  }
80
115
  getDdl(results = ddl_1.ddlDocuments) {
116
+ this.assertConnected();
81
117
  return new AdtDdlLegacy_1.AdtDdlLegacy(this.connection, this.logger, this.systemContext, this.lockRegistry, results);
82
118
  }
83
119
  // --- Transport with legacy URL prefix ---
@@ -85,12 +121,11 @@ class AdtClientLegacy extends AdtClient_1.AdtClient {
85
121
  * The legacy transport handler.
86
122
  *
87
123
  * The **type** is the base's contract, and that is all this declaration says.
88
- * It is not a claim that the two behave alike: a legacy CTS endpoint serves
89
- * `read` and `list`, while `create`, `update`, `delete` and `listNodes` refuse
90
- * at runtime — `create` because the endpoint accepts no POST that creates a
91
- * request, the rest because nobody has captured whether it supports them and
92
- * guessing against the modern shape is not a contract. `list` differs too: no
93
- * saved-configuration search, and `configUri` is rejected rather than used.
124
+ * It is not a claim that the two behave alike: the legacy handler serves
125
+ * `list` and `readMetadata` (the user's list from `/sap/bc/cts/`), `create`
126
+ * is refused (measured on 7.40 SP04), and the other twelve members refuse
127
+ * without a request. `list` differs too: no saved-configuration search, and
128
+ * `configUri` is rejected rather than used.
94
129
  *
95
130
  * Narrowing this to what the handler offers does not compile: an override's
96
131
  * return must be assignable to the base's, and offering *less* is the one
@@ -102,6 +137,7 @@ class AdtClientLegacy extends AdtClient_1.AdtClient {
102
137
  * and the gap is tracked rather than papered over: #109.
103
138
  */
104
139
  getRequest(results = transport_1.transportDocuments) {
140
+ this.assertConnected();
105
141
  return new AdtRequestLegacy_1.AdtRequestLegacy(this.connection, this.logger, this.systemContext, results);
106
142
  }
107
143
  // --- Utilities with legacy restrictions ---
@@ -122,6 +158,7 @@ class AdtClientLegacy extends AdtClient_1.AdtClient {
122
158
  * be told about a refusal differently.
123
159
  */
124
160
  getUtils(results = utilResultSet_1.utilDocuments) {
161
+ this.assertConnected();
125
162
  return new AdtUtilsLegacy_1.AdtUtilsLegacy(this.connection, this.logger, results);
126
163
  }
127
164
  // --- Types absent from legacy /sap/bc/adt/discovery ---
@@ -129,46 +166,76 @@ class AdtClientLegacy extends AdtClient_1.AdtClient {
129
166
  // Handed out all the same: every member answers a refusal and sends no
130
167
  // request (see absentOnLegacy).
131
168
  getDomain(_results) {
132
- return (0, absentOnLegacy_1.absentOnLegacy)(domain_1.AdtDomain, 'Domain', objects_1.DOMAIN.collection);
169
+ this.assertConnected();
170
+ return (0, absentOnLegacy_1.absentOnLegacy)(domain_1.AdtDomain, 'Domain', objects_1.DOMAIN.collection, 'measured');
133
171
  }
134
172
  getDataElement(_results) {
135
- return (0, absentOnLegacy_1.absentOnLegacy)(dataElement_1.AdtDataElement, 'DataElement', objects_1.DATA_ELEMENT.collection);
173
+ this.assertConnected();
174
+ return (0, absentOnLegacy_1.absentOnLegacy)(dataElement_1.AdtDataElement, 'DataElement', objects_1.DATA_ELEMENT.collection, 'measured');
136
175
  }
137
176
  getStructure(_results) {
138
- return (0, absentOnLegacy_1.absentOnLegacy)(structure_1.AdtStructure, 'Structure', objects_1.STRUCTURE.collection);
177
+ this.assertConnected();
178
+ return (0, absentOnLegacy_1.absentOnLegacy)(structure_1.AdtStructure, 'Structure', objects_1.STRUCTURE.collection, 'measured');
139
179
  }
140
180
  getTable(_results) {
141
- return (0, absentOnLegacy_1.absentOnLegacy)(table_1.AdtTable, 'Table', objects_1.TABLE.collection);
181
+ this.assertConnected();
182
+ return (0, absentOnLegacy_1.absentOnLegacy)(table_1.AdtTable, 'Table', objects_1.TABLE.collection, 'measured');
142
183
  }
143
184
  getTableType(_results) {
144
- return (0, absentOnLegacy_1.absentOnLegacy)(tabletype_1.AdtDdicTableType, 'TableType', objects_1.TABLE_TYPE.collection);
185
+ this.assertConnected();
186
+ return (0, absentOnLegacy_1.absentOnLegacy)(tabletype_1.AdtDdicTableType, 'TableType', objects_1.TABLE_TYPE.collection, 'not-advertised');
145
187
  }
146
188
  getAccessControl(_results) {
147
- return (0, absentOnLegacy_1.absentOnLegacy)(accessControl_1.AdtAccessControl, 'AccessControl', objects_1.ACCESS_CONTROL.collection);
189
+ this.assertConnected();
190
+ return (0, absentOnLegacy_1.absentOnLegacy)(accessControl_1.AdtAccessControl, 'AccessControl', objects_1.ACCESS_CONTROL.collection, 'not-advertised');
148
191
  }
149
192
  getServiceDefinition(_results) {
150
- return (0, absentOnLegacy_1.absentOnLegacy)(serviceDefinition_1.AdtServiceDefinition, 'ServiceDefinition', objects_1.SERVICE_DEFINITION.collection);
193
+ this.assertConnected();
194
+ return (0, absentOnLegacy_1.absentOnLegacy)(serviceDefinition_1.AdtServiceDefinition, 'ServiceDefinition', objects_1.SERVICE_DEFINITION.collection, 'not-advertised');
151
195
  }
152
196
  getServiceBinding(_results) {
153
- return (0, absentOnLegacy_1.absentOnLegacy)(service_1.AdtServiceBinding, 'ServiceBinding', objects_1.SERVICE_BINDING.collection);
197
+ this.assertConnected();
198
+ return (0, absentOnLegacy_1.absentOnLegacy)(service_1.AdtServiceBinding, 'ServiceBinding', objects_1.SERVICE_BINDING.collection, 'not-advertised');
154
199
  }
155
200
  getBehaviorDefinition(_results) {
156
- return (0, absentOnLegacy_1.absentOnLegacy)(behaviorDefinition_1.AdtBehaviorDefinition, 'BehaviorDefinition', objects_1.BEHAVIOR_DEFINITION.collection);
201
+ this.assertConnected();
202
+ return (0, absentOnLegacy_1.absentOnLegacy)(behaviorDefinition_1.AdtBehaviorDefinition, 'BehaviorDefinition', objects_1.BEHAVIOR_DEFINITION.collection, 'not-advertised');
157
203
  }
158
204
  getBehaviorImplementation(_results) {
159
- return (0, absentOnLegacy_1.absentOnLegacy)(behaviorImplementation_1.AdtBehaviorImplementation, 'BehaviorImplementation', objects_1.BEHAVIOR_DEFINITION.collection);
205
+ this.assertConnected();
206
+ return (0, absentOnLegacy_1.absentOnLegacy)(behaviorImplementation_1.AdtBehaviorImplementation, 'BehaviorImplementation', objects_1.BEHAVIOR_DEFINITION.collection, 'not-advertised');
160
207
  }
161
208
  getMetadataExtension(_results) {
162
- return (0, absentOnLegacy_1.absentOnLegacy)(metadataExtension_1.AdtMetadataExtension, 'MetadataExtension', objects_1.METADATA_EXTENSION.collection);
209
+ this.assertConnected();
210
+ return (0, absentOnLegacy_1.absentOnLegacy)(metadataExtension_1.AdtMetadataExtension, 'MetadataExtension', objects_1.METADATA_EXTENSION.collection, 'not-advertised');
163
211
  }
164
212
  getEnhancement(_results) {
165
- return (0, absentOnLegacy_1.absentOnLegacy)(enhancement_1.AdtEnhancement, 'Enhancement', objects_1.ENHANCEMENT.root);
213
+ this.assertConnected();
214
+ return (0, absentOnLegacy_1.absentOnLegacy)(enhancement_1.AdtEnhancement, 'Enhancement', objects_1.ENHANCEMENT.root, 'measured');
166
215
  }
167
216
  getAuthorizationField(_results) {
168
- return (0, absentOnLegacy_1.absentOnLegacy)(authorizationField_1.AdtAuthorizationField, 'AuthorizationField', objects_1.AUTHORIZATION_FIELD.collection);
217
+ this.assertConnected();
218
+ return (0, absentOnLegacy_1.absentOnLegacy)(authorizationField_1.AdtAuthorizationField, 'AuthorizationField', objects_1.AUTHORIZATION_FIELD.collection, 'not-advertised');
169
219
  }
170
220
  getFeatureToggle(_results) {
171
- return (0, absentOnLegacy_1.absentOnLegacy)(featureToggle_1.AdtFeatureToggle, 'FeatureToggle', objects_1.FEATURE_TOGGLE.collection);
221
+ this.assertConnected();
222
+ return (0, absentOnLegacy_1.absentOnLegacy)(featureToggle_1.AdtFeatureToggle, 'FeatureToggle', objects_1.FEATURE_TOGGLE.collection, 'not-advertised');
223
+ }
224
+ getTransformation(_results) {
225
+ this.assertConnected();
226
+ return (0, absentOnLegacy_1.absentOnLegacy)(transformation_1.AdtTransformation, 'Transformation', objects_1.TRANSFORMATION.collection, 'measured');
227
+ }
228
+ getScalarFunction(_results) {
229
+ this.assertConnected();
230
+ return (0, absentOnLegacy_1.absentOnLegacy)(scalarFunction_1.AdtScalarFunction, 'ScalarFunction', objects_1.SCALAR_FUNCTION.collection, 'measured');
231
+ }
232
+ getScalarFunctionImplementation(_results) {
233
+ this.assertConnected();
234
+ return (0, absentOnLegacy_1.absentOnLegacy)(scalarFunctionImplementation_1.AdtScalarFunctionImplementation, 'ScalarFunctionImplementation', objects_1.SCALAR_FUNCTION_IMPLEMENTATION.collection, 'not-advertised');
235
+ }
236
+ getAppendStructure(_results) {
237
+ this.assertConnected();
238
+ return (0, absentOnLegacy_1.absentOnLegacy)(appendStructure_1.AdtAppendStructure, 'AppendStructure', objects_1.STRUCTURE.collection, 'measured');
172
239
  }
173
240
  }
174
241
  exports.AdtClientLegacy = AdtClientLegacy;
@@ -1,19 +1,36 @@
1
1
  /**
2
- * AdtExecutorLegacy — executors for legacy SAP systems (BASIS < 7.50).
2
+ * AdtExecutorLegacy — executors for legacy SAP systems (BASIS < 7.50), over RFC.
3
3
  *
4
- * The ABAP Unit runners differ: a class's tests run on the legacy endpoint
5
- * (`ClassTestRunnerLegacy`); a report's, a function group's and a function
6
- * module's are refused without a request, because that endpoint has not been
7
- * measured to find them. The rest is inherited.
4
+ * The ABAP Unit runners differ: 7.40 has no `/abapunit/runs`, so the
5
+ * `/abapunit/testruns` request with `<options>` is what runs the tests —
6
+ * measured on 7.40 SP04 for a class, a report, a function group and a function
7
+ * module. A class's, a report's and a group's `run` and `runSync` all send it;
8
+ * a function module's `runSync` sends it and its `run` is refused (it names no
9
+ * group); `getStatus` and `getResult` are refused, as there is no run id.
10
+ *
11
+ * The class and program executors refuse their runs and the trace type lists
12
+ * without a request (7.40 has no `/oo/classrun`; `programrun` and the trace
13
+ * catalogues are not advertised and not measured); the trace schedule is
14
+ * inherited, unmeasured.
8
15
  */
16
+ import type { classExecutorDocuments, IClassExecutorResults } from '../executors/class/ClassExecutor';
17
+ import { ClassExecutorLegacy } from '../executors/class/ClassExecutorLegacy';
9
18
  import type { classTestRunnerDocuments, IClassTestRunnerResults } from '../executors/class/ClassTestRunner';
10
19
  import { ClassTestRunnerLegacy } from '../executors/class/ClassTestRunnerLegacy';
11
- import { FunctionGroupTestRunnerLegacy, type functionGroupTestRunnerDocuments, type IFunctionGroupTestRunnerResults } from '../executors/functionGroup/FunctionGroupTestRunner';
12
- import { FunctionModuleTestRunnerLegacy, type functionModuleTestRunnerDocuments, type IFunctionModuleTestRunnerResults } from '../executors/functionModule/FunctionModuleTestRunner';
20
+ import type { functionGroupTestRunnerDocuments, IFunctionGroupTestRunnerResults } from '../executors/functionGroup/FunctionGroupTestRunner';
21
+ import { FunctionGroupTestRunnerLegacy } from '../executors/functionGroup/FunctionGroupTestRunnerLegacy';
22
+ import type { functionModuleTestRunnerDocuments, IFunctionModuleTestRunnerResults } from '../executors/functionModule/FunctionModuleTestRunner';
23
+ import { FunctionModuleTestRunnerLegacy } from '../executors/functionModule/FunctionModuleTestRunnerLegacy';
24
+ import type { IProgramExecutorResults, programExecutorDocuments } from '../executors/program/ProgramExecutor';
25
+ import { ProgramExecutorLegacy } from '../executors/program/ProgramExecutorLegacy';
13
26
  import type { IProgramTestRunnerResults, programTestRunnerDocuments } from '../executors/program/ProgramTestRunner';
14
27
  import { ProgramTestRunnerLegacy } from '../executors/program/ProgramTestRunnerLegacy';
15
28
  import { AdtExecutor } from './AdtExecutor';
16
29
  export declare class AdtExecutorLegacy extends AdtExecutor {
30
+ /** Runs and the trace type lists refuse on 7.40; the trace schedule is inherited. */
31
+ getClassExecutor<R extends IClassExecutorResults = typeof classExecutorDocuments>(results?: R): ClassExecutorLegacy<R>;
32
+ /** Runs and the trace type lists refuse on 7.40; the trace schedule is inherited. */
33
+ getProgramExecutor<R extends IProgramExecutorResults = typeof programExecutorDocuments>(results?: R): ProgramExecutorLegacy<R>;
17
34
  getClassTestRunner<R extends IClassTestRunnerResults = typeof classTestRunnerDocuments>(results?: R): ClassTestRunnerLegacy<R>;
18
35
  getProgramTestRunner<R extends IProgramTestRunnerResults = typeof programTestRunnerDocuments>(results?: R): ProgramTestRunnerLegacy<R>;
19
36
  getFunctionGroupTestRunner<R extends IFunctionGroupTestRunnerResults = typeof functionGroupTestRunnerDocuments>(results?: R): FunctionGroupTestRunnerLegacy<R>;
@@ -1 +1 @@
1
- {"version":3,"file":"AdtExecutorLegacy.d.ts","sourceRoot":"","sources":["../../src/clients/AdtExecutorLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA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AA0B,EACvE,OAAO,CAAC,EAAE,CAAC,GAAG,uBAAuB,CAAC,CAAC,CAAC;IAQjC,0BAA0B,CACjC,CAAC,SACC,+BAA+B,GAAG,OAAO,gCAAgC,EAC3E,OAAO,CAAC,EAAE,CAAC,GAAG,6BAA6B,CAAC,CAAC,CAAC;IAQvC,2BAA2B,CAClC,CAAC,SACC,gCAAgC,GAAG,OAAO,iCAAiC,EAC7E,OAAO,CAAC,EAAE,CAAC,GAAG,8BAA8B,CAAC,CAAC,CAAC;CAOlD"}
@@ -1,20 +1,37 @@
1
1
  "use strict";
2
2
  /**
3
- * AdtExecutorLegacy — executors for legacy SAP systems (BASIS < 7.50).
3
+ * AdtExecutorLegacy — executors for legacy SAP systems (BASIS < 7.50), over RFC.
4
4
  *
5
- * The ABAP Unit runners differ: a class's tests run on the legacy endpoint
6
- * (`ClassTestRunnerLegacy`); a report's, a function group's and a function
7
- * module's are refused without a request, because that endpoint has not been
8
- * measured to find them. The rest is inherited.
5
+ * The ABAP Unit runners differ: 7.40 has no `/abapunit/runs`, so the
6
+ * `/abapunit/testruns` request with `<options>` is what runs the tests —
7
+ * measured on 7.40 SP04 for a class, a report, a function group and a function
8
+ * module. A class's, a report's and a group's `run` and `runSync` all send it;
9
+ * a function module's `runSync` sends it and its `run` is refused (it names no
10
+ * group); `getStatus` and `getResult` are refused, as there is no run id.
11
+ *
12
+ * The class and program executors refuse their runs and the trace type lists
13
+ * without a request (7.40 has no `/oo/classrun`; `programrun` and the trace
14
+ * catalogues are not advertised and not measured); the trace schedule is
15
+ * inherited, unmeasured.
9
16
  */
10
17
  Object.defineProperty(exports, "__esModule", { value: true });
11
18
  exports.AdtExecutorLegacy = void 0;
19
+ const ClassExecutorLegacy_1 = require("../executors/class/ClassExecutorLegacy");
12
20
  const ClassTestRunnerLegacy_1 = require("../executors/class/ClassTestRunnerLegacy");
13
- const FunctionGroupTestRunner_1 = require("../executors/functionGroup/FunctionGroupTestRunner");
14
- const FunctionModuleTestRunner_1 = require("../executors/functionModule/FunctionModuleTestRunner");
21
+ const FunctionGroupTestRunnerLegacy_1 = require("../executors/functionGroup/FunctionGroupTestRunnerLegacy");
22
+ const FunctionModuleTestRunnerLegacy_1 = require("../executors/functionModule/FunctionModuleTestRunnerLegacy");
23
+ const ProgramExecutorLegacy_1 = require("../executors/program/ProgramExecutorLegacy");
15
24
  const ProgramTestRunnerLegacy_1 = require("../executors/program/ProgramTestRunnerLegacy");
16
25
  const AdtExecutor_1 = require("./AdtExecutor");
17
26
  class AdtExecutorLegacy extends AdtExecutor_1.AdtExecutor {
27
+ /** Runs and the trace type lists refuse on 7.40; the trace schedule is inherited. */
28
+ getClassExecutor(results) {
29
+ return new ClassExecutorLegacy_1.ClassExecutorLegacy(this.connection, this.logger, results);
30
+ }
31
+ /** Runs and the trace type lists refuse on 7.40; the trace schedule is inherited. */
32
+ getProgramExecutor(results) {
33
+ return new ProgramExecutorLegacy_1.ProgramExecutorLegacy(this.connection, this.logger, results);
34
+ }
18
35
  getClassTestRunner(results) {
19
36
  return new ClassTestRunnerLegacy_1.ClassTestRunnerLegacy(this.connection, this.logger, results);
20
37
  }
@@ -22,10 +39,10 @@ class AdtExecutorLegacy extends AdtExecutor_1.AdtExecutor {
22
39
  return new ProgramTestRunnerLegacy_1.ProgramTestRunnerLegacy(this.connection, this.logger, results);
23
40
  }
24
41
  getFunctionGroupTestRunner(results) {
25
- return new FunctionGroupTestRunner_1.FunctionGroupTestRunnerLegacy(this.connection, this.logger, results);
42
+ return new FunctionGroupTestRunnerLegacy_1.FunctionGroupTestRunnerLegacy(this.connection, this.logger, results);
26
43
  }
27
44
  getFunctionModuleTestRunner(results) {
28
- return new FunctionModuleTestRunner_1.FunctionModuleTestRunnerLegacy(this.connection, this.logger, results);
45
+ return new FunctionModuleTestRunnerLegacy_1.FunctionModuleTestRunnerLegacy(this.connection, this.logger, results);
29
46
  }
30
47
  }
31
48
  exports.AdtExecutorLegacy = AdtExecutorLegacy;
@@ -4,11 +4,14 @@
4
4
  *
5
5
  * The legacy client still hands one out, so a caller of `AdtClient` that is
6
6
  * given the legacy client carries on instead of crashing at the factory. Every
7
- * member answers the same refusal and sends no request: the endpoint is absent
8
- * from the system's discovery catalog, so a request could only be refused by
9
- * SAP for a reason already known here. Decision 11, "The exception: legacy
10
- * endpoints".
7
+ * member answers the same refusal and sends no request: the endpoint is
8
+ * not served (missing from the system's discovery or, where discovery is
9
+ * silent, answered `404` when measured), so a request could only be refused
10
+ * by SAP for a reason already known here. Decision 11, "The exception:
11
+ * legacy endpoints".
11
12
  */
13
+ /** What a type's refusal rests on: a measurement, or absence from discovery. */
14
+ export type AbsenceEvidence = 'measured' | 'not-advertised';
12
15
  /**
13
16
  * Build a handler whose members are those of `implementation`, the modern
14
17
  * handler of the type, each answering a refusal. Every member of the handlers
@@ -17,6 +20,11 @@
17
20
  *
18
21
  * `objectType` must be that handler's `objectType` value: it is also the one
19
22
  * data member the handlers declare, and the test compares the two.
23
+ *
24
+ * `evidence` is what the refusal rests on, and the message says which:
25
+ * `'measured'` — 7.40 SP04 answered `404` for the endpoint over RFC;
26
+ * `'not-advertised'` — the endpoint is only absent from 7.40 SP04's discovery,
27
+ * not measured, so the type is refused until a run measures it.
20
28
  */
21
- export declare function absentOnLegacy<T>(implementation: abstract new (...args: never[]) => unknown, objectType: string, endpoint: string): T;
29
+ export declare function absentOnLegacy<T>(implementation: abstract new (...args: never[]) => unknown, objectType: string, endpoint: string, evidence: AbsenceEvidence): T;
22
30
  //# sourceMappingURL=absentOnLegacy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"absentOnLegacy.d.ts","sourceRoot":"","sources":["../../src/clients/absentOnLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAsBH;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,cAAc,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,EAC1D,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,CAAC,CAmBH"}
1
+ {"version":3,"file":"absentOnLegacy.d.ts","sourceRoot":"","sources":["../../src/clients/absentOnLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAkB5D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,cAAc,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,EAC1D,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,eAAe,GACxB,CAAC,CAsBH"}
@@ -5,10 +5,11 @@
5
5
  *
6
6
  * The legacy client still hands one out, so a caller of `AdtClient` that is
7
7
  * given the legacy client carries on instead of crashing at the factory. Every
8
- * member answers the same refusal and sends no request: the endpoint is absent
9
- * from the system's discovery catalog, so a request could only be refused by
10
- * SAP for a reason already known here. Decision 11, "The exception: legacy
11
- * endpoints".
8
+ * member answers the same refusal and sends no request: the endpoint is
9
+ * not served (missing from the system's discovery or, where discovery is
10
+ * silent, answered `404` when measured), so a request could only be refused
11
+ * by SAP for a reason already known here. Decision 11, "The exception:
12
+ * legacy endpoints".
12
13
  */
13
14
  Object.defineProperty(exports, "__esModule", { value: true });
14
15
  exports.absentOnLegacy = absentOnLegacy;
@@ -37,15 +38,23 @@ function membersOf(implementation) {
37
38
  *
38
39
  * `objectType` must be that handler's `objectType` value: it is also the one
39
40
  * data member the handlers declare, and the test compares the two.
41
+ *
42
+ * `evidence` is what the refusal rests on, and the message says which:
43
+ * `'measured'` — 7.40 SP04 answered `404` for the endpoint over RFC;
44
+ * `'not-advertised'` — the endpoint is only absent from 7.40 SP04's discovery,
45
+ * not measured, so the type is refused until a run measures it.
40
46
  */
41
- function absentOnLegacy(implementation, objectType, endpoint) {
47
+ function absentOnLegacy(implementation, objectType, endpoint, evidence) {
48
+ const why = evidence === 'measured'
49
+ ? `a legacy system (7.40 SP04) was measured not to serve ${endpoint}, ` +
50
+ 'the endpoint this type needs.'
51
+ : `${endpoint}, the endpoint this type needs, is absent from the ` +
52
+ 'discovery of a legacy system (7.40 SP04): not advertised, not ' +
53
+ 'measured, so the type is refused until a run measures it.';
42
54
  const refusal = {
43
55
  origin: 'refusal',
44
56
  code: interfaces_adt_1.AdtObjectErrorCodes.UNSUPPORTED_OPERATION,
45
- message: `${objectType} is not supported on this SAP system. ` +
46
- `The required endpoint ${endpoint} was not found in the system's ` +
47
- 'ADT discovery catalog (/sap/bc/adt/discovery). ' +
48
- "This typically means the system's BASIS version is too old.",
57
+ message: `${objectType} is not supported on this SAP system: ${why}`,
49
58
  };
50
59
  const handler = {};
51
60
  for (const name of membersOf(implementation)) {
@@ -3,12 +3,13 @@
3
3
  * and returns the appropriate ADT client.
4
4
  *
5
5
  * - Modern systems (BASIS >= 7.50): AdtClient with full CRUD
6
- * - Legacy systems (BASIS < 7.50): AdtClientLegacy with limited CRUD
6
+ * - Legacy systems (BASIS < 7.50): AdtClientLegacy, which answers a refusal for
7
+ * what 7.40 does not serve
7
8
  *
8
9
  * The client type depends on the system version (which ADT endpoints exist),
9
- * NOT on the connection type (HTTP vs RFC). Connection type is orthogonal:
10
- * - HTTP works for modern systems and read-only on legacy
11
- * - RFC works for both (and is the only way to get CRUD on legacy)
10
+ * NOT on the connection type. The legacy client is supported, and was
11
+ * measured (SAP_BASIS 7.40 SP04), over RFC only: HTTP to a legacy system is
12
+ * unsupported, and nothing here detects the wire.
12
13
  */
13
14
  import type { IAdtClientOptions } from '@mcp-abap-adt/interfaces-adt';
14
15
  import type { IAbapConnection } from '@mcp-abap-adt/interfaces-adt-connection';
@@ -1 +1 @@
1
- {"version":3,"file":"createAdtClient.d.ts","sourceRoot":"","sources":["../../src/clients/createAdtClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,wBAAsB,eAAe,CACnC,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,SAAS,CAAC,CAKpB"}
1
+ {"version":3,"file":"createAdtClient.d.ts","sourceRoot":"","sources":["../../src/clients/createAdtClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,wBAAsB,eAAe,CACnC,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,SAAS,CAAC,CAKpB"}
@@ -4,12 +4,13 @@
4
4
  * and returns the appropriate ADT client.
5
5
  *
6
6
  * - Modern systems (BASIS >= 7.50): AdtClient with full CRUD
7
- * - Legacy systems (BASIS < 7.50): AdtClientLegacy with limited CRUD
7
+ * - Legacy systems (BASIS < 7.50): AdtClientLegacy, which answers a refusal for
8
+ * what 7.40 does not serve
8
9
  *
9
10
  * The client type depends on the system version (which ADT endpoints exist),
10
- * NOT on the connection type (HTTP vs RFC). Connection type is orthogonal:
11
- * - HTTP works for modern systems and read-only on legacy
12
- * - RFC works for both (and is the only way to get CRUD on legacy)
11
+ * NOT on the connection type. The legacy client is supported, and was
12
+ * measured (SAP_BASIS 7.40 SP04), over RFC only: HTTP to a legacy system is
13
+ * unsupported, and nothing here detects the wire.
13
14
  */
14
15
  Object.defineProperty(exports, "__esModule", { value: true });
15
16
  exports.createAdtClient = createAdtClient;
@@ -3,7 +3,8 @@
3
3
  * appropriate executor client — the twin of `createAdtClient`.
4
4
  *
5
5
  * - Modern systems (BASIS >= 7.50): AdtExecutor
6
- * - Legacy systems (BASIS < 7.50): AdtExecutorLegacy
6
+ * - Legacy systems (BASIS < 7.50): AdtExecutorLegacy, supported over RFC only
7
+ * (HTTP to a legacy system is unsupported)
7
8
  */
8
9
  import type { IAbapConnection } from '@mcp-abap-adt/interfaces-adt-connection';
9
10
  import type { ILogger } from '@mcp-abap-adt/interfaces-utils';
@@ -1 +1 @@
1
- {"version":3,"file":"createAdtExecutor.d.ts","sourceRoot":"","sources":["../../src/clients/createAdtExecutor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,WAAW,CAAC,CAKtB"}
1
+ {"version":3,"file":"createAdtExecutor.d.ts","sourceRoot":"","sources":["../../src/clients/createAdtExecutor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,WAAW,CAAC,CAKtB"}
@@ -4,7 +4,8 @@
4
4
  * appropriate executor client — the twin of `createAdtClient`.
5
5
  *
6
6
  * - Modern systems (BASIS >= 7.50): AdtExecutor
7
- * - Legacy systems (BASIS < 7.50): AdtExecutorLegacy
7
+ * - Legacy systems (BASIS < 7.50): AdtExecutorLegacy, supported over RFC only
8
+ * (HTTP to a legacy system is unsupported)
8
9
  */
9
10
  Object.defineProperty(exports, "__esModule", { value: true });
10
11
  exports.createAdtExecutor = createAdtExecutor;
@@ -1,37 +1,39 @@
1
1
  /**
2
2
  * AdtClassLegacy - Class handler for legacy SAP systems (BASIS < 7.50)
3
3
  *
4
- * On legacy systems, the x-sap-adt-sessiontype: stateful header causes locks
5
- * to be stored in ABAP session memory instead of the global enqueue server.
6
- * This means lock + update + unlock MUST happen within the same stateful
7
- * HTTP session — switching to stateless between lock and update invalidates
8
- * the lock handle (GitHub #11).
9
- *
10
4
  * Overrides:
11
- * - update() — keeps lock→check→update→unlock in one stateful session
12
- * - delete() — uses direct DELETE instead of /sap/bc/adt/deletion/ API
5
+ * - delete() — `DELETE <URI>?lockHandle=…` under the lock handle the caller
6
+ * holds, instead of the /sap/bc/adt/deletion/ API 7.40 SP04 lacks.
7
+ * `update` is the inherited stateless PUT; this class does not override it.
8
+ * - checkDeletion() — refused without a request: 7.40 has no deletion API.
13
9
  */
14
10
  import type { IAdtError, IAdtHeaders, IAdtOperationOptions, IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
15
11
  import { AdtClass } from './AdtClass';
16
12
  import type { classDocuments, IClassConfig, IClassResults } from './types';
17
13
  export declare class AdtClassLegacy<R extends IClassResults = typeof classDocuments> extends AdtClass<R> {
18
- /**
19
- * Update class — legacy override.
20
- *
21
- * Keeps lock→check→update→unlock in a single stateful session so the
22
- * lock handle remains valid (legacy stores locks in ABAP session memory).
23
- */
24
- update<E extends IAdtError = IAdtError>(config: Partial<IClassConfig>, options: {
25
- headers: IAdtHeaders;
26
- } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['updated']>, E>>;
27
14
  /**
28
15
  * Delete class — legacy override.
29
16
  *
30
- * A direct DELETE on the object under its own lock: the `/sap/bc/adt/deletion/`
31
- * resource the modern path uses does not exist on these systems.
17
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
18
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
19
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
20
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
21
+ * handle, unlock deleted a class. Without a handle SAP answered `400`
22
+ * "Parameter lockHandle could not be found." for a class; the request still goes
23
+ * and that answer reaches you.
24
+ * A delete with `corrNr` in a transportable package was not measured.
25
+ * `/sap/bc/adt/deletion/*` does not exist there.
32
26
  */
33
27
  delete<E extends IAdtError = IAdtError>(config: Partial<IClassConfig>, options: {
34
28
  headers: IAdtHeaders;
35
29
  } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletion']>, E>>;
30
+ /**
31
+ * Refused without a request: 7.40 has no deletion API —
32
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
33
+ * the object's lock handle is the delete.
34
+ */
35
+ checkDeletion<E extends IAdtError = IAdtError>(_config: Partial<IClassConfig>, _options: {
36
+ headers: IAdtHeaders;
37
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletionCheck']>, E>>;
36
38
  }
37
39
  //# sourceMappingURL=AdtClassLegacy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdtClassLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/class/AdtClassLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EA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