@mcp-abap-adt/interfaces-adt 1.0.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.
- package/CHANGELOG.md +16 -0
- package/COPYING +674 -0
- package/LICENSE +165 -0
- package/README.md +35 -0
- package/dist/Headers.d.ts +57 -0
- package/dist/Headers.d.ts.map +1 -0
- package/dist/Headers.js +62 -0
- package/dist/adt/AdtTypes.d.ts +40 -0
- package/dist/adt/AdtTypes.d.ts.map +1 -0
- package/dist/adt/AdtTypes.js +5 -0
- package/dist/adt/IAdtAbapGit.d.ts +60 -0
- package/dist/adt/IAdtAbapGit.d.ts.map +1 -0
- package/dist/adt/IAdtAbapGit.js +2 -0
- package/dist/adt/IAdtAccessControl.d.ts +30 -0
- package/dist/adt/IAdtAccessControl.d.ts.map +1 -0
- package/dist/adt/IAdtAccessControl.js +5 -0
- package/dist/adt/IAdtAppendStructure.d.ts +32 -0
- package/dist/adt/IAdtAppendStructure.d.ts.map +1 -0
- package/dist/adt/IAdtAppendStructure.js +5 -0
- package/dist/adt/IAdtAuthorizationField.d.ts +49 -0
- package/dist/adt/IAdtAuthorizationField.d.ts.map +1 -0
- package/dist/adt/IAdtAuthorizationField.js +5 -0
- package/dist/adt/IAdtBehaviorDefinition.d.ts +58 -0
- package/dist/adt/IAdtBehaviorDefinition.d.ts.map +1 -0
- package/dist/adt/IAdtBehaviorDefinition.js +7 -0
- package/dist/adt/IAdtBehaviorImplementation.d.ts +30 -0
- package/dist/adt/IAdtBehaviorImplementation.d.ts.map +1 -0
- package/dist/adt/IAdtBehaviorImplementation.js +5 -0
- package/dist/adt/IAdtCapabilities.d.ts +391 -0
- package/dist/adt/IAdtCapabilities.d.ts.map +1 -0
- package/dist/adt/IAdtCapabilities.js +2 -0
- package/dist/adt/IAdtClass.d.ts +66 -0
- package/dist/adt/IAdtClass.d.ts.map +1 -0
- package/dist/adt/IAdtClass.js +5 -0
- package/dist/adt/IAdtClientOptions.d.ts +25 -0
- package/dist/adt/IAdtClientOptions.d.ts.map +1 -0
- package/dist/adt/IAdtClientOptions.js +9 -0
- package/dist/adt/IAdtContentTypes.d.ts +45 -0
- package/dist/adt/IAdtContentTypes.d.ts.map +1 -0
- package/dist/adt/IAdtContentTypes.js +13 -0
- package/dist/adt/IAdtDataElement.d.ts +95 -0
- package/dist/adt/IAdtDataElement.d.ts.map +1 -0
- package/dist/adt/IAdtDataElement.js +5 -0
- package/dist/adt/IAdtDdl.d.ts +37 -0
- package/dist/adt/IAdtDdl.d.ts.map +1 -0
- package/dist/adt/IAdtDdl.js +7 -0
- package/dist/adt/IAdtDomain.d.ts +79 -0
- package/dist/adt/IAdtDomain.d.ts.map +1 -0
- package/dist/adt/IAdtDomain.js +5 -0
- package/dist/adt/IAdtEnhancement.d.ts +61 -0
- package/dist/adt/IAdtEnhancement.d.ts.map +1 -0
- package/dist/adt/IAdtEnhancement.js +7 -0
- package/dist/adt/IAdtFeatureToggle.d.ts +100 -0
- package/dist/adt/IAdtFeatureToggle.d.ts.map +1 -0
- package/dist/adt/IAdtFeatureToggle.js +5 -0
- package/dist/adt/IAdtFunctionGroup.d.ts +52 -0
- package/dist/adt/IAdtFunctionGroup.d.ts.map +1 -0
- package/dist/adt/IAdtFunctionGroup.js +5 -0
- package/dist/adt/IAdtFunctionInclude.d.ts +23 -0
- package/dist/adt/IAdtFunctionInclude.d.ts.map +1 -0
- package/dist/adt/IAdtFunctionInclude.js +5 -0
- package/dist/adt/IAdtFunctionModule.d.ts +35 -0
- package/dist/adt/IAdtFunctionModule.d.ts.map +1 -0
- package/dist/adt/IAdtFunctionModule.js +5 -0
- package/dist/adt/IAdtInclude.d.ts +45 -0
- package/dist/adt/IAdtInclude.d.ts.map +1 -0
- package/dist/adt/IAdtInclude.js +17 -0
- package/dist/adt/IAdtInterface.d.ts +33 -0
- package/dist/adt/IAdtInterface.d.ts.map +1 -0
- package/dist/adt/IAdtInterface.js +5 -0
- package/dist/adt/IAdtMessageClass.d.ts +35 -0
- package/dist/adt/IAdtMessageClass.d.ts.map +1 -0
- package/dist/adt/IAdtMessageClass.js +2 -0
- package/dist/adt/IAdtMetadataExtension.d.ts +29 -0
- package/dist/adt/IAdtMetadataExtension.d.ts.map +1 -0
- package/dist/adt/IAdtMetadataExtension.js +5 -0
- package/dist/adt/IAdtObject.d.ts +224 -0
- package/dist/adt/IAdtObject.d.ts.map +1 -0
- package/dist/adt/IAdtObject.js +82 -0
- package/dist/adt/IAdtObjectState.d.ts +36 -0
- package/dist/adt/IAdtObjectState.d.ts.map +1 -0
- package/dist/adt/IAdtObjectState.js +13 -0
- package/dist/adt/IAdtPackage.d.ts +69 -0
- package/dist/adt/IAdtPackage.d.ts.map +1 -0
- package/dist/adt/IAdtPackage.js +5 -0
- package/dist/adt/IAdtProgram.d.ts +37 -0
- package/dist/adt/IAdtProgram.d.ts.map +1 -0
- package/dist/adt/IAdtProgram.js +5 -0
- package/dist/adt/IAdtResponse.d.ts +289 -0
- package/dist/adt/IAdtResponse.d.ts.map +1 -0
- package/dist/adt/IAdtResponse.js +51 -0
- package/dist/adt/IAdtScalarFunction.d.ts +30 -0
- package/dist/adt/IAdtScalarFunction.d.ts.map +1 -0
- package/dist/adt/IAdtScalarFunction.js +5 -0
- package/dist/adt/IAdtScalarFunctionImplementation.d.ts +35 -0
- package/dist/adt/IAdtScalarFunctionImplementation.d.ts.map +1 -0
- package/dist/adt/IAdtScalarFunctionImplementation.js +5 -0
- package/dist/adt/IAdtServiceBinding.d.ts +61 -0
- package/dist/adt/IAdtServiceBinding.d.ts.map +1 -0
- package/dist/adt/IAdtServiceBinding.js +33 -0
- package/dist/adt/IAdtServiceDefinition.d.ts +30 -0
- package/dist/adt/IAdtServiceDefinition.d.ts.map +1 -0
- package/dist/adt/IAdtServiceDefinition.js +5 -0
- package/dist/adt/IAdtShared.d.ts +110 -0
- package/dist/adt/IAdtShared.d.ts.map +1 -0
- package/dist/adt/IAdtShared.js +5 -0
- package/dist/adt/IAdtStructure.d.ts +48 -0
- package/dist/adt/IAdtStructure.d.ts.map +1 -0
- package/dist/adt/IAdtStructure.js +5 -0
- package/dist/adt/IAdtTable.d.ts +30 -0
- package/dist/adt/IAdtTable.d.ts.map +1 -0
- package/dist/adt/IAdtTable.js +5 -0
- package/dist/adt/IAdtTableType.d.ts +61 -0
- package/dist/adt/IAdtTableType.d.ts.map +1 -0
- package/dist/adt/IAdtTableType.js +5 -0
- package/dist/adt/IAdtTransformation.d.ts +33 -0
- package/dist/adt/IAdtTransformation.d.ts.map +1 -0
- package/dist/adt/IAdtTransformation.js +7 -0
- package/dist/adt/IAdtTransport.d.ts +104 -0
- package/dist/adt/IAdtTransport.d.ts.map +1 -0
- package/dist/adt/IAdtTransport.js +8 -0
- package/dist/adt/IAdtUnitTest.d.ts +125 -0
- package/dist/adt/IAdtUnitTest.d.ts.map +1 -0
- package/dist/adt/IAdtUnitTest.js +5 -0
- package/dist/adt/IAdtUtilities.d.ts +310 -0
- package/dist/adt/IAdtUtilities.d.ts.map +1 -0
- package/dist/adt/IAdtUtilities.js +92 -0
- package/dist/auth/AuthType.d.ts +5 -0
- package/dist/auth/AuthType.d.ts.map +1 -0
- package/dist/auth/AuthType.js +2 -0
- package/dist/auth/IAuthorizationConfig.d.ts +15 -0
- package/dist/auth/IAuthorizationConfig.d.ts.map +1 -0
- package/dist/auth/IAuthorizationConfig.js +2 -0
- package/dist/auth/IAuthorizationStrategy.d.ts +59 -0
- package/dist/auth/IAuthorizationStrategy.d.ts.map +1 -0
- package/dist/auth/IAuthorizationStrategy.js +12 -0
- package/dist/auth/ICallbackServer.d.ts +139 -0
- package/dist/auth/ICallbackServer.d.ts.map +1 -0
- package/dist/auth/ICallbackServer.js +2 -0
- package/dist/auth/ICertificateMaterialLoader.d.ts +7 -0
- package/dist/auth/ICertificateMaterialLoader.d.ts.map +1 -0
- package/dist/auth/ICertificateMaterialLoader.js +2 -0
- package/dist/auth/IConfig.d.ts +8 -0
- package/dist/auth/IConfig.d.ts.map +1 -0
- package/dist/auth/IConfig.js +2 -0
- package/dist/auth/IConnectionConfig.d.ts +23 -0
- package/dist/auth/IConnectionConfig.d.ts.map +1 -0
- package/dist/auth/IConnectionConfig.js +2 -0
- package/dist/connection/CalmService.d.ts +3 -0
- package/dist/connection/CalmService.d.ts.map +1 -0
- package/dist/connection/CalmService.js +14 -0
- package/dist/connection/IAbapConnection.d.ts +73 -0
- package/dist/connection/IAbapConnection.d.ts.map +1 -0
- package/dist/connection/IAbapConnection.js +2 -0
- package/dist/connection/IAbapRequestOptions.d.ts +9 -0
- package/dist/connection/IAbapRequestOptions.d.ts.map +1 -0
- package/dist/connection/IAbapRequestOptions.js +2 -0
- package/dist/connection/ICalmConnection.d.ts +29 -0
- package/dist/connection/ICalmConnection.d.ts.map +1 -0
- package/dist/connection/ICalmConnection.js +2 -0
- package/dist/connection/ICalmRequestOptions.d.ts +11 -0
- package/dist/connection/ICalmRequestOptions.d.ts.map +1 -0
- package/dist/connection/ICalmRequestOptions.js +2 -0
- package/dist/connection/IConnectionCapabilities.d.ts +217 -0
- package/dist/connection/IConnectionCapabilities.d.ts.map +1 -0
- package/dist/connection/IConnectionCapabilities.js +29 -0
- package/dist/execution/IAdtExecutors.d.ts +78 -0
- package/dist/execution/IAdtExecutors.d.ts.map +1 -0
- package/dist/execution/IAdtExecutors.js +9 -0
- package/dist/execution/IAdtRunnable.d.ts +61 -0
- package/dist/execution/IAdtRunnable.d.ts.map +1 -0
- package/dist/execution/IAdtRunnable.js +2 -0
- package/dist/execution/ITraceScheduling.d.ts +39 -0
- package/dist/execution/ITraceScheduling.d.ts.map +1 -0
- package/dist/execution/ITraceScheduling.js +15 -0
- package/dist/feeds/IFeedRepository.d.ts +32 -0
- package/dist/feeds/IFeedRepository.d.ts.map +1 -0
- package/dist/feeds/IFeedRepository.js +8 -0
- package/dist/feeds/types.d.ts +18 -0
- package/dist/feeds/types.d.ts.map +1 -0
- package/dist/feeds/types.js +9 -0
- package/dist/index.d.ts +103 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/runtime/IApplicationLog.d.ts +21 -0
- package/dist/runtime/IApplicationLog.d.ts.map +1 -0
- package/dist/runtime/IApplicationLog.js +2 -0
- package/dist/runtime/IAtcLog.d.ts +15 -0
- package/dist/runtime/IAtcLog.d.ts.map +1 -0
- package/dist/runtime/IAtcLog.js +2 -0
- package/dist/runtime/IAtcRun.d.ts +99 -0
- package/dist/runtime/IAtcRun.d.ts.map +1 -0
- package/dist/runtime/IAtcRun.js +10 -0
- package/dist/runtime/ICrossTrace.d.ts +32 -0
- package/dist/runtime/ICrossTrace.d.ts.map +1 -0
- package/dist/runtime/ICrossTrace.js +2 -0
- package/dist/runtime/IDdicActivation.d.ts +12 -0
- package/dist/runtime/IDdicActivation.d.ts.map +1 -0
- package/dist/runtime/IDdicActivation.js +2 -0
- package/dist/runtime/IGatewayErrorLog.d.ts +10 -0
- package/dist/runtime/IGatewayErrorLog.d.ts.map +1 -0
- package/dist/runtime/IGatewayErrorLog.js +2 -0
- package/dist/runtime/IProfiler.d.ts +65 -0
- package/dist/runtime/IProfiler.d.ts.map +1 -0
- package/dist/runtime/IProfiler.js +2 -0
- package/dist/runtime/IRuntimeDumps.d.ts +23 -0
- package/dist/runtime/IRuntimeDumps.d.ts.map +1 -0
- package/dist/runtime/IRuntimeDumps.js +2 -0
- package/dist/runtime/ISt05Trace.d.ts +8 -0
- package/dist/runtime/ISt05Trace.d.ts.map +1 -0
- package/dist/runtime/ISt05Trace.js +2 -0
- package/dist/runtime/ISystemMessages.d.ts +10 -0
- package/dist/runtime/ISystemMessages.d.ts.map +1 -0
- package/dist/runtime/ISystemMessages.js +2 -0
- package/dist/runtime/ITrace.d.ts +170 -0
- package/dist/runtime/ITrace.d.ts.map +1 -0
- package/dist/runtime/ITrace.js +14 -0
- package/dist/sap/ISapConfig.d.ts +22 -0
- package/dist/sap/ISapConfig.d.ts.map +1 -0
- package/dist/sap/ISapConfig.js +2 -0
- package/dist/sap/SapAuthType.d.ts +3 -0
- package/dist/sap/SapAuthType.d.ts.map +1 -0
- package/dist/sap/SapAuthType.js +2 -0
- package/dist/service/IAdtService.d.ts +84 -0
- package/dist/service/IAdtService.d.ts.map +1 -0
- package/dist/service/IAdtService.js +27 -0
- package/dist/serviceKey/IServiceKeyStore.d.ts +31 -0
- package/dist/serviceKey/IServiceKeyStore.d.ts.map +1 -0
- package/dist/serviceKey/IServiceKeyStore.js +7 -0
- package/dist/session/ISessionStore.d.ts +59 -0
- package/dist/session/ISessionStore.d.ts.map +1 -0
- package/dist/session/ISessionStore.js +7 -0
- package/dist/shared/IReadOptions.d.ts +9 -0
- package/dist/shared/IReadOptions.d.ts.map +1 -0
- package/dist/shared/IReadOptions.js +2 -0
- package/dist/store/StoreErrorCodes.d.ts +12 -0
- package/dist/store/StoreErrorCodes.d.ts.map +1 -0
- package/dist/store/StoreErrorCodes.js +13 -0
- package/dist/token/AuthType.d.ts +43 -0
- package/dist/token/AuthType.d.ts.map +1 -0
- package/dist/token/AuthType.js +41 -0
- package/dist/token/ITokenProvider.d.ts +27 -0
- package/dist/token/ITokenProvider.d.ts.map +1 -0
- package/dist/token/ITokenProvider.js +8 -0
- package/dist/token/ITokenProviderOptions.d.ts +23 -0
- package/dist/token/ITokenProviderOptions.d.ts.map +1 -0
- package/dist/token/ITokenProviderOptions.js +2 -0
- package/dist/token/ITokenRefresher.d.ts +39 -0
- package/dist/token/ITokenRefresher.d.ts.map +1 -0
- package/dist/token/ITokenRefresher.js +12 -0
- package/dist/token/ITokenResult.d.ts +36 -0
- package/dist/token/ITokenResult.d.ts.map +1 -0
- package/dist/token/ITokenResult.js +7 -0
- package/dist/token/TokenProviderErrorCodes.d.ts +26 -0
- package/dist/token/TokenProviderErrorCodes.d.ts.map +1 -0
- package/dist/token/TokenProviderErrorCodes.js +24 -0
- package/dist/utils/ITokenRefreshResult.d.ts +8 -0
- package/dist/utils/ITokenRefreshResult.d.ts.map +1 -0
- package/dist/utils/ITokenRefreshResult.js +2 -0
- package/dist/validation/IHeaderValidationResult.d.ts +15 -0
- package/dist/validation/IHeaderValidationResult.d.ts.map +1 -0
- package/dist/validation/IHeaderValidationResult.js +2 -0
- package/dist/validation/IValidatedAuthConfig.d.ts +46 -0
- package/dist/validation/IValidatedAuthConfig.d.ts.map +1 -0
- package/dist/validation/IValidatedAuthConfig.js +15 -0
- package/package.json +42 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a member answers with, once the envelope stops being the answer.
|
|
3
|
+
*
|
|
4
|
+
* `IAdtResponse` used to be the transport frame — status, headers, body — handed
|
|
5
|
+
* to a caller as though it were a result. Decisions 13 to 19 are all consequences
|
|
6
|
+
* of that one thing, and this is the shape they arrive at: **a response says
|
|
7
|
+
* whether there is a result and whether there is an error, and both are
|
|
8
|
+
* contracts.**
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const answer = await utils.search({ query: 'ZCL_*' });
|
|
12
|
+
*
|
|
13
|
+
* if (answer.ok) {
|
|
14
|
+
* answer.getResult().value; // whatever this implementation reads
|
|
15
|
+
* } else {
|
|
16
|
+
* answer.getError().origin; // connection, refusal
|
|
17
|
+
* answer.getError().message; // what SAP said, when SAP said anything
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* **Why two methods and not one.** A result can be a normal answer or a failure,
|
|
22
|
+
* and a contract that names only the first pushes the second somewhere the
|
|
23
|
+
* compiler cannot see — which is the family of defects this line of decisions
|
|
24
|
+
* came from, restated as a type. Here a caller cannot reach a result without the
|
|
25
|
+
* contract having told them an error is a thing that exists.
|
|
26
|
+
*
|
|
27
|
+
* **Why the error is a contract and not a class.** A consumer swapping in their
|
|
28
|
+
* own implementation must be able to produce a failure this package describes,
|
|
29
|
+
* and `instanceof` against a class shipped from here would make "swap in your
|
|
30
|
+
* own" untrue. The classes that *are* these shapes live in
|
|
31
|
+
* `@mcp-abap-adt/adt-clients`, where a consumer takes them from if they want
|
|
32
|
+
* `instanceof` as a convenience.
|
|
33
|
+
*/
|
|
34
|
+
import type { IAdtWireResponse } from '../connection/IAbapConnection';
|
|
35
|
+
/**
|
|
36
|
+
* What an error strategy answers when the answer is **not** a failure.
|
|
37
|
+
*
|
|
38
|
+
* A token, not `undefined`. Until 31.0.0 `analyse` answered
|
|
39
|
+
* `IAdtError | undefined`, where `undefined` had to mean two different things —
|
|
40
|
+
* "there is no strategy here" for the optional field, and "this is not a
|
|
41
|
+
* failure" for its result. A reader could not tell which, and neither could a
|
|
42
|
+
* type: absence is not a verdict, and a verdict of "fine" is a thing a strategy
|
|
43
|
+
* says, so it is named.
|
|
44
|
+
*
|
|
45
|
+
* ```typescript
|
|
46
|
+
* analyse: (verdict) => isMissingObject ? ADT_NO_FAILURE : verdict
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare const ADT_NO_FAILURE: "adt:no-failure";
|
|
50
|
+
/** The type of {@link ADT_NO_FAILURE}, for a strategy's signature. */
|
|
51
|
+
export type AdtNoFailure = typeof ADT_NO_FAILURE;
|
|
52
|
+
/**
|
|
53
|
+
* Where a failure came from — **on the server's side of the wire**.
|
|
54
|
+
*
|
|
55
|
+
* A caller cannot act on "something went wrong". Reauthenticating and asking the
|
|
56
|
+
* server something else are different days of work, and flattening them into one
|
|
57
|
+
* message makes the caller guess which.
|
|
58
|
+
*
|
|
59
|
+
* **Two, not three.** `'parse'` was here until 31.0.0, for an answer that
|
|
60
|
+
* arrived and could not be read. That is a failure *inside an implementation*,
|
|
61
|
+
* and this contract describes what came from the server: a strategy is free to
|
|
62
|
+
* read an answer any way it likes — or not to parse at all — so a category
|
|
63
|
+
* naming a step it may never take is one it cannot honour. What an
|
|
64
|
+
* implementation does when its own reading fails is its business, and it may
|
|
65
|
+
* throw.
|
|
66
|
+
*/
|
|
67
|
+
export type AdtFailureOrigin =
|
|
68
|
+
/** No usable answer exists — unreachable host, expired session, no authority. */
|
|
69
|
+
'connection'
|
|
70
|
+
/** SAP answered, about this object, and said no. */
|
|
71
|
+
| 'refusal';
|
|
72
|
+
/**
|
|
73
|
+
* A failure, whichever strategy produced it.
|
|
74
|
+
*
|
|
75
|
+
* Every error strategy returns this — the shipped ones and a consumer's own. What
|
|
76
|
+
* a strategy chooses is **how much of it to fill in**, not whether to be it: a
|
|
77
|
+
* `brief` strategy answers `origin` and `message`, a `full` one adds the response,
|
|
78
|
+
* the request and the server's own classification. A caller writes against this
|
|
79
|
+
* once and reads whatever their strategy chose to provide.
|
|
80
|
+
*
|
|
81
|
+
* Two fields are required because they are the least a failure can say and still
|
|
82
|
+
* be actionable: what kind of failure it was, and what was said about it.
|
|
83
|
+
*
|
|
84
|
+
* **The point is that the methods do not change.** An implementation may fill
|
|
85
|
+
* this in however it likes — parse the document differently, classify `origin`
|
|
86
|
+
* by its own rules, decide what "brief" means for the systems it talks to — and
|
|
87
|
+
* a consumer's code is untouched, because what they call and what they read is
|
|
88
|
+
* the same either way. That is the difference between a contract and a shape
|
|
89
|
+
* agreed by luck.
|
|
90
|
+
*
|
|
91
|
+
* Everything here is what the library was given rather than what it concluded.
|
|
92
|
+
* The one judgement in it is `origin`, and that judgement is the strategy's —
|
|
93
|
+
* replace the strategy and it goes with it.
|
|
94
|
+
*/
|
|
95
|
+
export interface IAdtError {
|
|
96
|
+
/** Which of the two this is. */
|
|
97
|
+
readonly origin: AdtFailureOrigin;
|
|
98
|
+
/**
|
|
99
|
+
* What SAP said, verbatim where SAP said anything.
|
|
100
|
+
*
|
|
101
|
+
* Not a summary and not a translation. A refusal that names the user holding a
|
|
102
|
+
* lock is only useful if that name survives. The document it was read out of
|
|
103
|
+
* is `response.data`.
|
|
104
|
+
*/
|
|
105
|
+
readonly message: string;
|
|
106
|
+
/**
|
|
107
|
+
* `<type id="…">` — the server's own classification, when it gave one.
|
|
108
|
+
*
|
|
109
|
+
* Derived from the document and kept anyway: it is the one part every consumer
|
|
110
|
+
* would otherwise parse out for themselves, and it is the server's word rather
|
|
111
|
+
* than ours. The document itself is not repeated — it is `response.data`, and
|
|
112
|
+
* two fields for one thing is the fault this design has been removing.
|
|
113
|
+
*/
|
|
114
|
+
readonly adtType?: string;
|
|
115
|
+
/** `<namespace id="…">`, when the document names one. */
|
|
116
|
+
readonly namespace?: string;
|
|
117
|
+
/** The response it arrived on, when an answer arrived at all. */
|
|
118
|
+
readonly response?: IAdtWireResponse;
|
|
119
|
+
/**
|
|
120
|
+
* The call that produced it.
|
|
121
|
+
*
|
|
122
|
+
* A chain issues several: `delete()` sends two, `create()` six. "Object is
|
|
123
|
+
* locked" means a different thing depending on which asked, and a caller
|
|
124
|
+
* cannot analyse what they cannot locate.
|
|
125
|
+
*/
|
|
126
|
+
readonly request?: {
|
|
127
|
+
readonly method?: string;
|
|
128
|
+
readonly url?: string;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* The failure's own code, when the strategy names one.
|
|
132
|
+
*
|
|
133
|
+
* {@link AdtObjectErrorCodes} holds the constants. It is here because the
|
|
134
|
+
* contract promises specific failures in specific places — a version resource
|
|
135
|
+
* a system does not expose is `UNSUPPORTED_OPERATION`, and a lock another user
|
|
136
|
+
* holds is `LOCK_FAILED` — and until 30.0.0 those promises were made by
|
|
137
|
+
* members that threw, so a consumer read the code off whatever was caught.
|
|
138
|
+
* With nothing throwing, a promise the failure contract cannot carry is a
|
|
139
|
+
* promise no consumer can keep without a cast.
|
|
140
|
+
*
|
|
141
|
+
* Optional, like `adtType` and `namespace` beside it: what a strategy chooses
|
|
142
|
+
* is how much of this to fill in, not whether to be it. A `brief` strategy may
|
|
143
|
+
* answer `origin` and `message` alone.
|
|
144
|
+
*
|
|
145
|
+
* ```typescript
|
|
146
|
+
* const answer = await versionable.getVersions({ className: 'ZCL_X' });
|
|
147
|
+
* if (!answer.ok && answer.getError().code === AdtObjectErrorCodes.UNSUPPORTED_OPERATION) {
|
|
148
|
+
* // this type has no version resource — ask something else
|
|
149
|
+
* }
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
readonly code?: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The answer to a call: a result **or** a failure, never both and never neither.
|
|
156
|
+
*
|
|
157
|
+
* A union rather than one shape with two optional halves, and that is not a
|
|
158
|
+
* detail. Two independently-optional methods let an implementation answer both
|
|
159
|
+
* or answer nothing, and — worse — checking one does not narrow the other, so
|
|
160
|
+
* the claim "a caller cannot reach a result without being told an error exists"
|
|
161
|
+
* was a sentence in a comment rather than a thing the compiler did.
|
|
162
|
+
*
|
|
163
|
+
* ```typescript
|
|
164
|
+
* const answer = await utils.search({ query: 'ZCL_*' });
|
|
165
|
+
*
|
|
166
|
+
* if (answer.ok) {
|
|
167
|
+
* answer.getResult().value; // the value — not `| undefined`
|
|
168
|
+
* } else {
|
|
169
|
+
* answer.getError().origin; // IAdtError — not `| undefined`
|
|
170
|
+
* }
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
* `ok` exists because TypeScript cannot narrow an object from what a method
|
|
174
|
+
* returns. It is the smallest thing that makes the guarantee real: one field,
|
|
175
|
+
* and both methods stop being maybes.
|
|
176
|
+
*
|
|
177
|
+
* **A strategy chooses how much, never what it is.** `brief`, `medium` and
|
|
178
|
+
* `full` are three amounts of one contract, so a caller writes against
|
|
179
|
+
* `IAdtError` once and reads whatever their strategy provided.
|
|
180
|
+
*
|
|
181
|
+
* **The type parameter has no default.** A member answering `IAdtResponse` and
|
|
182
|
+
* promising nothing is the free type this design refuses, reached by omission.
|
|
183
|
+
*/
|
|
184
|
+
export interface IAdtSuccess<TValue> {
|
|
185
|
+
readonly ok: true;
|
|
186
|
+
getResult(): IAdtResult<TValue>;
|
|
187
|
+
}
|
|
188
|
+
/** The other half of {@link IAdtResponse}: a failure, and no result. */
|
|
189
|
+
export interface IAdtFailure<TError extends IAdtError = IAdtError> {
|
|
190
|
+
readonly ok: false;
|
|
191
|
+
getError(): TError;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* A result, as the contract it is — the other half of the pair with
|
|
195
|
+
* {@link IAdtError}.
|
|
196
|
+
*
|
|
197
|
+
* **The two halves are not symmetric in how they vary, and saying otherwise was
|
|
198
|
+
* wrong.** An error strategy varies the *fullness of one contract*: `IAdtError`
|
|
199
|
+
* has two required fields and five optional ones, so `brief` and `full` are
|
|
200
|
+
* genuinely two amounts of it. A result cannot work that way: a hit shape with
|
|
201
|
+
* a required `description` cannot be returned with fewer fields without the
|
|
202
|
+
* compiler refusing.
|
|
203
|
+
*
|
|
204
|
+
* A result strategy varies **`T` itself**, and `T` follows the strategy the
|
|
205
|
+
* implementation was constructed with (decision 22):
|
|
206
|
+
* `IAdtInformationSystem<MyHits, …>` answers `IAdtResponse<MyHits>` from the
|
|
207
|
+
* same `search(criteria)` call, and another implementation answers its own. A shipped `brief` is a shipped reading with a
|
|
208
|
+
* narrower result contract, not the same contract half-filled.
|
|
209
|
+
*
|
|
210
|
+
* Until 30.0.0 this said "the strategy overload", and four members took a parser
|
|
211
|
+
* at the call. They do not any more — a per-call parser is a second signature
|
|
212
|
+
* every implementer owes whether or not their callers use it.
|
|
213
|
+
*
|
|
214
|
+
* So what does this interface buy, if it holds one field? It is the **named half
|
|
215
|
+
* of an answer**, the counterpart to `IAdtError`, and it is where anything a
|
|
216
|
+
* result needs to say *about itself* goes when a case for one appears — stated
|
|
217
|
+
* as a contract, which is decision 19's rule for what a result may carry. What it must never hold is the
|
|
218
|
+
* transport frame: a `response` field was in the first draft and put `status`,
|
|
219
|
+
* `headers` and `data` back inside every result under one more layer of nesting.
|
|
220
|
+
*
|
|
221
|
+
* A caller who wants the document asks for it the way decision 19 says: a result
|
|
222
|
+
* strategy of their own that answers the document, in a member whose contract
|
|
223
|
+
* says that is what it gives.
|
|
224
|
+
*
|
|
225
|
+
* A bare `T` was tried here and is wrong for the reason a bare `TError` was
|
|
226
|
+
* wrong: a member that hands back an unwrapped value has no room to say anything
|
|
227
|
+
* about it, so "how much" becomes a question only the error side can ask. Both
|
|
228
|
+
* sides of an answer are contracts, or neither is.
|
|
229
|
+
*/
|
|
230
|
+
export interface IAdtResult<T> {
|
|
231
|
+
/** What the member promised — whatever this implementation reads. */
|
|
232
|
+
readonly value: T;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* How an answer becomes a value.
|
|
236
|
+
*
|
|
237
|
+
* {@link IAdtResult} says a result has a value; this says where that value came
|
|
238
|
+
* from. One endpoint serves callers who want very different amounts of it — an
|
|
239
|
+
* MCP server passing the answer to a language model, where size is a budget; a
|
|
240
|
+
* backup tool that must keep the document byte for byte; a script that wants two
|
|
241
|
+
* fields — and none of those readings is more correct than the others.
|
|
242
|
+
*
|
|
243
|
+
* So the reading is not the library's. It is injected into the implementation
|
|
244
|
+
* once, and the member's result type follows it (decision 22). What is *not*
|
|
245
|
+
* offered is a second member per reading — that is decision 16 — nor a parse
|
|
246
|
+
* argument at the call, which was tried across 23 members and reverted.
|
|
247
|
+
*
|
|
248
|
+
* **It is handed the whole answer, not the body.** A reading may need the status
|
|
249
|
+
* or a header, and {@link IAdtOperationOptions.analyse}, the strategy on the
|
|
250
|
+
* error axis, already takes the answer for the same reason. The two axes are
|
|
251
|
+
* symmetric: one decides whether an answer is a failure at all, the other what a
|
|
252
|
+
* non-failure becomes.
|
|
253
|
+
*
|
|
254
|
+
* **It sees this member's own answer.** Requests an implementation issues on the
|
|
255
|
+
* way — to obtain a node id, a scope document, a token — are its own business and
|
|
256
|
+
* reach the consumer only as failures.
|
|
257
|
+
*
|
|
258
|
+
* ```typescript
|
|
259
|
+
* const raw: IResultStrategy<string> = (answer) => String(answer.data);
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
export type IResultStrategy<T> = (answer: IAdtWireResponse) => T;
|
|
263
|
+
/**
|
|
264
|
+
* What a member answers with.
|
|
265
|
+
*
|
|
266
|
+
* The direction for all of them, and reached member by member — decision 19 says
|
|
267
|
+
* nothing forces them to move together. As of 28.0.0 the 22 asynchronous members
|
|
268
|
+
* of `IAdtUtilities` have; 169 elsewhere have not, and still answer their result
|
|
269
|
+
* or a frame directly. Each converges when it is next touched.
|
|
270
|
+
*
|
|
271
|
+
* **Both halves are parameters, and both are constrained to their contract.**
|
|
272
|
+
* That is the difference between a type parameter and a free one: an
|
|
273
|
+
* implementation may hand back `IAdtError & { retryAfter: number }` and say so in
|
|
274
|
+
* the type, and a caller written against `IAdtError` still reads it. Fixing the
|
|
275
|
+
* error half at `IAdtError` — which the first version did — left an
|
|
276
|
+
* implementation with no way to describe what it actually returns, which is the
|
|
277
|
+
* opposite of "swap in your own".
|
|
278
|
+
*
|
|
279
|
+
* `TValue` is what the member promised, typed all the way through: a caller
|
|
280
|
+
* reads `getResult().value` and gets that value typed, never a cast. `IAdtResult`
|
|
281
|
+
* is the contract carrying it, and it is not written at the call site — a member
|
|
282
|
+
* that adds nothing writes `IAdtResponse<TValue>` and no more.
|
|
283
|
+
*
|
|
284
|
+
* `TError` defaults to `IAdtError` and is constrained to it, which is what keeps
|
|
285
|
+
* two implementations of one member interchangeable: a caller may read more than
|
|
286
|
+
* the contract if their implementation offers more, and never less.
|
|
287
|
+
*/
|
|
288
|
+
export type IAdtResponse<TValue, TError extends IAdtError = IAdtError> = IAdtSuccess<TValue> | IAdtFailure<TError>;
|
|
289
|
+
//# sourceMappingURL=IAdtResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAdtResponse.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAG,gBAAyB,CAAC;AAExD,sEAAsE;AACtE,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAC;AAEjD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,gBAAgB;AAC1B,iFAAiF;AAC/E,YAAY;AACd,oDAAoD;GAClD,SAAS,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,SAAS;IACxB,gCAAgC;IAChC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAElC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAErC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE;QACjB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,WAAW,CAAC,MAAM;IACjC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,SAAS,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;CACjC;AAaD,wEAAwE;AACxE,MAAM,WAAW,WAAW,CAAC,MAAM,SAAS,SAAS,GAAG,SAAS;IAC/D,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,IAAI,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,KAAK,CAAC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,YAAY,CAAC,MAAM,EAAE,MAAM,SAAS,SAAS,GAAG,SAAS,IACjE,WAAW,CAAC,MAAM,CAAC,GACnB,WAAW,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* What a member answers with, once the envelope stops being the answer.
|
|
4
|
+
*
|
|
5
|
+
* `IAdtResponse` used to be the transport frame — status, headers, body — handed
|
|
6
|
+
* to a caller as though it were a result. Decisions 13 to 19 are all consequences
|
|
7
|
+
* of that one thing, and this is the shape they arrive at: **a response says
|
|
8
|
+
* whether there is a result and whether there is an error, and both are
|
|
9
|
+
* contracts.**
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const answer = await utils.search({ query: 'ZCL_*' });
|
|
13
|
+
*
|
|
14
|
+
* if (answer.ok) {
|
|
15
|
+
* answer.getResult().value; // whatever this implementation reads
|
|
16
|
+
* } else {
|
|
17
|
+
* answer.getError().origin; // connection, refusal
|
|
18
|
+
* answer.getError().message; // what SAP said, when SAP said anything
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* **Why two methods and not one.** A result can be a normal answer or a failure,
|
|
23
|
+
* and a contract that names only the first pushes the second somewhere the
|
|
24
|
+
* compiler cannot see — which is the family of defects this line of decisions
|
|
25
|
+
* came from, restated as a type. Here a caller cannot reach a result without the
|
|
26
|
+
* contract having told them an error is a thing that exists.
|
|
27
|
+
*
|
|
28
|
+
* **Why the error is a contract and not a class.** A consumer swapping in their
|
|
29
|
+
* own implementation must be able to produce a failure this package describes,
|
|
30
|
+
* and `instanceof` against a class shipped from here would make "swap in your
|
|
31
|
+
* own" untrue. The classes that *are* these shapes live in
|
|
32
|
+
* `@mcp-abap-adt/adt-clients`, where a consumer takes them from if they want
|
|
33
|
+
* `instanceof` as a convenience.
|
|
34
|
+
*/
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ADT_NO_FAILURE = void 0;
|
|
37
|
+
/**
|
|
38
|
+
* What an error strategy answers when the answer is **not** a failure.
|
|
39
|
+
*
|
|
40
|
+
* A token, not `undefined`. Until 31.0.0 `analyse` answered
|
|
41
|
+
* `IAdtError | undefined`, where `undefined` had to mean two different things —
|
|
42
|
+
* "there is no strategy here" for the optional field, and "this is not a
|
|
43
|
+
* failure" for its result. A reader could not tell which, and neither could a
|
|
44
|
+
* type: absence is not a verdict, and a verdict of "fine" is a thing a strategy
|
|
45
|
+
* says, so it is named.
|
|
46
|
+
*
|
|
47
|
+
* ```typescript
|
|
48
|
+
* analyse: (verdict) => isMissingObject ? ADT_NO_FAILURE : verdict
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
exports.ADT_NO_FAILURE = 'adt:no-failure';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScalarFunction (CDS DSFD/SCF) ADT operation parameter interfaces (low-level)
|
|
3
|
+
*/
|
|
4
|
+
export interface ICreateScalarFunctionParams {
|
|
5
|
+
scalar_function_name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
package_name: string;
|
|
8
|
+
transport_request?: string;
|
|
9
|
+
masterSystem?: string;
|
|
10
|
+
responsible?: string;
|
|
11
|
+
masterLanguage?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IUpdateScalarFunctionParams {
|
|
14
|
+
scalar_function_name: string;
|
|
15
|
+
source_code: string;
|
|
16
|
+
transport_request?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IDeleteScalarFunctionParams {
|
|
19
|
+
scalar_function_name: string;
|
|
20
|
+
transport_request?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IScalarFunctionConfig {
|
|
23
|
+
scalarFunctionName: string;
|
|
24
|
+
masterLanguage?: string;
|
|
25
|
+
packageName?: string;
|
|
26
|
+
transportRequest?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
sourceCode?: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=IAdtScalarFunction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAdtScalarFunction.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtScalarFunction.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,2BAA2B;IAC1C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,2BAA2B;IAC1C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,2BAA2B;IAC1C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAGD,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScalarFunctionImplementation (DSFI/SFI) ADT operation parameter interfaces (low-level)
|
|
3
|
+
*/
|
|
4
|
+
export type ScalarFunctionEngine = 'sqlEngine' | 'amdpEngine';
|
|
5
|
+
export interface ICreateScalarFunctionImplementationParams {
|
|
6
|
+
implementation_name: string;
|
|
7
|
+
scalar_function_name: string;
|
|
8
|
+
engine_value?: ScalarFunctionEngine;
|
|
9
|
+
description?: string;
|
|
10
|
+
package_name: string;
|
|
11
|
+
transport_request?: string;
|
|
12
|
+
masterSystem?: string;
|
|
13
|
+
responsible?: string;
|
|
14
|
+
masterLanguage?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IUpdateScalarFunctionImplementationParams {
|
|
17
|
+
implementation_name: string;
|
|
18
|
+
source_code: string;
|
|
19
|
+
transport_request?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IDeleteScalarFunctionImplementationParams {
|
|
22
|
+
implementation_name: string;
|
|
23
|
+
transport_request?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface IScalarFunctionImplementationConfig {
|
|
26
|
+
implementationName: string;
|
|
27
|
+
scalarFunctionName: string;
|
|
28
|
+
engineValue?: ScalarFunctionEngine;
|
|
29
|
+
masterLanguage?: string;
|
|
30
|
+
packageName?: string;
|
|
31
|
+
transportRequest?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
sourceCode?: string;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=IAdtScalarFunctionImplementation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAdtScalarFunctionImplementation.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtScalarFunctionImplementation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,YAAY,CAAC;AAE9D,MAAM,WAAW,yCAAyC;IACxD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,yCAAyC;IACxD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,yCAAyC;IACxD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,mCAAmC;IAClD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Binding ADT operation parameter interfaces (snake_case, low-level)
|
|
3
|
+
*/
|
|
4
|
+
export type ServiceBindingType = 'ODATA' | 'INA' | 'SQL';
|
|
5
|
+
export type ServiceBindingVersion = 'V2' | 'V4' | '0001' | '0000' | string;
|
|
6
|
+
export type GeneratedServiceType = 'odatav2' | 'odatav4';
|
|
7
|
+
export type DesiredPublicationState = 'published' | 'unpublished' | 'unchanged';
|
|
8
|
+
export type ServiceBindingVariant = 'ODATA_V2_UI' | 'ODATA_V2_WEB_API' | 'ODATA_V4_UI' | 'ODATA_V4_WEB_API';
|
|
9
|
+
export declare const SERVICE_BINDING_VARIANT_MAP: Record<ServiceBindingVariant, {
|
|
10
|
+
bindingType: ServiceBindingType;
|
|
11
|
+
bindingVersion: ServiceBindingVersion;
|
|
12
|
+
bindingCategory: '0' | '1';
|
|
13
|
+
serviceType: GeneratedServiceType;
|
|
14
|
+
}>;
|
|
15
|
+
export interface ICreateServiceBindingParams {
|
|
16
|
+
bindingName: string;
|
|
17
|
+
packageName: string;
|
|
18
|
+
description: string;
|
|
19
|
+
serviceDefinitionName: string;
|
|
20
|
+
serviceName: string;
|
|
21
|
+
serviceVersion: string;
|
|
22
|
+
bindingVariant: ServiceBindingVariant;
|
|
23
|
+
masterLanguage?: string;
|
|
24
|
+
masterSystem?: string;
|
|
25
|
+
responsible?: string;
|
|
26
|
+
transportRequest?: string;
|
|
27
|
+
runTransportCheck?: boolean;
|
|
28
|
+
activateAfterCreate?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface IReadServiceBindingParams {
|
|
31
|
+
bindingName: string;
|
|
32
|
+
version?: 'active' | 'inactive';
|
|
33
|
+
}
|
|
34
|
+
export interface IUpdateServiceBindingParams {
|
|
35
|
+
bindingName: string;
|
|
36
|
+
desiredPublicationState: DesiredPublicationState;
|
|
37
|
+
serviceType: GeneratedServiceType;
|
|
38
|
+
serviceName: string;
|
|
39
|
+
serviceVersion?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface IDeleteServiceBindingParams {
|
|
42
|
+
bindingName: string;
|
|
43
|
+
transportRequest?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface IServiceBindingConfig {
|
|
46
|
+
bindingName: string;
|
|
47
|
+
packageName?: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
serviceDefinitionName?: string;
|
|
50
|
+
serviceName?: string;
|
|
51
|
+
serviceVersion?: string;
|
|
52
|
+
bindingVariant?: ServiceBindingVariant;
|
|
53
|
+
masterLanguage?: string;
|
|
54
|
+
masterSystem?: string;
|
|
55
|
+
responsible?: string;
|
|
56
|
+
desiredPublicationState?: DesiredPublicationState;
|
|
57
|
+
serviceType?: GeneratedServiceType;
|
|
58
|
+
transportRequest?: string;
|
|
59
|
+
runTransportCheck?: boolean;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=IAdtServiceBinding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAdtServiceBinding.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtServiceBinding.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC;AACzD,MAAM,MAAM,qBAAqB,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAC3E,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,SAAS,CAAC;AACzD,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,CAAC;AAEhF,MAAM,MAAM,qBAAqB,GAC7B,aAAa,GACb,kBAAkB,GAClB,aAAa,GACb,kBAAkB,CAAC;AAGvB,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC9C,qBAAqB,EACrB;IACE,WAAW,EAAE,kBAAkB,CAAC;IAChC,cAAc,EAAE,qBAAqB,CAAC;IACtC,eAAe,EAAE,GAAG,GAAG,GAAG,CAAC;IAC3B,WAAW,EAAE,oBAAoB,CAAC;CACnC,CA0BF,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,qBAAqB,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CACjC;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,WAAW,EAAE,oBAAoB,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Service Binding ADT operation parameter interfaces (snake_case, low-level)
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SERVICE_BINDING_VARIANT_MAP = void 0;
|
|
7
|
+
// Future: INA_UI, SQL_WEB_API — see fr0ster/mcp-abap-adt-clients#18
|
|
8
|
+
exports.SERVICE_BINDING_VARIANT_MAP = {
|
|
9
|
+
ODATA_V2_UI: {
|
|
10
|
+
bindingType: 'ODATA',
|
|
11
|
+
bindingVersion: 'V2',
|
|
12
|
+
bindingCategory: '0',
|
|
13
|
+
serviceType: 'odatav2',
|
|
14
|
+
},
|
|
15
|
+
ODATA_V2_WEB_API: {
|
|
16
|
+
bindingType: 'ODATA',
|
|
17
|
+
bindingVersion: 'V2',
|
|
18
|
+
bindingCategory: '1',
|
|
19
|
+
serviceType: 'odatav2',
|
|
20
|
+
},
|
|
21
|
+
ODATA_V4_UI: {
|
|
22
|
+
bindingType: 'ODATA',
|
|
23
|
+
bindingVersion: 'V4',
|
|
24
|
+
bindingCategory: '0',
|
|
25
|
+
serviceType: 'odatav4',
|
|
26
|
+
},
|
|
27
|
+
ODATA_V4_WEB_API: {
|
|
28
|
+
bindingType: 'ODATA',
|
|
29
|
+
bindingVersion: 'V4',
|
|
30
|
+
bindingCategory: '1',
|
|
31
|
+
serviceType: 'odatav4',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Definition ADT operation parameter interfaces (snake_case, low-level)
|
|
3
|
+
*/
|
|
4
|
+
export interface ICreateServiceDefinitionParams {
|
|
5
|
+
service_definition_name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
package_name: string;
|
|
8
|
+
transport_request?: string;
|
|
9
|
+
masterSystem?: string;
|
|
10
|
+
responsible?: string;
|
|
11
|
+
masterLanguage?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IUpdateServiceDefinitionParams {
|
|
14
|
+
service_definition_name: string;
|
|
15
|
+
source_code: string;
|
|
16
|
+
transport_request?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IDeleteServiceDefinitionParams {
|
|
19
|
+
service_definition_name: string;
|
|
20
|
+
transport_request?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IServiceDefinitionConfig {
|
|
23
|
+
serviceDefinitionName: string;
|
|
24
|
+
masterLanguage?: string;
|
|
25
|
+
packageName?: string;
|
|
26
|
+
transportRequest?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
sourceCode?: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=IAdtServiceDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAdtServiceDefinition.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtServiceDefinition.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,8BAA8B;IAC7C,uBAAuB,EAAE,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,8BAA8B;IAC7C,uBAAuB,EAAE,MAAM,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,8BAA8B;IAC7C,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAGD,MAAM,WAAW,wBAAwB;IACvC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|