@mcp-abap-adt/interfaces-adt 29.0.0 → 30.1.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 CHANGED
@@ -7,6 +7,301 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [30.1.0] - 2026-11-19
11
+
12
+ A design fix, released as a minor: the contract kept a field read-only that
13
+ the cloud writes. What it changes for a consumer is listed under Changed.
14
+
15
+ ### Fixed
16
+
17
+ - **A cloud settings write carries `isWritableByAMDP`; an on-premise one
18
+ refuses it.** The cloud's `CL_TABT_WB_PERSIST->move_adt_to_ddv` writes
19
+ `allowed_for_amdp_write` from the document (Code, cloud), and a PUT that
20
+ leaves the element out reset it to `false` (measured on the cloud,
21
+ 2026-11-19: written `true`, read back `true`; a later PUT without it, read
22
+ back `false`). 30.0.0 refused the field on a write, so every cloud write
23
+ through the contract reset it. Neither the on-premise transformation nor
24
+ its `move_adt_to_ddv` maps it (Code, on premise). The write is now typed by
25
+ the system kind: `ITableSettingsByVariant`, `ITableSettingsOf<V>`
26
+ (`'cloud'` requires the flag, `'onprem'` refuses it),
27
+ `ITableSettingsReadOf<V>`, and `ITableSettingsUpdateConfig<V>` /
28
+ `IAdtTableSettingsUpdatable<T, V>` with `V` defaulting to either newer
29
+ system.
30
+ - **The translation's words say what was measured.** An element written
31
+ with an attribute missing is refused (400 `00/001` with an `XML_PATH`
32
+ property), an absent element is accepted (200); measured on both, Code
33
+ `SDDIC_ADT_TTAB` (`tt:cond`) on both. SAP stores `value` alone
34
+ (`move_adt_to_ddv`, Code on both). The contract keeps the element required.
35
+ 29.0.0 said all four attributes
36
+ are required; measured: an absent element is accepted, an incomplete one is
37
+ refused. The description is required on both systems (SWB_TOOL 019, now
38
+ measured on the cloud too).
39
+
40
+ ### Added
41
+
42
+ - **`IAdtTableSettingsPatchable<T, V>.patchMetadata`** (decision 51): under
43
+ the caller's lock, read the working area with its ETag, overlay the
44
+ changes, write the whole document with `If-Match` — SAP resets every
45
+ setting a write leaves out (Code on both, measured on both).
46
+ `ITableSettingsChangesOf<V>` / `ITableSettingsChanges`: at least one
47
+ setting (`{}`, `{ buffering: {} }`, `{ translation: {} }` do not compile);
48
+ `ITableBufferingChange` (`areaKeyFields` only with type `G` or with the
49
+ type kept — SAP writes it only for `G`, Code on both); `ITableTranslationChange`
50
+ (`value` alone — the one attribute SAP stores); `isWritableByAMDP` on the
51
+ cloud only; no explicit `undefined` under `exactOptionalPropertyTypes`.
52
+ `ITableSettingsPatchConfig<V>`, `IAdtTableSettingsPatchOptions`
53
+ (`lockHandle` required, no `source`, no `ifMatch`) and
54
+ `IAdtTableSettingsPatchHeaders` (`accept` the literal
55
+ `TABLE_SETTINGS_MEDIA_TYPE`, no `contentType`: the implementation sends the
56
+ guarded PUT without a charset). A patch refuses an `areaKeyFields` change
57
+ whose resulting type is not `G`, before any PUT (SAP keeps the count only
58
+ for `G`, Code on both).
59
+ - README and doc comment: "What the types cannot see" — a widened variant
60
+ or extra keys carried through a variable, union or spread pass the static
61
+ rules; `patchMetadata` writes back what it read.
62
+ - README: judge a table's activation by its messages. With a stored data
63
+ class SAP does not know (`ZZNOP`), activating the table answered
64
+ `activationExecuted="true"` with type-`E` messages — on the cloud "Value
65
+ in field Data Class; value ZZNOP not permitted" (`DT(609)`), on premise
66
+ "Activation was cancelled." and "Value in field Data Class (value ZZNOP
67
+ not permitted)" — and the table stayed inactive (measured on both). The
68
+ ETag claims say what was measured (a fresh ETag: no charset `200`, a
69
+ charset `412`; a stale ETag never measured).
70
+
71
+ ### Changed
72
+
73
+ - **What a consumer of 30.0.0 meets:**
74
+ - `ITableSettingsUpdateConfig` and `IAdtTableSettingsUpdatable` take a
75
+ variant `V` (default either newer system). With the default, a value of
76
+ either kind compiles, so every value that compiled against 30.0.0 still
77
+ does; with `'cloud'` a write without `isWritableByAMDP` no longer
78
+ compiles — the point of the fix.
79
+ - **Source break: the default write type's `isWritableByAMDP` widened
80
+ from `?: never`.** Code typed for 30.0.0 that relies on it being
81
+ `undefined` — an `updateMetadata` implementation declaring
82
+ `config: { settings: ITableSettings & { isWritableByAMDP?: never } }`, or
83
+ a helper taking 30.0.0's `ITableSettingsUpdateConfig['settings']` and
84
+ passing it on as such — gets `TS2322` when handed the 30.1.0 default
85
+ type. What to do: take `ITableSettingsOf<V>` (or
86
+ `ITableSettingsUpdateConfig<V>`) for the variant served, and on the cloud
87
+ write the flag as given.
88
+ - `ITableSettings` is unchanged; an exhaustive map over the keys of the
89
+ settings a cloud write carries (`keyof ITableSettingsOf<'cloud'>`) has
90
+ the new key `isWritableByAMDP`.
91
+
92
+ ## [30.0.0] - 2026-11-19
93
+
94
+ ### Breaking
95
+
96
+ - **`AdtApiName`, `AdtTypeCode`, `AdtObjectKind`, `CodesOfMain<'PROG'>`,
97
+ `CodesOfMain<'CLAS'>` and the unions derived from the on-premise and cloud
98
+ tables gain members** — `textElements`, `PROG/PX`, `CLAS/OCX` and
99
+ `text_elements` (below); and so do the utility, group activation and
100
+ where-used codes drawn from them (`AdtUtilityCode`,
101
+ `AdtGroupActivationCode`, `AdtWhereUsedCode`, …, listed under Migration).
102
+ A union that widens breaks an exhaustive map over it, so this is a major.
103
+
104
+ ### Migration
105
+
106
+ - **Every union that widens**, found by a compile-time probe of each export
107
+ of 29.0.0 against 30.0.0 (every variant `onprem`, `cloud`, `basis740` and
108
+ `'onprem' | 'cloud'`; every operation). No union of `basis740` widened; its
109
+ where-used parameters tighten as every variant's do (below).
110
+ - The API names: `AdtApiName`, `keyof AdtApiTable<R>`, `AdtApi<V>`, and
111
+ `AdtApiWith<V, Op>` / `AdtApiWithIn<T, Op>` for `Op` among `read`,
112
+ `update`, `lock`, `unlock` — gain `textElements`; and with `AdtApiName`
113
+ every `parent` that names an API: `IAdtCodeFacts<R>['parent']`,
114
+ `IAdtCodelessApiEntry<R>['parent']`, and so `AdtApiEntry<R>['parent']`
115
+ (`IAdtCodedApiEntry<R>`'s codes carry it).
116
+ - The codes: `AdtTypeCode`, `AdtTypeCodeOf<V>`, `AdtCodeOf<V>`,
117
+ `AdtCodeOfIn<Tables, V>`, and `AdtTypeCodeWith<V, Op>`, `AdtCodeWith<V, Op>`,
118
+ `AdtCodeWithIn<Tables, V, Op>` for the same four operations — gain
119
+ `'PROG/PX'` and `'CLAS/OCX'`; `CodesOfMain<'PROG'>` gains `'PROG/PX'` and
120
+ `CodesOfMain<'CLAS'>` gains `'CLAS/OCX'`.
121
+ - The kinds: `AdtObjectKind` gains `'text_elements'`.
122
+ - The utility codes: `AdtUtilityCode` gains both codes, and
123
+ `AdtUtilityCodeWith<V, 'groupActivation'>` gains them through the utility
124
+ tables (`IAdtUtilityCodeTables`); so do `AdtGroupActivationCode<V>` and
125
+ `IAdtGroupActivationReference<V>['type']` — what `activateObjects` and the
126
+ typed `activateObjectsGroup` take.
127
+ - Where-used, per code as measured: `AdtWhereUsedCode<V>`, so
128
+ `IAdtWhereUsedParamsOf<V>['object_type']` and
129
+ `IAdtWhereUsedScopeParamsOf<V>['object_type']`, gain `'PROG/PX'` on
130
+ `onprem`, `cloud` and the default `'onprem' | 'cloud'`, as the untyped
131
+ `IGetWhereUsedParams['object_type']` and
132
+ `IGetWhereUsedScopeParams['object_type']` do. `CLAS/OCX` is in none of
133
+ them: the systems measured serve no where-used for it.
134
+ - **`PROG/PX` names its container in a where-used.** `IGetWhereUsedParams`
135
+ and `IGetWhereUsedScopeParams` (and so `IAdtWhereUsedParamsOf<V>` /
136
+ `IAdtWhereUsedScopeParamsOf<V>`) are type aliases now, not interfaces:
137
+ with `object_type: 'PROG/PX'` they require `container: 'program' |
138
+ 'functionGroup'` (`TextElementsWhereUsedContainer`), which decides the
139
+ address (`/sap/bc/adt/textelements/programs/{name}` or
140
+ `…/functiongroups/{name}`), and every other code refuses a `container`.
141
+ What a consumer does:
142
+ - a literal with another code compiles as before;
143
+ - a value whose `object_type` is a variable of the whole union (it may be
144
+ `PROG/PX`) needs the `container` when it is `PROG/PX` — narrow the code
145
+ first, or build the `PROG/PX` case apart;
146
+ - `interface X extends IGetWhereUsedParams` (the default, a union) no
147
+ longer compiles (`TS2312`), nor does a generic
148
+ `interface X<C extends …> extends IGetWhereUsedParams<C>` (the type is
149
+ a conditional over `C`): use a type alias with `&`
150
+ (`type X<C extends …> = IGetWhereUsedParams<C> & { … }`), or extend a
151
+ single code's params (`IGetWhereUsedParams<'PROG/P'>` still does);
152
+ - a builder typed by the union — `(code: AdtWhereUsedCode<V>):
153
+ IAdtWhereUsedParamsOf<V> => ({ object_name, object_type: code })`,
154
+ generic in `V` or for one variant — no longer compiles (`TS2322`): the
155
+ code may be `PROG/PX`, which needs its `container`. Generic in `V`,
156
+ exclude it from the input (`code: Exclude<AdtWhereUsedCode<V>,
157
+ 'PROG/PX'>`) — branching on `code === 'PROG/PX'` still fails there
158
+ (`TS2322`), since the code stays generic. For one variant the branch
159
+ compiles too (`code === 'PROG/PX' ? { …, container } : { … }`);
160
+ - a value of another code that carries a `container` of its own — say
161
+ `{ object_type: 'PROG/P', container: string }` built for a consumer's
162
+ own use — no longer passes as where-used parameters, on every variant
163
+ `basis740` included (whose where-used has no `PROG/PX` at all): drop
164
+ the field before passing it (`const { container, ...params } = value`);
165
+ - `object_type` and `container` are `readonly`, like the text elements'
166
+ `objectKind` and `part`: code that assigns them on a built value builds
167
+ a new one instead (`{ ...params, object_type: … }`, the container
168
+ stated with it).
169
+ - **An explicit type argument that no longer fits.** `IGetWhereUsedParams`
170
+ and `IGetWhereUsedScopeParams` constrain `C` to every code but
171
+ `CLAS/OCX`, so `IGetWhereUsedParams<AdtTypeCode>` and
172
+ `IGetWhereUsedScopeParams<AdtTypeCode>` (or with `| AdtGroupOnlyCode`)
173
+ stop compiling with `TS2344`: `AdtTypeCode` now holds `CLAS/OCX`. Drop
174
+ the argument and use the default (every code where-used is asked of),
175
+ use the variant's `IAdtWhereUsedParamsOf<V>` /
176
+ `IAdtWhereUsedScopeParamsOf<V>`, or pass
177
+ `Exclude<AdtTypeCode, 'CLAS/OCX'>`. These two are the only exported
178
+ generics where a type argument valid on 29.0.0 is refused on 30.0.0 —
179
+ found by instantiating every exported generic with its 29.0.0
180
+ constraints under 30.0.0's names (generics whose constraint names a
181
+ sibling parameter, such as `AdtCodeOfIn<Tables, V>`, take the caller's
182
+ own tables and were not instantiated).
183
+ - References and answers: `IObjectReference['type']` (default
184
+ `AdtTypeCode`), `IAdtCodedReference<AdtTypeCode>['type']` and
185
+ `IAdtCodedReference<AdtCodeOf<V>>['type']`, and the known-code branch of
186
+ `IAdtAnsweredObject['type']` gain both codes.
187
+ - The tables themselves: `IAdtTypeTables` (a `textElements` entry on
188
+ `onprem` and `cloud`) and `IAdtUtilityCodeTables` (two codes on each).
189
+ - **What a consumer does.** A map keyed by any of these
190
+ (`{ [C in AdtTypeCode]: … }`, `Record<AdtObjectKind, …>`, …) adds the new
191
+ keys; a `switch` that relies on exhaustiveness over one (a `never` check in
192
+ its `default`) adds the cases — `textElements` / `'text_elements'` for an
193
+ API or a kind, `'PROG/PX'` and `'CLAS/OCX'` for a code, which is a program's
194
+ or a class's text elements, addressed under `/sap/bc/adt/textelements/…`.
195
+ A consumer that maps a code to an address or a reader handles them, or
196
+ refuses them, there. A consumer reading an `IAdtAnsweredObject` gets
197
+ either code as `type`, typed, where 29.0.0 carried it as `unknownType`, the
198
+ text as it came. Nothing that only passes values through changes.
199
+ The main types (`AdtMainType`) are unchanged: `PROG` and `CLAS` were there.
200
+
201
+ ### Added
202
+
203
+ - **Text elements, as a contract of their own**
204
+ (`src/adt/IAdtTextElements.ts`): the text symbols, selection texts and
205
+ list and column headings of a program, a class or a function group. SAP
206
+ keeps them at `/sap/bc/adt/textelements/{programs|classes|functiongroups}/{name}`,
207
+ one part per sub-resource (`…/source/{symbols|selections|headings}`, media
208
+ type `application/vnd.sap.adt.textelements.{part}.v1`), under their own
209
+ lock (class `TEXT`); read and written on premise and on the cloud,
210
+ 2026-11-19, for a program and a class. They are not part of
211
+ `IProgramConfig` or `IClassConfig`.
212
+ - `TEXT_ELEMENTS_OBJECT_KINDS` (`program`, `class`, `functionGroup`) and
213
+ `TEXT_ELEMENTS_PARTS` (`symbols`, `selections`, `headings`), with
214
+ `TextElementsObjectKind` and `TextElementsPart`;
215
+ `ITextElementsPartsByKind` / `TextElementsPartOf<K>`: a class has text
216
+ symbols only (SAP's handler, Code).
217
+ - `ITextElementsConfig` (`objectKind`, `objectName`, `transportRequest?`):
218
+ what the lock takes, through `IAdtLockable` with both fields required.
219
+ - `ITextElementsPartConfig`: the object and a part it has — what a read
220
+ takes. `TextElementsReadVersion` is `AdtReadVersion` — `active`,
221
+ `inactive` or `workingArea`, every value SAP's handler maps (Eclipse
222
+ sends `workingArea`); absent, SAP's working area.
223
+ - The typed documents: `ITextSymbol` (`key`, `text`, `maxLength`),
224
+ `ISelectionText` (`name`, `text`), `ITextHeadings` (`listHeader`,
225
+ `columnHeader1`–`columnHeader4`, each required), and
226
+ `TextElementsDocument`, the part with its list.
227
+ - `ITextElementsUpdateConfig`: the object and one whole part. **A write
228
+ replaces the part**: an entry the list leaves out is deleted (measured),
229
+ so create, change and delete are one write.
230
+ - `IAdtTextElementsReadable<TSource>`: `read(config, version?, options?)`,
231
+ `IAdtTextElementsReadOptions` (`analyse`, `timeout`).
232
+ `IAdtTextElementsUpdatable<TUpdated>`: `update(config, options)`, one PUT,
233
+ its body built from the config (decision 50);
234
+ `IAdtTextElementsUpdateOptions` is `IAdtUpdateOptions` with `source?:
235
+ never` and `lockHandle` required, in both overloads.
236
+ - `ITextElementsResults`: `source` and `updated`.
237
+ - No activation member: a write lands inactive, and one activation request
238
+ naming the object and `/sap/bc/adt/textelements/{kind}/{name}` activates
239
+ both (measured); the object's reference alone does not. `PROG/PX` and
240
+ `CLAS/OCX` are in `ADT_UTILITY_CODES_ONPREM` and `ADT_UTILITY_CODES_CLOUD`
241
+ with `groupActivation` (as `DEVC/K` is), so the typed `activateObjects`
242
+ and `activateObjectsGroup` take the text elements' reference —
243
+ `{ name, type: 'PROG/PX', uri: '/sap/bc/adt/textelements/programs/{name}' }`
244
+ — beside the object's. Measured on premise for a program and on the cloud
245
+ for a class; each other pairing is `measured: false`.
246
+ - Where-used follows SAP, per code (measured read-only, 2026-11-19; Code:
247
+ `CL_RIS_ADT_RES_REFERENCES`, which refuses no type and answers `200` with
248
+ "Where-Used List is not supported for &1" and no result where it serves
249
+ none): `PROG/PX` is served on premise — the scope offers `PROG/P` and
250
+ `PROG/PS` — and on the cloud (a delivered program's, `RSPARAM`), and a
251
+ function group's text elements resolve to it; `CLAS/OCX` was not served
252
+ on the on-premise and cloud systems measured ("… not supported for Text
253
+ Element: Class."; the answer depends on the system's RIS metadata), so
254
+ `AdtWhereUsedCode` and the untyped where-used parameters leave it out.
255
+ All of them stay in the group activation.
256
+ - A `PROG/PX` where-used names its `container` (`'program'` or
257
+ `'functionGroup'`, `TextElementsWhereUsedContainer`, required), which
258
+ decides the address — a program's and a function group's text elements
259
+ are both `PROG/PX` and both served (measured), and the table keeps one
260
+ collection per code. No other code takes a `container`.
261
+ - A function group's text elements are typed `PROG/PX` under their own URI
262
+ (`/sap/bc/adt/textelements/functiongroups/{group}`): beside `FUGR/F`, or
263
+ alone, that reference activates them (measured on premise; the name may
264
+ be `{GROUP}` or `SAPL{GROUP}`, the URI decides). `FUGR/PX` — only the
265
+ properties document's `adtcore:type` — is no code of the tables.
266
+ - The key limits, measured on premise and in SAP's handlers, as constants
267
+ for a caller (no check here): `TEXT_SYMBOL_KEY_MAX_LENGTH` (3 accepted,
268
+ `0#1` and `AB1` included; 4 refused `406` `SEDX_ADT/106`; shorter not
269
+ measured),
270
+ `SELECTION_TEXT_NAME_MAX_LENGTH` (8; `406` `SEDX_ADT/102`), and the
271
+ closed heading keys `TEXT_HEADING_KEYS` / `TextHeadingKey` (any other
272
+ `406` `SEDX_ADT/101`). An unknown selection name is stored, not checked
273
+ against the selection screen (measured).
274
+ - Headings: a heading sent empty or left out is deleted, and a read lists
275
+ all five (measured). `?version=` is case-insensitive, and an unknown or
276
+ empty value answers the working area (measured on premise); on the cloud
277
+ every value is accepted and none distinguished (no inactive version
278
+ existed, measured read-only).
279
+ - `ITextElementsConfig`, `ITextElementsPartConfig` and
280
+ `ITextElementsUpdateConfig` keep `objectKind` (and `part`) `readonly`: a
281
+ built config cannot be re-kinded.
282
+ - `ISelectionText.ddicReference` (required): the `@DDICReference` line,
283
+ a text that is the dictionary field's label — SAP answers the label and
284
+ replaces any text a write sends (measured). `SELECTION_TEXT_MAX_LENGTH`
285
+ is 30: a longer text refuses the whole write, `406` `SEDX_ADT/110`
286
+ (measured); documented, not checked.
287
+ - `TextElementsReadVersion` is measured on premise: absent, `inactive` and
288
+ `workingArea` answer the working area, `active` the last activated
289
+ version.
290
+ `IAdtTextElementsReadOptions` refuses `source`, `lockHandle` and
291
+ `ifMatch` (`?: never`).
292
+ - The original language only: SAP ignores the logon language for these
293
+ (measured); there is no language field.
294
+ - **`textElements` in `ADT_TYPES_ONPREM` and `ADT_TYPES_CLOUD`**: kind
295
+ `text_elements`, collection `/sap/bc/adt/textelements`, codes `PROG/PX`
296
+ (collection `…/programs`) and `CLAS/OCX` (`…/classes`) — parent none and
297
+ names up to 30, as each `typestructure` lists them — with `read`, `update`,
298
+ `lock` and `unlock`. No function group code: no release's `typestructure`
299
+ lists one. A function group's text elements are measured on premise
300
+ (`…/functiongroups/{group}`, the plain name; the properties name them
301
+ `FUGR/PX`, the inactive list `PROG/PX` `SAPL{GROUP}`; the group's and the
302
+ text elements' URIs activate together). SAP_BASIS 7.40's discovery has no
303
+ `/textelements` collection, so `ADT_TYPES_BASIS_740` has no entry.
304
+
10
305
  ## [29.0.0] - 2026-11-19
11
306
 
12
307
  ### Breaking