import { AdtHTTP } from "../AdtHTTP"; import { AbapObjectStructure } from "./objectstructure"; /** * A single enhancement plugin element within an enhancement implementation. * Corresponds to in the ADT enhancements response. */ export interface EnhancementElement { /** ADT URI of this specific source code plugin element */ uri: string; /** Sequential id within the implementation, e.g. "1", "2" */ id: string; /** * Enhancement point path in the form * \PR:\FO:
\SE:
\EI */ fullname: string; /** Insertion mode – typically "any" */ mode: string; /** True when this element replaces (rather than augments) the enhancement point */ replacing: boolean; /** * Decoded ABAP source code of the enhancement. * Only populated when objectEnhancements() is called with includeSource = true. */ source?: string; /** Position of this enhancement within the base object's source */ position?: { /** Full ADT URI including the #start= fragment */ uri: string; /** 0-based line number in the base include/program */ startLine: number; /** 0-based column */ startColumn: number; }; } /** * One enhancement implementation (an ENHO object) together with all its * active elements bound to the queried base object. */ export interface EnhancementImplementation { /** Enhancement implementation object name, e.g. ZP2D_IADX_UPD_ATP_CODE */ name: string; /** Object type – typically ENHO/XH */ type: string; /** Version – typically "active" */ version: string; /** All plugin elements contained in this implementation */ elements: EnhancementElement[]; /** * The parent program / function group that this enhancement is bound to. * Corresponds to in the response. */ enhancedObject?: { uri: string; type: string; name: string; }; } /** Result returned by objectEnhancements(). */ export interface ObjectEnhancementsResult { implementations: EnhancementImplementation[]; } /** * Retrieve all enhancement implementations active on a given ABAP source object. * * Mirrors the Eclipse ADT request: * * GET /sap/bc/adt/{type}/{name}/source/main/enhancements?context={contextUri} * Accept: application/vnd.sap.adt.enhancements.v3+xml * * @param h ADT HTTP client (stateless is fine – read-only) * @param sourceMainPathOrObject * Either a plain ADT path string or an AbapObjectStructure. * - String forms accepted: * /sap/bc/adt/programs/includes/mv45afzz/source/main * /sap/bc/adt/programs/includes/mv45afzz (normalised automatically) * /sap/bc/adt/oo/classes/myclas/includes/main (class include path) * - When an AbapObjectStructure is supplied, the correct source path is * derived via ADTClient.mainInclude(object) so class includes and CDS * views are resolved from object metadata rather than by string heuristics. * @param contextUri ADT path of the *containing program* (PROG/P or FUGR). * Only needed – and only sent by Eclipse – for program * includes (PROG/I), because a single include can belong * to more than one program. Not required for classes, * function modules, function groups, or interfaces. * Example: /sap/bc/adt/programs/programs/sapmv45a * @param includeSource When true, decode and return the full ABAP source of * each enhancement element (Base64 decoded). * Defaults to false so decorations/info calls stay fast. */ export declare function objectEnhancements(h: AdtHTTP, sourceMainPathOrObject: string | AbapObjectStructure, contextUri?: string, includeSource?: boolean): Promise; //# sourceMappingURL=enhancements.d.ts.map