@mcp-abap-adt/interfaces 0.1.10 → 0.1.12

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,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.12] - 2025-12-10
11
+
12
+ ### Added
13
+ - **IAdtObject Interface - Metadata Reading**: Added `readMetadata()` method to `IAdtObject` interface
14
+ - `readMetadata(config: Partial<TConfig>): Promise<TReadResult>` - Reads object metadata (characteristics: package, responsible, description, etc.)
15
+ - For objects with source code (Class, Interface, Program), reads metadata separately from source code
16
+ - For objects without source code (Domain, DataElement), may delegate to `read()` as `read()` already returns metadata
17
+ - Returns state with metadata result in `metadataResult` field
18
+ - **IAdtObjectState - Metadata Result Field**: Added `metadataResult?: AxiosResponse` field to `IAdtObjectState`
19
+ - Stores metadata read result from `readMetadata()` method
20
+ - Contains object characteristics (package, responsible, description, etc.)
21
+
22
+ ## [0.1.11] - 2025-12-10
23
+
24
+ ### Changed
25
+ - **IAdtObjectConfig Interface - Common Fields**: Extended `IAdtObjectConfig` with common fields shared across all ADT object configurations
26
+ - Added `packageName?: string` - Package name (required for create operations, optional for others)
27
+ - Added `description?: string` - Description (required for create/validate operations, optional for others)
28
+ - `transportRequest?: string` - Transport request (already existed)
29
+ - All specific configuration types (e.g., `IAdtClassConfig`, `DomainBuilderConfig`) should extend `IAdtObjectConfig` to inherit these common fields
30
+
10
31
  ## [0.1.10] - 2025-12-10
11
32
 
12
33
  ### Added
@@ -116,12 +116,24 @@ export interface IAdtObject<TConfig, TReadResult = TConfig> {
116
116
  */
117
117
  create(config: TConfig, options?: IAdtOperationOptions): Promise<TReadResult>;
118
118
  /**
119
- * Read object
119
+ * Read object (source code or XML that describes the object)
120
+ * For objects without source code (Domain, DataElement), this returns metadata XML.
121
+ * For objects with source code (Class, Interface, Program), this returns source code.
122
+ *
120
123
  * @param config - Object identification (name, etc.)
121
124
  * @param version - 'active' or 'inactive'
122
125
  * @returns Object configuration or source code, or undefined if not found
123
126
  */
124
127
  read(config: Partial<TConfig>, version?: 'active' | 'inactive'): Promise<TReadResult | undefined>;
128
+ /**
129
+ * Read object metadata (object characteristics: package, responsible, description, etc.)
130
+ * For objects with source code (Class, Interface, Program), this reads metadata separately from source code.
131
+ * For objects without source code (Domain, DataElement), this may delegate to read() as read() already returns metadata.
132
+ *
133
+ * @param config - Object identification (name, etc.)
134
+ * @returns State with metadata result
135
+ */
136
+ readMetadata(config: Partial<TConfig>): Promise<TReadResult>;
125
137
  /**
126
138
  * Update object with full operation chain:
127
139
  * lock → check(inactive) → update → unlock → check → activate (optional)
@@ -1 +1 @@
1
- {"version":3,"file":"IAdtObject.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtObject.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB;IAC9B,6BAA6B;;IAE7B,iFAAiF;;IAEjF,+BAA+B;;IAE/B,6BAA6B;;IAE7B,2BAA2B;;IAE3B,6BAA6B;;IAE7B,+BAA+B;;IAE/B,0BAA0B;;IAE1B,4BAA4B;;IAE5B,8BAA8B;;CAEtB,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU,CAAC,OA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;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEvD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzD;;;;;;OAMG;IACH,KAAK,CACH,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,EACxB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,CAAC,CAAC;IAExB;;;;OAIG;IACH,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CAC/D"}
@@ -9,7 +9,7 @@ import { AxiosResponse } from 'axios';
9
9
  * Base state that all ADT Object state types should extend
10
10
  *
11
11
  * This interface defines the common structure for all operation results
12
- * returned by IAdtObject methods (validate, create, read, update, delete, activate, check).
12
+ * returned by IAdtObject methods (validate, create, read, readMetadata, update, delete, activate, check, readTransport).
13
13
  *
14
14
  * Specific state types can extend this interface to add entity-specific fields.
15
15
  *
@@ -37,8 +37,10 @@ export interface IAdtObjectState {
37
37
  activateResult?: AxiosResponse;
38
38
  /** Delete operation response from delete() method */
39
39
  deleteResult?: AxiosResponse;
40
- /** Read operation response from read() method */
40
+ /** Read operation response from read() method (source code or XML) */
41
41
  readResult?: AxiosResponse;
42
+ /** Metadata read result from readMetadata() method (object characteristics: package, responsible, description, etc.) */
43
+ metadataResult?: AxiosResponse;
42
44
  /** Transport request read result from readTransport() method */
43
45
  transportResult?: AxiosResponse;
44
46
  /** Array of errors that occurred during operations */
@@ -51,20 +53,23 @@ export interface IAdtObjectState {
51
53
  /**
52
54
  * Base configuration interface for all ADT Object operations
53
55
  *
54
- * This interface can be extended by specific configuration types
55
- * to ensure consistency. However, most configurations are entity-specific
56
- * and may not need a common base interface.
56
+ * This interface defines common fields that are present in all ADT object configurations.
57
+ * Specific configuration types should extend this interface to ensure consistency.
57
58
  *
58
59
  * Example:
59
60
  * ```typescript
60
61
  * export interface DomainBuilderConfig extends IAdtObjectConfig {
61
62
  * domainName: string;
62
- * packageName?: string;
63
63
  * // ... domain-specific fields
64
+ * // packageName, description, transportRequest are inherited from IAdtObjectConfig
64
65
  * }
65
66
  * ```
66
67
  */
67
68
  export interface IAdtObjectConfig {
69
+ /** Package name (required for create operations, optional for others) */
70
+ packageName?: string;
71
+ /** Description (required for create/validate operations, optional for others) */
72
+ description?: string;
68
73
  /** Transport request (optional, used for create/update/delete operations) */
69
74
  transportRequest?: string;
70
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IAdtObjectState.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtObjectState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,qDAAqD;IACrD,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,mDAAmD;IACnD,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,uDAAuD;IACvD,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,yDAAyD;IACzD,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,qDAAqD;IACrD,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,iDAAiD;IACjD,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,gEAAgE;IAChE,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC,sDAAsD;IACtD,MAAM,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC;QAAC,SAAS,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,MAAM,CAAC;IACrB,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/interfaces",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Shared interfaces for MCP ABAP ADT packages",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",