@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
@@ -2,15 +2,11 @@
2
2
  /**
3
3
  * AdtClassLegacy - Class handler for legacy SAP systems (BASIS < 7.50)
4
4
  *
5
- * On legacy systems, the x-sap-adt-sessiontype: stateful header causes locks
6
- * to be stored in ABAP session memory instead of the global enqueue server.
7
- * This means lock + update + unlock MUST happen within the same stateful
8
- * HTTP session — switching to stateless between lock and update invalidates
9
- * the lock handle (GitHub #11).
10
- *
11
5
  * Overrides:
12
- * - update() — keeps lock→check→update→unlock in one stateful session
13
- * - delete() — uses direct DELETE instead of /sap/bc/adt/deletion/ API
6
+ * - delete() — `DELETE <URI>?lockHandle=…` under the lock handle the caller
7
+ * holds, instead of the /sap/bc/adt/deletion/ API 7.40 SP04 lacks.
8
+ * `update` is the inherited stateless PUT; this class does not override it.
9
+ * - checkDeletion() — refused without a request: 7.40 has no deletion API.
14
10
  */
15
11
  Object.defineProperty(exports, "__esModule", { value: true });
16
12
  exports.AdtClassLegacy = void 0;
@@ -18,28 +14,34 @@ const objects_1 = require("../../endpoints/objects");
18
14
  const adtResponse_1 = require("../../utils/adtResponse");
19
15
  const callTimeout_1 = require("../../utils/callTimeout");
20
16
  const deleteLegacy_1 = require("../shared/deleteLegacy");
17
+ const refusalLegacy_1 = require("../shared/refusalLegacy");
21
18
  const AdtClass_1 = require("./AdtClass");
22
19
  class AdtClassLegacy extends AdtClass_1.AdtClass {
23
- /**
24
- * Update class — legacy override.
25
- *
26
- * Keeps lock→check→update→unlock in a single stateful session so the
27
- * lock handle remains valid (legacy stores locks in ABAP session memory).
28
- */
29
- async update(config, options) {
30
- // Low-level mode: caller owns the session
31
- return super.update(config, options);
32
- }
33
20
  /**
34
21
  * Delete class — legacy override.
35
22
  *
36
- * A direct DELETE on the object under its own lock: the `/sap/bc/adt/deletion/`
37
- * resource the modern path uses does not exist on these systems.
23
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
24
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
25
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
26
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
27
+ * handle, unlock deleted a class. Without a handle SAP answered `400`
28
+ * "Parameter lockHandle could not be found." for a class; the request still goes
29
+ * and that answer reaches you.
30
+ * A delete with `corrNr` in a transportable package was not measured.
31
+ * `/sap/bc/adt/deletion/*` does not exist there.
38
32
  */
39
33
  async delete(config, options) {
40
34
  const name = config.className;
41
35
  const objectUrl = `${objects_1.CLASS.uri(name)}`;
42
36
  return (0, adtResponse_1.answering)(() => (0, deleteLegacy_1.deleteObjectDirect)((0, callTimeout_1.withCallTimeout)(this.connection, options?.timeout), options.headers, objectUrl, options?.lockHandle, config.transportRequest), this.results.deletion, options?.analyse);
43
37
  }
38
+ /**
39
+ * Refused without a request: 7.40 has no deletion API —
40
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
41
+ * the object's lock handle is the delete.
42
+ */
43
+ async checkDeletion(_config, _options) {
44
+ return (0, refusalLegacy_1.noDeletionCheck)();
45
+ }
44
46
  }
45
47
  exports.AdtClassLegacy = AdtClassLegacy;
@@ -67,9 +67,9 @@ export declare function startClassUnitTestRunByObject(connection: IAbapConnectio
67
67
  * request is `startUnitTestRunSync` (`core/shared/abapUnit`), given each
68
68
  * class's URI; see there for the format and what was measured.
69
69
  *
70
- * The regular runner's `runSync` and the legacy runner's `run` both send it.
71
- * `options` absent sends no `<options>` element — the body the legacy runner
72
- * has always sent, unchanged.
70
+ * Whoever runs tests synchronously sends it: a runner's `runSync`, and any
71
+ * runner whose `run` is this request. `options` absent sends no `<options>`
72
+ * element.
73
73
  */
74
74
  export declare function startClassUnitTestRunSync(connection: IAbapConnection, classNames: string[], options?: IClassUnitTestRunOptions): Promise<IAdtWireResponse>;
75
75
  //# sourceMappingURL=run.d.ts.map
@@ -137,9 +137,9 @@ async function startClassUnitTestRunByObject(connection, className, options) {
137
137
  * request is `startUnitTestRunSync` (`core/shared/abapUnit`), given each
138
138
  * class's URI; see there for the format and what was measured.
139
139
  *
140
- * The regular runner's `runSync` and the legacy runner's `run` both send it.
141
- * `options` absent sends no `<options>` element — the body the legacy runner
142
- * has always sent, unchanged.
140
+ * Whoever runs tests synchronously sends it: a runner's `runSync`, and any
141
+ * runner whose `run` is this request. `options` absent sends no `<options>`
142
+ * element.
143
143
  */
144
144
  async function startClassUnitTestRunSync(connection, classNames, options) {
145
145
  return (0, abapUnit_1.startUnitTestRunSync)(connection, classNames.map((name) => objects_1.CLASS.uri(name)), options);
@@ -1,18 +1,40 @@
1
1
  /**
2
2
  * AdtDdlLegacy - DDL source handler for legacy SAP systems (BASIS < 7.50)
3
3
  *
4
- * Overrides delete() to use direct DELETE instead of /sap/bc/adt/deletion/ API,
4
+ * Overrides delete() to send `DELETE <URI>?lockHandle=…` under the lock handle the
5
+ * caller holds (7.40 SP04 has no /sap/bc/adt/deletion/ API),
5
6
  * and refuses checkCdsTestDoubles(): the CDS test-doubles framework endpoint is
6
7
  * not present below 7.50 (issue #207).
8
+ * checkDeletion() is refused without a request: 7.40 has no deletion API.
7
9
  */
8
10
  import type { IAdtAnalyseOptions, IAdtError, IAdtHeaders, IAdtOperationOptions, IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
9
11
  import { AdtDdl } from './AdtDdl';
10
12
  import type { ddlDocuments, IDdlConfig, IDdlResults } from './types';
11
13
  export declare class AdtDdlLegacy<R extends IDdlResults = typeof ddlDocuments> extends AdtDdl<R> {
14
+ /**
15
+ * Delete DDL source — legacy override.
16
+ *
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 DDL source. Without a handle 7.40 SP04 deleted
22
+ * a DDL source too; pass the handle all the same.
23
+ * A delete with `corrNr` in a transportable package was not measured.
24
+ * `/sap/bc/adt/deletion/*` does not exist there.
25
+ */
12
26
  delete<E extends IAdtError = IAdtError>(config: Partial<IDdlConfig>, options: {
13
27
  headers: IAdtHeaders;
14
28
  } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletion']>, E>>;
15
29
  /** Refused without a request: the endpoint does not exist below 7.50. */
16
30
  checkCdsTestDoubles<E extends IAdtError = IAdtError>(_cdsViewName: string, _options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<ReturnType<R['testDoubles']>, E>>;
31
+ /**
32
+ * Refused without a request: 7.40 has no deletion API —
33
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
34
+ * the object's lock handle is the delete.
35
+ */
36
+ checkDeletion<E extends IAdtError = IAdtError>(_config: Partial<IDdlConfig>, _options: {
37
+ headers: IAdtHeaders;
38
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletionCheck']>, E>>;
17
39
  }
18
40
  //# sourceMappingURL=AdtDdlLegacy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdtDdlLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/ddl/AdtDdlLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAMtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAErE,qBAAa,YAAY,CACvB,CAAC,SAAS,WAAW,GAAG,OAAO,YAAY,CAC3C,SAAQ,MAAM,CAAC,CAAC,CAAC;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,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAkBtD,yEAAyE;IAC1D,mBAAmB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAChE,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC/B,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IASzD;;;;OAIG;IACY,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAC5B,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAG5D"}
@@ -2,9 +2,11 @@
2
2
  /**
3
3
  * AdtDdlLegacy - DDL source handler for legacy SAP systems (BASIS < 7.50)
4
4
  *
5
- * Overrides delete() to use direct DELETE instead of /sap/bc/adt/deletion/ API,
5
+ * Overrides delete() to send `DELETE <URI>?lockHandle=…` under the lock handle the
6
+ * caller holds (7.40 SP04 has no /sap/bc/adt/deletion/ API),
6
7
  * and refuses checkCdsTestDoubles(): the CDS test-doubles framework endpoint is
7
8
  * not present below 7.50 (issue #207).
9
+ * checkDeletion() is refused without a request: 7.40 has no deletion API.
8
10
  */
9
11
  Object.defineProperty(exports, "__esModule", { value: true });
10
12
  exports.AdtDdlLegacy = void 0;
@@ -13,8 +15,21 @@ const objects_1 = require("../../endpoints/objects");
13
15
  const adtResponse_1 = require("../../utils/adtResponse");
14
16
  const callTimeout_1 = require("../../utils/callTimeout");
15
17
  const deleteLegacy_1 = require("../shared/deleteLegacy");
18
+ const refusalLegacy_1 = require("../shared/refusalLegacy");
16
19
  const AdtDdl_1 = require("./AdtDdl");
17
20
  class AdtDdlLegacy extends AdtDdl_1.AdtDdl {
21
+ /**
22
+ * Delete DDL source — legacy override.
23
+ *
24
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
25
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
26
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
27
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
28
+ * handle, unlock deleted a DDL source. Without a handle 7.40 SP04 deleted
29
+ * a DDL source too; pass the handle all the same.
30
+ * A delete with `corrNr` in a transportable package was not measured.
31
+ * `/sap/bc/adt/deletion/*` does not exist there.
32
+ */
18
33
  async delete(config, options) {
19
34
  const name = config.ddlName;
20
35
  const objectUrl = `${objects_1.DDL_SOURCE.uri(name)}`;
@@ -28,5 +43,13 @@ class AdtDdlLegacy extends AdtDdl_1.AdtDdl {
28
43
  message: 'The CDS test-doubles check needs BASIS 7.50 or later; this system has no such endpoint.',
29
44
  });
30
45
  }
46
+ /**
47
+ * Refused without a request: 7.40 has no deletion API —
48
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
49
+ * the object's lock handle is the delete.
50
+ */
51
+ async checkDeletion(_config, _options) {
52
+ return (0, refusalLegacy_1.noDeletionCheck)();
53
+ }
31
54
  }
32
55
  exports.AdtDdlLegacy = AdtDdlLegacy;
@@ -2,14 +2,37 @@
2
2
  * AdtFunctionGroupLegacy - FunctionGroup handler for legacy SAP systems
3
3
  * (BASIS < 7.50).
4
4
  *
5
- * Overrides delete() to use direct DELETE instead of /sap/bc/adt/deletion/ API.
5
+ * Overrides delete() to send `DELETE <URI>?lockHandle=…` under the lock handle the
6
+ * caller holds (7.40 SP04 has no /sap/bc/adt/deletion/ API).
7
+ * checkDeletion() is refused without a request: 7.40 has no deletion API.
6
8
  */
7
9
  import type { IAdtError, IAdtHeaders, IAdtOperationOptions, IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
8
10
  import { AdtFunctionGroup } from './AdtFunctionGroup';
9
11
  import type { functionGroupDocuments, IFunctionGroupConfig, IFunctionGroupResults } from './types';
10
12
  export declare class AdtFunctionGroupLegacy<R extends IFunctionGroupResults = typeof functionGroupDocuments> extends AdtFunctionGroup<R> {
13
+ /**
14
+ * Delete function group — legacy override.
15
+ *
16
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
17
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
18
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
19
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
20
+ * handle, unlock deleted a function group. Without a handle SAP answered `400`
21
+ * "Parameter lockHandle could not be found." for a function group; the request still goes
22
+ * and that answer reaches you.
23
+ * A delete with `corrNr` in a transportable package was not measured.
24
+ * `/sap/bc/adt/deletion/*` does not exist there.
25
+ */
11
26
  delete<E extends IAdtError = IAdtError>(config: Partial<IFunctionGroupConfig>, options: {
12
27
  headers: IAdtHeaders;
13
28
  } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletion']>, E>>;
29
+ /**
30
+ * Refused without a request: 7.40 has no deletion API —
31
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
32
+ * the object's lock handle is the delete.
33
+ */
34
+ checkDeletion<E extends IAdtError = IAdtError>(_config: Partial<IFunctionGroupConfig>, _options: {
35
+ headers: IAdtHeaders;
36
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletionCheck']>, E>>;
14
37
  }
15
38
  //# sourceMappingURL=AdtFunctionGroupLegacy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdtFunctionGroupLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/functionGroup/AdtFunctionGroupLegacy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,gBAAgB,EAA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,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAkBtD;;;;OAIG;IACY,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACtC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAG5D"}
@@ -3,7 +3,9 @@
3
3
  * AdtFunctionGroupLegacy - FunctionGroup handler for legacy SAP systems
4
4
  * (BASIS < 7.50).
5
5
  *
6
- * Overrides delete() to use direct DELETE instead of /sap/bc/adt/deletion/ API.
6
+ * Overrides delete() to send `DELETE <URI>?lockHandle=…` under the lock handle the
7
+ * caller holds (7.40 SP04 has no /sap/bc/adt/deletion/ API).
8
+ * checkDeletion() is refused without a request: 7.40 has no deletion API.
7
9
  */
8
10
  Object.defineProperty(exports, "__esModule", { value: true });
9
11
  exports.AdtFunctionGroupLegacy = void 0;
@@ -11,12 +13,34 @@ const objects_1 = require("../../endpoints/objects");
11
13
  const adtResponse_1 = require("../../utils/adtResponse");
12
14
  const callTimeout_1 = require("../../utils/callTimeout");
13
15
  const deleteLegacy_1 = require("../shared/deleteLegacy");
16
+ const refusalLegacy_1 = require("../shared/refusalLegacy");
14
17
  const AdtFunctionGroup_1 = require("./AdtFunctionGroup");
15
18
  class AdtFunctionGroupLegacy extends AdtFunctionGroup_1.AdtFunctionGroup {
19
+ /**
20
+ * Delete function group — legacy override.
21
+ *
22
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
23
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
24
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
25
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
26
+ * handle, unlock deleted a function group. Without a handle SAP answered `400`
27
+ * "Parameter lockHandle could not be found." for a function group; the request still goes
28
+ * and that answer reaches you.
29
+ * A delete with `corrNr` in a transportable package was not measured.
30
+ * `/sap/bc/adt/deletion/*` does not exist there.
31
+ */
16
32
  async delete(config, options) {
17
33
  const name = config.functionGroupName;
18
34
  const objectUrl = objects_1.FUNCTION_GROUP.uri(name);
19
35
  return (0, adtResponse_1.answering)(() => (0, deleteLegacy_1.deleteObjectDirect)((0, callTimeout_1.withCallTimeout)(this.connection, options?.timeout), options.headers, objectUrl, options?.lockHandle, config.transportRequest), this.results.deletion, options?.analyse);
20
36
  }
37
+ /**
38
+ * Refused without a request: 7.40 has no deletion API —
39
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
40
+ * the object's lock handle is the delete.
41
+ */
42
+ async checkDeletion(_config, _options) {
43
+ return (0, refusalLegacy_1.noDeletionCheck)();
44
+ }
21
45
  }
22
46
  exports.AdtFunctionGroupLegacy = AdtFunctionGroupLegacy;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * AdtFunctionIncludeLegacy - function include handler for legacy SAP systems
3
+ * (BASIS < 7.50).
4
+ *
5
+ * Overrides:
6
+ * - checkDeletion() and delete() — refused without a request: both go through
7
+ * `/sap/bc/adt/deletion/*`, which 7.40 does not serve (spec §4.3, §5). A
8
+ * direct `DELETE` of the function include is not measured, so it is not
9
+ * offered.
10
+ */
11
+ import type { IAdtError, IAdtHeaders, IAdtOperationOptions, IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
12
+ import { AdtFunctionInclude } from './AdtFunctionInclude';
13
+ import type { functionIncludeDocuments, IFunctionIncludeConfig, IFunctionIncludeResults } from './types';
14
+ export declare class AdtFunctionIncludeLegacy<R extends IFunctionIncludeResults = typeof functionIncludeDocuments> extends AdtFunctionInclude<R> {
15
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/check` (§5). */
16
+ checkDeletion<E extends IAdtError = IAdtError>(_config: Partial<IFunctionIncludeConfig>, _options: {
17
+ headers: IAdtHeaders;
18
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletionCheck']>, E>>;
19
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/delete` (§4.3). */
20
+ delete<E extends IAdtError = IAdtError>(_config: Partial<IFunctionIncludeConfig>, _options: {
21
+ headers: IAdtHeaders;
22
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletion']>, E>>;
23
+ }
24
+ //# sourceMappingURL=AdtFunctionIncludeLegacy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdtFunctionIncludeLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/functionInclude/AdtFunctionIncludeLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EACb,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,qBAAa,wBAAwB,CACnC,CAAC,SAAS,uBAAuB,GAAG,OAAO,wBAAwB,CACnE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC7B,gFAAgF;IACjE,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,OAAO,EAAE,OAAO,CAAC,sBAAsB,CAAC,EACxC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAI3D,mFAAmF;IACpE,MAAM,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACnD,OAAO,EAAE,OAAO,CAAC,sBAAsB,CAAC,EACxC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAGvD"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * AdtFunctionIncludeLegacy - function include handler for legacy SAP systems
4
+ * (BASIS < 7.50).
5
+ *
6
+ * Overrides:
7
+ * - checkDeletion() and delete() — refused without a request: both go through
8
+ * `/sap/bc/adt/deletion/*`, which 7.40 does not serve (spec §4.3, §5). A
9
+ * direct `DELETE` of the function include is not measured, so it is not
10
+ * offered.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.AdtFunctionIncludeLegacy = void 0;
14
+ const refusalLegacy_1 = require("../shared/refusalLegacy");
15
+ const AdtFunctionInclude_1 = require("./AdtFunctionInclude");
16
+ class AdtFunctionIncludeLegacy extends AdtFunctionInclude_1.AdtFunctionInclude {
17
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/check` (§5). */
18
+ async checkDeletion(_config, _options) {
19
+ return (0, refusalLegacy_1.noDeletionCheckNorDelete)();
20
+ }
21
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/delete` (§4.3). */
22
+ async delete(_config, _options) {
23
+ return (0, refusalLegacy_1.noDeletionApi)();
24
+ }
25
+ }
26
+ exports.AdtFunctionIncludeLegacy = AdtFunctionIncludeLegacy;
@@ -2,14 +2,36 @@
2
2
  * AdtFunctionModuleLegacy - FunctionModule handler for legacy SAP systems
3
3
  * (BASIS < 7.50).
4
4
  *
5
- * Overrides delete() to use direct DELETE instead of /sap/bc/adt/deletion/ API.
5
+ * Overrides delete() to send `DELETE <URI>?lockHandle=…` under the lock handle the
6
+ * caller holds (7.40 SP04 has no /sap/bc/adt/deletion/ API).
7
+ * checkDeletion() is refused without a request: 7.40 has no deletion API.
6
8
  */
7
9
  import type { IAdtError, IAdtHeaders, IAdtOperationOptions, IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
8
10
  import { AdtFunctionModule } from './AdtFunctionModule';
9
11
  import type { functionModuleDocuments, IFunctionModuleConfig, IFunctionModuleResults } from './types';
10
12
  export declare class AdtFunctionModuleLegacy<R extends IFunctionModuleResults = typeof functionModuleDocuments> extends AdtFunctionModule<R> {
13
+ /**
14
+ * Delete function module — legacy override.
15
+ *
16
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
17
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
18
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
19
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
20
+ * handle, unlock deleted a function module. Without a handle 7.40 SP04 deleted
21
+ * a function module too; pass the handle all the same.
22
+ * A delete with `corrNr` in a transportable package was not measured.
23
+ * `/sap/bc/adt/deletion/*` does not exist there.
24
+ */
11
25
  delete<E extends IAdtError = IAdtError>(config: Partial<IFunctionModuleConfig>, options: {
12
26
  headers: IAdtHeaders;
13
27
  } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletion']>, E>>;
28
+ /**
29
+ * Refused without a request: 7.40 has no deletion API —
30
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
31
+ * the object's lock handle is the delete.
32
+ */
33
+ checkDeletion<E extends IAdtError = IAdtError>(_config: Partial<IFunctionModuleConfig>, _options: {
34
+ headers: IAdtHeaders;
35
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletionCheck']>, E>>;
14
36
  }
15
37
  //# sourceMappingURL=AdtFunctionModuleLegacy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdtFunctionModuleLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/functionModule/AdtFunctionModuleLegacy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB,qBAAa,uBAAuB,CAClC,CAAC,SAAS,sBAAsB,GAAG,OAAO,uBAAuB,CACjE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IACb,MAAM,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACnD,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,EACtC,OAAO,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC1D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAkBvD"}
1
+ {"version":3,"file":"AdtFunctionModuleLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/functionModule/AdtFunctionModuleLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAMtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB,qBAAa,uBAAuB,CAClC,CAAC,SAAS,sBAAsB,GAAG,OAAO,uBAAuB,CACjE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IAC5B;;;;;;;;;;;OAWG;IACY,MAAM,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACnD,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,EACtC,OAAO,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC1D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAmBtD;;;;OAIG;IACY,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,OAAO,EAAE,OAAO,CAAC,qBAAqB,CAAC,EACvC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAG5D"}
@@ -3,7 +3,9 @@
3
3
  * AdtFunctionModuleLegacy - FunctionModule handler for legacy SAP systems
4
4
  * (BASIS < 7.50).
5
5
  *
6
- * Overrides delete() to use direct DELETE instead of /sap/bc/adt/deletion/ API.
6
+ * Overrides delete() to send `DELETE <URI>?lockHandle=…` under the lock handle the
7
+ * caller holds (7.40 SP04 has no /sap/bc/adt/deletion/ API).
8
+ * checkDeletion() is refused without a request: 7.40 has no deletion API.
7
9
  */
8
10
  Object.defineProperty(exports, "__esModule", { value: true });
9
11
  exports.AdtFunctionModuleLegacy = void 0;
@@ -11,13 +13,34 @@ const objects_1 = require("../../endpoints/objects");
11
13
  const adtResponse_1 = require("../../utils/adtResponse");
12
14
  const callTimeout_1 = require("../../utils/callTimeout");
13
15
  const deleteLegacy_1 = require("../shared/deleteLegacy");
16
+ const refusalLegacy_1 = require("../shared/refusalLegacy");
14
17
  const AdtFunctionModule_1 = require("./AdtFunctionModule");
15
18
  class AdtFunctionModuleLegacy extends AdtFunctionModule_1.AdtFunctionModule {
19
+ /**
20
+ * Delete function module — legacy override.
21
+ *
22
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
23
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
24
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
25
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
26
+ * handle, unlock deleted a function module. Without a handle 7.40 SP04 deleted
27
+ * a function module too; pass the handle all the same.
28
+ * A delete with `corrNr` in a transportable package was not measured.
29
+ * `/sap/bc/adt/deletion/*` does not exist there.
30
+ */
16
31
  async delete(config, options) {
17
32
  const group = config.functionGroupName;
18
33
  const module = config.functionModuleName;
19
34
  const objectUrl = `${objects_1.FUNCTION_MODULE.uri(group, module)}`;
20
35
  return (0, adtResponse_1.answering)(() => (0, deleteLegacy_1.deleteObjectDirect)((0, callTimeout_1.withCallTimeout)(this.connection, options?.timeout), options.headers, objectUrl, options?.lockHandle, config.transportRequest), this.results.deletion, options?.analyse);
21
36
  }
37
+ /**
38
+ * Refused without a request: 7.40 has no deletion API —
39
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
40
+ * the object's lock handle is the delete.
41
+ */
42
+ async checkDeletion(_config, _options) {
43
+ return (0, refusalLegacy_1.noDeletionCheck)();
44
+ }
22
45
  }
23
46
  exports.AdtFunctionModuleLegacy = AdtFunctionModuleLegacy;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * AdtIncludeLegacy - standalone include handler for legacy SAP systems
3
+ * (BASIS < 7.50).
4
+ *
5
+ * Overrides:
6
+ * - checkDeletion() and delete() — refused without a request: both go through
7
+ * `/sap/bc/adt/deletion/*`, which 7.40 does not serve (spec §4.3, §5). A
8
+ * direct `DELETE` of the include is not measured, so it is not offered.
9
+ */
10
+ import type { IAdtError, IAdtHeaders, IAdtOperationOptions, IAdtResponse, IIncludeConfig } from '@mcp-abap-adt/interfaces-adt';
11
+ import { AdtInclude } from './AdtInclude';
12
+ import type { IIncludeResults, includeDocuments } from './types';
13
+ export declare class AdtIncludeLegacy<R extends IIncludeResults = typeof includeDocuments> extends AdtInclude<R> {
14
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/check` (§5). */
15
+ checkDeletion<E extends IAdtError = IAdtError>(_config: Partial<IIncludeConfig>, _options: {
16
+ headers: IAdtHeaders;
17
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletionCheck']>, E>>;
18
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/delete` (§4.3). */
19
+ delete<E extends IAdtError = IAdtError>(_config: Partial<IIncludeConfig>, _options: {
20
+ headers: IAdtHeaders;
21
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletion']>, E>>;
22
+ }
23
+ //# sourceMappingURL=AdtIncludeLegacy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdtIncludeLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/include/AdtIncludeLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACf,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEjE,qBAAa,gBAAgB,CAC3B,CAAC,SAAS,eAAe,GAAG,OAAO,gBAAgB,CACnD,SAAQ,UAAU,CAAC,CAAC,CAAC;IACrB,gFAAgF;IACjE,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,EAChC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAI3D,mFAAmF;IACpE,MAAM,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACnD,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,EAChC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAGvD"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * AdtIncludeLegacy - standalone include handler for legacy SAP systems
4
+ * (BASIS < 7.50).
5
+ *
6
+ * Overrides:
7
+ * - checkDeletion() and delete() — refused without a request: both go through
8
+ * `/sap/bc/adt/deletion/*`, which 7.40 does not serve (spec §4.3, §5). A
9
+ * direct `DELETE` of the include is not measured, so it is not offered.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AdtIncludeLegacy = void 0;
13
+ const refusalLegacy_1 = require("../shared/refusalLegacy");
14
+ const AdtInclude_1 = require("./AdtInclude");
15
+ class AdtIncludeLegacy extends AdtInclude_1.AdtInclude {
16
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/check` (§5). */
17
+ async checkDeletion(_config, _options) {
18
+ return (0, refusalLegacy_1.noDeletionCheckNorDelete)();
19
+ }
20
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/delete` (§4.3). */
21
+ async delete(_config, _options) {
22
+ return (0, refusalLegacy_1.noDeletionApi)();
23
+ }
24
+ }
25
+ exports.AdtIncludeLegacy = AdtIncludeLegacy;
@@ -1,14 +1,37 @@
1
1
  /**
2
2
  * AdtInterfaceLegacy - Interface handler for legacy SAP systems (BASIS < 7.50)
3
3
  *
4
- * Overrides delete() to use direct DELETE instead of /sap/bc/adt/deletion/ API.
4
+ * Overrides delete() to send `DELETE <URI>?lockHandle=…` under the lock handle the
5
+ * caller holds (7.40 SP04 has no /sap/bc/adt/deletion/ API).
6
+ * checkDeletion() is refused without a request: 7.40 has no deletion API.
5
7
  */
6
8
  import type { IAdtError, IAdtHeaders, IAdtOperationOptions, IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
7
9
  import { AdtInterface } from './AdtInterface';
8
10
  import type { IInterfaceConfig, IInterfaceResults, interfaceDocuments } from './types';
9
11
  export declare class AdtInterfaceLegacy<R extends IInterfaceResults = typeof interfaceDocuments> extends AdtInterface<R> {
12
+ /**
13
+ * Delete interface — legacy override.
14
+ *
15
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
16
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
17
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
18
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
19
+ * handle, unlock deleted an interface. Without a handle SAP answered `400`
20
+ * "Parameter lockHandle could not be found." for an interface; the request still goes
21
+ * and that answer reaches you.
22
+ * A delete with `corrNr` in a transportable package was not measured.
23
+ * `/sap/bc/adt/deletion/*` does not exist there.
24
+ */
10
25
  delete<E extends IAdtError = IAdtError>(config: Partial<IInterfaceConfig>, options: {
11
26
  headers: IAdtHeaders;
12
27
  } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletion']>, E>>;
28
+ /**
29
+ * Refused without a request: 7.40 has no deletion API —
30
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
31
+ * the object's lock handle is the delete.
32
+ */
33
+ checkDeletion<E extends IAdtError = IAdtError>(_config: Partial<IInterfaceConfig>, _options: {
34
+ headers: IAdtHeaders;
35
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletionCheck']>, E>>;
13
36
  }
14
37
  //# sourceMappingURL=AdtInterfaceLegacy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdtInterfaceLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/interface/AdtInterfaceLegacy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,YAAY,EAAE,MAAM,g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AAC,CAAC,CAAC;IAkBtD;;;;OAIG;IACY,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAClC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAG5D"}
@@ -2,7 +2,9 @@
2
2
  /**
3
3
  * AdtInterfaceLegacy - Interface handler for legacy SAP systems (BASIS < 7.50)
4
4
  *
5
- * Overrides delete() to use direct DELETE instead of /sap/bc/adt/deletion/ API.
5
+ * Overrides delete() to send `DELETE <URI>?lockHandle=…` under the lock handle the
6
+ * caller holds (7.40 SP04 has no /sap/bc/adt/deletion/ API).
7
+ * checkDeletion() is refused without a request: 7.40 has no deletion API.
6
8
  */
7
9
  Object.defineProperty(exports, "__esModule", { value: true });
8
10
  exports.AdtInterfaceLegacy = void 0;
@@ -10,12 +12,34 @@ const objects_1 = require("../../endpoints/objects");
10
12
  const adtResponse_1 = require("../../utils/adtResponse");
11
13
  const callTimeout_1 = require("../../utils/callTimeout");
12
14
  const deleteLegacy_1 = require("../shared/deleteLegacy");
15
+ const refusalLegacy_1 = require("../shared/refusalLegacy");
13
16
  const AdtInterface_1 = require("./AdtInterface");
14
17
  class AdtInterfaceLegacy extends AdtInterface_1.AdtInterface {
18
+ /**
19
+ * Delete interface — legacy override.
20
+ *
21
+ * One stateless request: `DELETE <object URI>?lockHandle=<options.lockHandle>`,
22
+ * plus `&corrNr=<transportRequest>` when `transportRequest` is given. Pass the
23
+ * handle from your own `lock()` and release it with `unlock()` afterwards;
24
+ * this member does not lock. Measured on 7.40 SP04: lock, delete with the
25
+ * handle, unlock deleted an interface. Without a handle SAP answered `400`
26
+ * "Parameter lockHandle could not be found." for an interface; the request still goes
27
+ * and that answer reaches you.
28
+ * A delete with `corrNr` in a transportable package was not measured.
29
+ * `/sap/bc/adt/deletion/*` does not exist there.
30
+ */
15
31
  async delete(config, options) {
16
32
  const name = config.interfaceName;
17
33
  const objectUrl = `${objects_1.INTERFACE.uri(name)}`;
18
34
  return (0, adtResponse_1.answering)(() => (0, deleteLegacy_1.deleteObjectDirect)((0, callTimeout_1.withCallTimeout)(this.connection, options?.timeout), options.headers, objectUrl, options?.lockHandle, config.transportRequest), this.results.deletion, options?.analyse);
19
35
  }
36
+ /**
37
+ * Refused without a request: 7.40 has no deletion API —
38
+ * `POST /sap/bc/adt/deletion/check` answers `404` (spec §5). `delete` with
39
+ * the object's lock handle is the delete.
40
+ */
41
+ async checkDeletion(_config, _options) {
42
+ return (0, refusalLegacy_1.noDeletionCheck)();
43
+ }
20
44
  }
21
45
  exports.AdtInterfaceLegacy = AdtInterfaceLegacy;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * AdtMessageClassLegacy - message class handler for legacy SAP systems
3
+ * (BASIS < 7.50).
4
+ *
5
+ * Overrides:
6
+ * - checkDeletion() and delete() — refused without a request: both go through
7
+ * `/sap/bc/adt/deletion/*`, which 7.40 does not serve (spec §4.3, §5). A
8
+ * direct `DELETE` of the message class is not measured, so it is not offered.
9
+ */
10
+ import type { IAdtError, IAdtHeaders, IAdtOperationOptions, IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
11
+ import { AdtMessageClass } from './AdtMessageClass';
12
+ import type { IMessageClassConfig, IMessageClassResults, messageClassDocuments } from './types';
13
+ export declare class AdtMessageClassLegacy<R extends IMessageClassResults = typeof messageClassDocuments> extends AdtMessageClass<R> {
14
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/check` (§5). */
15
+ checkDeletion<E extends IAdtError = IAdtError>(_config: Partial<IMessageClassConfig>, _options: {
16
+ headers: IAdtHeaders;
17
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletionCheck']>, E>>;
18
+ /** Refused without a request: 7.40 has no `/sap/bc/adt/deletion/delete` (§4.3). */
19
+ delete<E extends IAdtError = IAdtError>(_config: Partial<IMessageClassConfig>, _options: {
20
+ headers: IAdtHeaders;
21
+ } & IAdtOperationOptions<E>): Promise<IAdtResponse<ReturnType<R['deletion']>, E>>;
22
+ }
23
+ //# sourceMappingURL=AdtMessageClassLegacy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdtMessageClassLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/messageClass/AdtMessageClassLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,YAAY,EACb,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,qBAAa,qBAAqB,CAChC,CAAC,SAAS,oBAAoB,GAAG,OAAO,qBAAqB,CAC7D,SAAQ,eAAe,CAAC,CAAC,CAAC;IAC1B,gFAAgF;IACjE,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC1D,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,EACrC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAI3D,mFAAmF;IACpE,MAAM,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACnD,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,EACrC,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAGvD"}