@abapify/adk 0.4.0 → 0.4.3

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.
@@ -0,0 +1,3351 @@
1
+ import { LockEntry, LockHandle, LockHandle as LockHandle$1, LockService, LockService as LockService$1, LockStore, LockStore as LockRegistry, LockStore as LockStore$1, createLockService } from "@abapify/adt-locks";
2
+ import { AdtClient, AdtClient as AdtClient$1, ClassResponse as ClassResponse$1, DataElementResponse, DomainResponse, FunctionGroupResponse as FunctionGroupResponse$1, FunctionModuleResponse as FunctionModuleResponse$1, IncludeResponse as IncludeResponse$1, InterfaceResponse as InterfaceResponse$1, PackageResponse as PackageResponse$1, ProgramResponse as ProgramResponse$1, SourceVersionRef, TableResponse, TableTypeResponse, TransportGetResponse } from "@abapify/adt-client";
3
+ import { BasicObjectPropertiesResponse } from "@abapify/adt-contracts";
4
+ //#region src/base/adt.d.ts
5
+ /**
6
+ * Extract the abapClass variant from ClassResponse union
7
+ * ClassResponse = { abapClass: ... } | { abapClassInclude: ... }
8
+ * ADK Class objects only use the abapClass variant
9
+ */
10
+ type ClassResponse = Extract<ClassResponse$1, {
11
+ abapClass: unknown;
12
+ }>;
13
+ /**
14
+ * Extract the abapInterface variant from InterfaceResponse union
15
+ */
16
+ type InterfaceResponse = Extract<InterfaceResponse$1, {
17
+ abapInterface: unknown;
18
+ }>;
19
+ /**
20
+ * Extract the package variant from PackageResponse union
21
+ * PackageResponse = { package: ... } | { packageTree: ... }
22
+ * ADK Package objects only use the package variant
23
+ */
24
+ type PackageResponse = Extract<PackageResponse$1, {
25
+ package: unknown;
26
+ }>;
27
+ /**
28
+ * Program response type - single root element (no union needed)
29
+ */
30
+ type ProgramResponse = ProgramResponse$1;
31
+ /**
32
+ * Include response type - single root element (no union needed)
33
+ */
34
+ type IncludeResponse = IncludeResponse$1;
35
+ /**
36
+ * Function group response type - single root element (no union needed)
37
+ */
38
+ type FunctionGroupResponse = FunctionGroupResponse$1;
39
+ /**
40
+ * Function module response type - single root element (no union needed)
41
+ */
42
+ type FunctionModuleResponse = FunctionModuleResponse$1;
43
+ /**
44
+ * ADT REST contracts accessible via client.adt.*
45
+ *
46
+ * This is the typed contract layer from adt-client.
47
+ * Example: client.adt.oo.classes.get('ZCL_MY_CLASS')
48
+ */
49
+ type AdtContracts = AdtClient$1['adt'];
50
+ /**
51
+ * ADK Contract interface
52
+ *
53
+ * Proxy to adt-client contracts.
54
+ * Provides typed access to ADT REST endpoints.
55
+ */
56
+ interface AdkContract {
57
+ /** OO contracts (classes, interfaces) */
58
+ readonly oo: AdtContracts['oo'];
59
+ /** Packages contract */
60
+ readonly packages: AdtContracts['packages'];
61
+ /** CTS contracts (transports) */
62
+ readonly cts: AdtContracts['cts'];
63
+ /** Core contracts (discovery, sessions) */
64
+ readonly core: AdtContracts['core'];
65
+ /** Repository contracts (search) */
66
+ readonly repository: AdtContracts['repository'];
67
+ /** Programs contracts */
68
+ readonly programs: AdtContracts['programs'];
69
+ /** Functions contracts (function groups) */
70
+ readonly functions: AdtContracts['functions'];
71
+ /** DDIC contracts (domains, data elements, structures, tables, table types) */
72
+ readonly ddic: AdtContracts['ddic'];
73
+ /** BO contracts (behavior definitions) */
74
+ readonly bo: AdtContracts['bo'];
75
+ }
76
+ /**
77
+ * Create ADK contract from ADT client
78
+ *
79
+ * @param client - ADT client instance from createAdtClient()
80
+ * @returns ADK contract proxy
81
+ */
82
+ declare function createAdkContract(client: AdtClient$1): AdkContract;
83
+ //#endregion
84
+ //#region src/base/context.d.ts
85
+ /**
86
+ * Context provided to all ADK objects
87
+ *
88
+ * Provides direct access to ADT client.
89
+ * Objects use client.adt.* for contracts and client.services.* for services.
90
+ *
91
+ * @example
92
+ * // In AdkClass.load():
93
+ * const data = await this.ctx.client.adt.oo.classes.get(this.name);
94
+ *
95
+ * // In AdkTransport:
96
+ * const transport = await this.ctx.client.services.transports.get(this.id);
97
+ */
98
+ interface AdkContext {
99
+ /**
100
+ * ADT client instance
101
+ *
102
+ * Provides:
103
+ * - client.adt.* - Low-level REST contracts
104
+ * - client.services.* - High-level service APIs
105
+ * - client.fetch() - Raw HTTP for edge cases
106
+ */
107
+ readonly client: AdtClient;
108
+ /**
109
+ * Optional lock store for persisting lock handles to disk.
110
+ *
111
+ * When provided, lock()/unlock() will register/deregister entries
112
+ * so that stale locks can be recovered after process crashes.
113
+ * If not provided, locks are only held in memory (default behavior).
114
+ */
115
+ readonly lockStore?: LockStore$1;
116
+ /**
117
+ * Lock service for centralized lock/unlock operations.
118
+ *
119
+ * Provides HTTP lock/unlock + automatic store registration.
120
+ * Used by ADK models, CLI commands, and export logic so that
121
+ * every lock operation is tracked in a single store.
122
+ */
123
+ readonly lockService?: LockService$1;
124
+ }
125
+ //#endregion
126
+ //#region src/base/model.d.ts
127
+ /**
128
+ * Save mode for create/update operations
129
+ * - 'update': PUT to existing object (default, fails if doesn't exist)
130
+ * - 'create': POST to create new object (skips POST if already exists, then updates)
131
+ * - 'upsert': Try PUT first, fall back to POST if 404
132
+ */
133
+ type SaveMode = 'update' | 'create' | 'upsert';
134
+ /**
135
+ * Options for save operations
136
+ */
137
+ interface SaveOptions {
138
+ /** Transport request for the change */
139
+ transport?: string;
140
+ /** Save as inactive (default: false) */
141
+ inactive?: boolean;
142
+ /** Save mode: 'update' (default), 'create', or 'upsert' */
143
+ mode?: SaveMode;
144
+ /**
145
+ * Retry only the immediate post-create LOCK when a backend keeps its
146
+ * generated CTS/editor lock briefly after accepting the skeleton POST.
147
+ */
148
+ postCreateLockRetry?: {
149
+ /** Total LOCK attempts, including the first one. */
150
+ attempts: number;
151
+ /** Delay between conflicting LOCK attempts in milliseconds. */
152
+ delayMs: number;
153
+ };
154
+ }
155
+ type InternalSaveOptions = SaveOptions & {
156
+ postCreate?: boolean;
157
+ };
158
+ /**
159
+ * SAP accepted the skeleton POST, but rejected the immediate follow-up lock.
160
+ *
161
+ * The object therefore exists in SAP, while the source or metadata supplied
162
+ * to the original save call has not yet been persisted. Callers must retry
163
+ * the same object with `mode: 'update'` after the CTS/editor lock is cleared;
164
+ * repeating `mode: 'create'` risks an "already exists" response.
165
+ */
166
+ declare class AdkPostCreateLockError extends Error {
167
+ readonly objectUri: string;
168
+ readonly transport: string | undefined;
169
+ readonly code: "ADT_POST_CREATE_LOCKED";
170
+ readonly name = "AdkPostCreateLockError";
171
+ constructor(objectUri: string, transport: string | undefined, cause: unknown);
172
+ }
173
+ /**
174
+ * Result of bulk activation
175
+ */
176
+ interface ActivationResult {
177
+ /** Number of successfully activated objects */
178
+ success: number;
179
+ /** Number of objects that failed activation */
180
+ failed: number;
181
+ /** Activation messages (errors, warnings) */
182
+ messages: string[];
183
+ /** Raw response from SAP (for debugging) */
184
+ response?: string;
185
+ }
186
+ /**
187
+ * Atom link (from atom:link element)
188
+ * Used for HATEOAS-style navigation in ADT responses
189
+ */
190
+ interface AtomLink {
191
+ href: string;
192
+ rel?: string;
193
+ type?: string;
194
+ title?: string;
195
+ etag?: string;
196
+ }
197
+ /**
198
+ * ADT object reference (adtcore:objectReference)
199
+ */
200
+ interface AdtObjectReference {
201
+ uri?: string;
202
+ name?: string;
203
+ type?: string;
204
+ description?: string;
205
+ packageName?: string;
206
+ }
207
+ /**
208
+ * Base data contract for all ADK objects
209
+ * Matches XSD AdtObject type attributes and elements
210
+ */
211
+ interface AdkObjectData {
212
+ name: string;
213
+ type: string;
214
+ description?: string;
215
+ changedBy?: string;
216
+ changedAt?: string | Date;
217
+ createdBy?: string;
218
+ createdAt?: string | Date;
219
+ version?: string;
220
+ language?: string;
221
+ descriptionTextLimit?: number;
222
+ links?: AtomLink[];
223
+ containerRef?: AdtObjectReference;
224
+ }
225
+ /**
226
+ * Main object data contract (extends AdtObject)
227
+ * Matches XSD AdtMainObject type
228
+ */
229
+ interface AdkMainObjectData extends AdkObjectData {
230
+ packageRef?: AdtObjectReference;
231
+ masterSystem?: string;
232
+ masterLanguage?: string;
233
+ responsible?: string;
234
+ abapLanguageVersion?: string;
235
+ }
236
+ /**
237
+ * Base class for all ADK objects
238
+ *
239
+ * All ADK objects (AdkPackage, AdkTransportRequest, etc.) extend this.
240
+ * Supports deferred loading - create with just a name, then call load().
241
+ *
242
+ * Note: Uses loose type constraint for D to allow schema-inferred types
243
+ * from contracts which may have different shapes. The getters safely
244
+ * handle missing properties with defaults.
245
+ *
246
+ * @typeParam K - The object kind (from AdkKind)
247
+ * @typeParam D - The internal data type (typically schema-inferred from contract)
248
+ */
249
+ declare abstract class AdkObject<K extends AdkKind = AdkKind, D = any> {
250
+ /** Object kind identifier */
251
+ abstract readonly kind: K;
252
+ /**
253
+ * ADT object URI - base path for all operations.
254
+ * Example: `/sap/bc/adt/oo/classes/zcl_my_class`
255
+ */
256
+ abstract get objectUri(): string;
257
+ /**
258
+ * ADT collection URI - base path for creating new objects.
259
+ * Example: `/sap/bc/adt/oo/classes`
260
+ * Default: derived from objectUri by removing the object name
261
+ */
262
+ get collectionUri(): string;
263
+ protected ctx: AdkContext;
264
+ /** Public access to the ADT client for plugins and external code */
265
+ get client(): AdtClient;
266
+ protected _data?: D;
267
+ protected _name: string;
268
+ protected cache: Map<string, unknown>;
269
+ protected dirty: Set<string>;
270
+ protected _lockHandle?: LockHandle$1;
271
+ /** Set by save() when all pending changes are identical to SAP state */
272
+ _unchanged: boolean;
273
+ /**
274
+ * Create ADK object
275
+ * @param ctx - ADK context
276
+ * @param dataOrName - Full data object OR just the object name for deferred loading
277
+ */
278
+ constructor(ctx: AdkContext, dataOrName: D | string);
279
+ /**
280
+ * Adopt a richer context (merge services into existing context).
281
+ *
282
+ * Used by AdkObjectSet to propagate lockService / lockStore
283
+ * to objects created by plugins that only have { client }.
284
+ * Keeps the original client reference intact.
285
+ */
286
+ adoptContext(ctx: AdkContext): void;
287
+ /**
288
+ * Load object data from SAP
289
+ *
290
+ * Default implementation uses crudContract.get() and unwraps with wrapperKey.
291
+ * Objects without crudContract must override this.
292
+ *
293
+ * @returns this (for chaining)
294
+ */
295
+ load(): Promise<this>;
296
+ /** Whether data has been loaded */
297
+ get isLoaded(): boolean;
298
+ /**
299
+ * Get data - auto-loads if not already loaded
300
+ * @returns Promise that resolves to the data
301
+ */
302
+ data(): Promise<D>;
303
+ /**
304
+ * Get data synchronously - throws if not loaded
305
+ * Use when you know data is already loaded
306
+ */
307
+ get dataSync(): D;
308
+ /** Set data (for subclasses to use after loading) */
309
+ protected setData(data: D): void;
310
+ /** Helper to access data with AdkObjectData properties */
311
+ private get coreData();
312
+ /** ADT object name (adtcore:name) - available even before load() */
313
+ get name(): string;
314
+ /** ADT object type (adtcore:type, e.g. 'RQRQ', 'DEVC/K') - requires load() */
315
+ get type(): string;
316
+ /** Description text (adtcore:description) */
317
+ get description(): string;
318
+ /** Version state (adtcore:version) - active, inactive, etc. */
319
+ get version(): string;
320
+ /** Current language (adtcore:language) */
321
+ get language(): string;
322
+ /** User who last modified (adtcore:changedBy) */
323
+ get changedBy(): string;
324
+ /** Last modification timestamp (adtcore:changedAt) */
325
+ get changedAt(): Date;
326
+ /** User who created (adtcore:createdBy) */
327
+ get createdBy(): string;
328
+ /** Creation timestamp (adtcore:createdAt) */
329
+ get createdAt(): Date;
330
+ /** All atom:link elements */
331
+ get links(): AtomLink[];
332
+ /** Find link by rel attribute */
333
+ getLink(rel: string): AtomLink | undefined;
334
+ /** Get link href by rel, or undefined */
335
+ getLinkHref(rel: string): string | undefined;
336
+ /** Container reference (adtcore:containerRef) */
337
+ get containerRef(): AdtObjectReference | undefined;
338
+ /** Check if object is currently locked */
339
+ get isLocked(): boolean;
340
+ /** Get current lock handle */
341
+ get lockHandle(): LockHandle$1 | undefined;
342
+ /**
343
+ * Lock the object for modification
344
+ *
345
+ * Delegates to the lock service (single lock mechanism).
346
+ *
347
+ * The lock response contains:
348
+ * - LOCK_HANDLE: Required for subsequent PUT/unlock operations
349
+ * - CORRNR: Transport request assigned to this object (use for PUT if no explicit transport)
350
+ * - CORRUSER: User who owns the transport
351
+ *
352
+ * @param transport - Optional transport request to use for locking.
353
+ * Required when object is already in a transport.
354
+ */
355
+ lock(transport?: string): Promise<LockHandle$1>;
356
+ /**
357
+ * Unlock the object
358
+ *
359
+ * Delegates to the lock service (single lock mechanism).
360
+ */
361
+ unlock(): Promise<void>;
362
+ /**
363
+ * Set lock handle (for subclasses that need custom lock logic)
364
+ */
365
+ protected setLockHandle(handle: LockHandle$1 | undefined): void;
366
+ /**
367
+ * Save the object to SAP
368
+ *
369
+ * Generic implementation that handles:
370
+ * - Lock/unlock lifecycle
371
+ * - Mode switching (create/update/upsert)
372
+ * - Error handling
373
+ *
374
+ * Subclasses implement `saveViaContract()` to provide the typed contract call.
375
+ *
376
+ * Modes:
377
+ * - 'update' (default): PUT to existing object
378
+ * - 'create': POST skeleton, then lock → PUT/source → unlock (Eclipse ADT pattern)
379
+ * - 'upsert': Check existence, create if needed, then update
380
+ *
381
+ * @param options - Save options
382
+ * @returns this (for chaining)
383
+ */
384
+ save(options?: InternalSaveOptions): Promise<this>;
385
+ /**
386
+ * Wrapper key for the data in contract requests/responses
387
+ *
388
+ * Contracts wrap data like { abapClass: ... } or { abapInterface: ... }.
389
+ * Subclasses that support save override this.
390
+ */
391
+ protected get wrapperKey(): string | undefined;
392
+ /**
393
+ * CRUD contract for this object type
394
+ *
395
+ * Subclasses that support save override this to return their contract.
396
+ */
397
+ protected get crudContract(): any;
398
+ /**
399
+ * Execute the typed contract call for save
400
+ *
401
+ * Generic implementation using wrapperKey and crudContract.
402
+ * Objects that don't support save leave wrapperKey/crudContract undefined.
403
+ *
404
+ * For 'create' mode: POSTs skeleton data (minimal fields).
405
+ * For 'update' mode: PUTs full data (all fields except abapLanguageVersion).
406
+ *
407
+ * @param mode - 'create' (POST skeleton) or 'update' (PUT full)
408
+ * @param options - Contract options (transport, lockHandle)
409
+ */
410
+ protected saveViaContract(mode: 'create' | 'update', options: {
411
+ transport?: string;
412
+ lockHandle?: string;
413
+ }): Promise<void>;
414
+ /**
415
+ * Get skeleton data for object creation (POST).
416
+ *
417
+ * Returns only the minimal fields needed to create the object on SAP.
418
+ * SAP creates the object structure (includes, etc.) from these fields.
419
+ * Full metadata and source code are sent via PUT in the update step.
420
+ *
421
+ * Override in subclasses that need different skeleton fields.
422
+ */
423
+ protected getSkeletonData(): Promise<Record<string, unknown>>;
424
+ /**
425
+ * Check if the object exists on the SAP system.
426
+ *
427
+ * Used by upsert mode to decide between update and create paths upfront.
428
+ * On BTP, locking a non-existent DDIC object creates a draft that persists
429
+ * even after unlock, blocking subsequent POST (create) attempts. Checking
430
+ * existence first with GET avoids this problem entirely.
431
+ */
432
+ protected checkObjectExists(): Promise<boolean>;
433
+ /**
434
+ * Check if error is a 404 Not Found
435
+ */
436
+ protected isNotFoundError(e: unknown): boolean;
437
+ /**
438
+ * Some CTS backends can retain the lock created by a successful object POST
439
+ * long enough for the immediate follow-up LOCK to fail. This is distinct
440
+ * from an arbitrary edit conflict because this save invocation already
441
+ * created the skeleton successfully.
442
+ */
443
+ private isPostCreateLockConflict;
444
+ /**
445
+ * Some backends retain the lock implicitly created by a successful POST for
446
+ * a short time. Retry only this known follow-up LOCK; no arbitrary update or
447
+ * source write is repeated, and each successful lock still uses the normal
448
+ * handle-backed save/unlock lifecycle.
449
+ */
450
+ private lockAfterCreate;
451
+ /**
452
+ * Upsert fallback: try POST (create), treat 422 "already exists" as unchanged.
453
+ * Extracted to avoid duplication in lock-catch and saveViaContract-catch paths.
454
+ */
455
+ private fallbackToCreate;
456
+ /**
457
+ * Check if error suggests the object doesn't exist or the operation
458
+ * is not supported for the current state.
459
+ *
460
+ * Some SAP DDIC endpoints (TABL, TTYP) return 405 Method Not Allowed
461
+ * instead of 404 when attempting to lock or PUT a non-existent object.
462
+ * In upsert mode, both should trigger a fallback to POST (create).
463
+ */
464
+ protected shouldFallbackToCreate(e: unknown): boolean;
465
+ /**
466
+ * Check if error is a 422 "already exists" from a POST create attempt
467
+ */
468
+ protected isAlreadyExistsError(e: unknown): boolean;
469
+ /**
470
+ * Check if object has pending sources to save
471
+ * Subclasses with source code (classes, interfaces) override this
472
+ */
473
+ protected hasPendingSources(): boolean;
474
+ /**
475
+ * Normalize source code for comparison.
476
+ * Trims trailing whitespace/newlines so minor formatting differences
477
+ * don't trigger unnecessary saves.
478
+ */
479
+ protected normalizeSource(source: string): string;
480
+ /**
481
+ * Check if pending sources are unchanged vs SAP (pre-lock comparison).
482
+ * Sets _unchanged = true if nothing needs saving.
483
+ *
484
+ * Default handles single-source objects (_pendingSource) by fetching
485
+ * GET {objectUri}/source/main and comparing.
486
+ * AdkClass overrides this for multi-include logic.
487
+ */
488
+ protected checkPendingSourcesUnchanged(): Promise<void>;
489
+ /**
490
+ * Check if metadata-only objects are unchanged on SAP.
491
+ *
492
+ * For objects without source code (DDIC types like DOMA, DTEL, TABL, TTYP),
493
+ * fetches the current SAP state and compares only the fields present in
494
+ * the local data. SAP returns extra volatile fields (timestamps, links,
495
+ * version, etc.) that are ignored — only semantic fields matter.
496
+ */
497
+ protected checkMetadataUnchanged(): Promise<void>;
498
+ /**
499
+ * Refresh cached ETags after acquiring a lock.
500
+ *
501
+ * SAP changes the object's internal version when a lock is acquired,
502
+ * which invalidates any cached ETags. Without refreshing, the next
503
+ * PUT sends a stale If-Match header and SAP returns HTTP 412.
504
+ *
505
+ * For objects with pending sources: re-GET {objectUri}/source/main
506
+ * For metadata-only objects: re-GET via crudContract.get()
507
+ *
508
+ * Subclasses with multiple source endpoints (e.g., AdkClass with includes)
509
+ * should override this to refresh all relevant endpoints.
510
+ */
511
+ protected refreshETagsAfterLock(): Promise<void>;
512
+ /**
513
+ * Save pending sources to SAP.
514
+ *
515
+ * Default handles single-source objects (_pendingSource) by PUTting
516
+ * to {objectUri}/source/main.
517
+ * AdkClass overrides this for multi-include logic.
518
+ */
519
+ protected savePendingSources(options?: {
520
+ lockHandle?: string;
521
+ transport?: string;
522
+ }): Promise<void>;
523
+ /**
524
+ * Set source content for a source-based object
525
+ *
526
+ * Generic implementation for objects with source code (classes, includes, etc.)
527
+ * Subclasses should override if they need custom source handling.
528
+ *
529
+ * @param sourcePath - Relative path to source (e.g., '/source/main')
530
+ * @param content - Source code content
531
+ * @param options - Save options
532
+ */
533
+ setSource(sourcePath: string, content: string, options?: SaveOptions): Promise<void>;
534
+ /**
535
+ * Activate this object
536
+ *
537
+ * Activates a single object. For bulk activation of multiple objects,
538
+ * use `AdkObjectSet.activateAll()`.
539
+ *
540
+ * @returns this (for chaining)
541
+ */
542
+ activate(): Promise<this>;
543
+ /** Lazy load a segment (async) - fetches only once, then cached */
544
+ protected lazy<T>(key: string, loader: () => Promise<T>): Promise<T>;
545
+ /** Lazy compute a segment (sync) - computes only once, then cached */
546
+ protected cached<T>(key: string, compute: () => T): T;
547
+ /** Set a cached value directly (for local/generated data) */
548
+ protected set<T>(key: string, value: T): void;
549
+ /** Mark a segment as dirty (modified locally) */
550
+ protected markDirty(key: string): void;
551
+ /** Check if any segment (or specific segment) is dirty */
552
+ isDirty(segment?: string): boolean;
553
+ /** Clear cache for a segment (force reload on next access) */
554
+ protected invalidate(key: string): void;
555
+ /**
556
+ * Fetch a text resource from an ADT endpoint.
557
+ * Delegates to the underlying ADT client's fetch.
558
+ *
559
+ * @param url - ADT endpoint path (e.g., '/sap/bc/adt/ddic/dataelements/spras')
560
+ * @param headers - Optional HTTP headers (defaults to no Accept header, letting server choose)
561
+ * @returns Response content as text, or undefined if 404
562
+ */
563
+ fetchText(url: string, headers?: Record<string, string>): Promise<string | undefined>;
564
+ }
565
+ /**
566
+ * Base class for main development objects (AdtMainObject)
567
+ *
568
+ * Extends AdkObject with package reference, responsible user, and master language.
569
+ * Used for repository objects like classes, interfaces, packages, etc.
570
+ *
571
+ * Note: Uses type assertions internally because schema-inferred types from
572
+ * contracts may have different shapes than AdkMainObjectData. The getters
573
+ * safely handle missing properties with defaults.
574
+ *
575
+ * @typeParam K - The object kind (from AdkKind)
576
+ * @typeParam D - The internal data type (typically schema-inferred from contract)
577
+ */
578
+ declare abstract class AdkMainObject<K extends AdkKind = AdkKind, D = any> extends AdkObject<K, D> {
579
+ private get mainData();
580
+ /** Package reference (adtcore:packageRef) */
581
+ get packageRef(): AdtObjectReference | undefined;
582
+ /** Package name (convenience getter) */
583
+ get package(): string;
584
+ /** Master system (adtcore:masterSystem) */
585
+ get masterSystem(): string;
586
+ /** Master language (adtcore:masterLanguage) */
587
+ get masterLanguage(): string;
588
+ /** Responsible user (adtcore:responsible) */
589
+ get responsible(): string;
590
+ /** ABAP language version (adtcore:abapLanguageVersion) */
591
+ get abapLanguageVersion(): string;
592
+ /**
593
+ * Save main source code to SAP.
594
+ * Requires the object to be locked before calling.
595
+ * Subclasses may override to add additional behavior (e.g. cache invalidation).
596
+ */
597
+ saveMainSource(source: string, options?: {
598
+ lockHandle?: string;
599
+ transport?: string;
600
+ }): Promise<void>;
601
+ }
602
+ //#endregion
603
+ //#region src/objects/repository/clas/clas.types.d.ts
604
+ /**
605
+ * Class category (class:category attribute)
606
+ */
607
+ type ClassCategory = 'generalObjectType' | 'exceptionClass' | 'testClass' | 'exitClass' | 'areaClass' | 'factoryClass' | 'persistentClass' | 'bspClass' | 'staticTypedLcpClass' | 'behaviorPool' | 'rfcProxyClass' | 'entityEventHandler' | 'communicationConnectionClass' | 'others';
608
+ /**
609
+ * Class include type (class:includeType attribute)
610
+ */
611
+ type ClassIncludeType = 'main' | 'definitions' | 'implementations' | 'macros' | 'testclasses' | 'localtypes';
612
+ /**
613
+ * Class visibility (class:visibility attribute)
614
+ */
615
+ type ClassVisibility = 'public' | 'protected' | 'private';
616
+ /**
617
+ * Class include section
618
+ */
619
+ interface ClassInclude {
620
+ readonly includeType: ClassIncludeType;
621
+ readonly sourceUri: string;
622
+ readonly name: string;
623
+ readonly type: string;
624
+ readonly version: string;
625
+ readonly changedAt: Date;
626
+ readonly createdAt: Date;
627
+ readonly changedBy: string;
628
+ readonly createdBy: string;
629
+ }
630
+ /**
631
+ * ABAP Class interface
632
+ *
633
+ * Plugins work with this interface - implementation is internal.
634
+ * Mirrors ADT class:abapClass structure.
635
+ */
636
+ interface AbapClass extends AbapObject {
637
+ readonly kind: 'Class';
638
+ readonly responsible: string;
639
+ readonly masterLanguage: string;
640
+ readonly language: string;
641
+ readonly version: string;
642
+ readonly createdAt: Date;
643
+ readonly createdBy: string;
644
+ readonly changedAt: Date;
645
+ readonly changedBy: string;
646
+ readonly category: ClassCategory;
647
+ readonly final: boolean;
648
+ readonly abstract: boolean;
649
+ readonly visibility: ClassVisibility;
650
+ readonly sharedMemoryEnabled: boolean;
651
+ readonly modeled: boolean;
652
+ readonly fixPointArithmetic: boolean;
653
+ readonly activeUnicodeCheck: boolean;
654
+ readonly superClassRef?: AdtObjectReference;
655
+ readonly messageClassRef?: AdtObjectReference;
656
+ readonly packageRef?: AdtObjectReference;
657
+ readonly includes: ClassInclude[];
658
+ /**
659
+ * Get main source code (global definitions + implementations)
660
+ */
661
+ getMainSource(): Promise<string>;
662
+ /**
663
+ * Get source code for a specific include
664
+ */
665
+ getIncludeSource(includeType: ClassIncludeType): Promise<string>;
666
+ /**
667
+ * Get definitions include source
668
+ */
669
+ getDefinitions(): Promise<string>;
670
+ /**
671
+ * Get implementations include source
672
+ */
673
+ getImplementations(): Promise<string>;
674
+ /**
675
+ * Get test classes source
676
+ */
677
+ getTestClasses(): Promise<string>;
678
+ }
679
+ //#endregion
680
+ //#region src/objects/repository/clas/clas.model.d.ts
681
+ /**
682
+ * Class data type - imported from contract
683
+ *
684
+ * The schema wraps everything in an 'abapClass' element, so we unwrap it here
685
+ * to provide a flat structure for ADK consumers.
686
+ */
687
+ type ClassXml = ClassResponse['abapClass'];
688
+ /**
689
+ * ADK Class object
690
+ *
691
+ * Inherits from AdkMainObject which provides:
692
+ * - AdkObject: name, type, description, version, language, changedBy/At, createdBy/At, links
693
+ * - AdkMainObject: package, packageRef, responsible, masterLanguage, masterSystem, abapLanguageVersion
694
+ *
695
+ * Access class-specific properties via `data`:
696
+ * - data.category, data.final, data.abstract, data.visibility
697
+ * - data.sharedMemoryEnabled, data.modeled, data.fixPointArithmetic
698
+ * - data.superClassRef, data.messageClassRef, data.include
699
+ */
700
+ declare class AdkClass extends AdkMainObject<typeof Class, ClassXml> {
701
+ static readonly kind: "Class";
702
+ readonly kind: "Class";
703
+ get objectUri(): string;
704
+ getMainSource(): Promise<string>;
705
+ getIncludeSource(includeType: ClassIncludeType): Promise<string>;
706
+ getDefinitions(): Promise<string>;
707
+ getImplementations(): Promise<string>;
708
+ getTestClasses(): Promise<string>;
709
+ /**
710
+ * Save main source code
711
+ * Requires object to be locked first
712
+ */
713
+ saveMainSource(source: string, options?: {
714
+ lockHandle?: string;
715
+ transport?: string;
716
+ }): Promise<void>;
717
+ /**
718
+ * Save include source code
719
+ * Requires object to be locked first
720
+ */
721
+ saveIncludeSource(includeType: ClassIncludeType, source: string, options?: {
722
+ lockHandle?: string;
723
+ transport?: string;
724
+ }): Promise<void>;
725
+ /**
726
+ * Save all pending sources (set via _pendingSources)
727
+ * Used by export workflow after deserialization from abapGit
728
+ * Overrides base class method
729
+ *
730
+ * Note: unchanged detection is handled by checkPendingSourcesUnchanged()
731
+ * which runs BEFORE lock acquisition. By the time we reach here,
732
+ * at least one source differs — save them all.
733
+ */
734
+ protected savePendingSources(options?: {
735
+ lockHandle?: string;
736
+ transport?: string;
737
+ }): Promise<void>;
738
+ /**
739
+ * Pre-lock comparison: check if all pending sources match SAP
740
+ * If identical, sets _unchanged = true so save() skips locking and PUT
741
+ */
742
+ protected checkPendingSourcesUnchanged(): Promise<void>;
743
+ /**
744
+ * Check if object has pending sources to save
745
+ * Overrides base class method
746
+ */
747
+ protected hasPendingSources(): boolean;
748
+ /**
749
+ * Refresh cached ETags for all pending source endpoints after locking.
750
+ * Classes have multiple source URLs (main + includes) that all need fresh ETags.
751
+ */
752
+ protected refreshETagsAfterLock(): Promise<void>;
753
+ protected get wrapperKey(): string;
754
+ protected get crudContract(): any;
755
+ static get(name: string, ctx?: AdkContext): Promise<AdkClass>;
756
+ /**
757
+ * Check if a class exists on SAP
758
+ */
759
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
760
+ /**
761
+ * Create a new ABAP class on SAP
762
+ *
763
+ * @param name - Class name (e.g., 'ZCL_MY_CLASS')
764
+ * @param description - Short description
765
+ * @param packageName - Package to assign the class to
766
+ * @param options - Save options (transport)
767
+ * @param ctx - Optional ADK context
768
+ */
769
+ static create(name: string, description: string, packageName: string, options?: {
770
+ transport?: string;
771
+ }, ctx?: AdkContext): Promise<AdkClass>;
772
+ /**
773
+ * Delete an ABAP class from SAP
774
+ *
775
+ * @param name - Class name
776
+ * @param options - Delete options (transport)
777
+ * @param ctx - Optional ADK context
778
+ */
779
+ static delete(name: string, options?: {
780
+ transport?: string;
781
+ lockHandle?: string;
782
+ }, ctx?: AdkContext): Promise<void>;
783
+ }
784
+ //#endregion
785
+ //#region src/objects/repository/intf/intf.model.d.ts
786
+ /**
787
+ * Interface data type - imported from contract
788
+ *
789
+ * The schema wraps everything in an 'abapInterface' element, so we unwrap it here
790
+ * to provide a flat structure for ADK consumers.
791
+ */
792
+ type InterfaceXml = InterfaceResponse['abapInterface'];
793
+ /**
794
+ * ADK Interface object
795
+ *
796
+ * Inherits from AdkMainObject which provides:
797
+ * - AdkObject: name, type, description, version, language, changedBy/At, createdBy/At, links
798
+ * - AdkMainObject: package, packageRef, responsible, masterLanguage, masterSystem, abapLanguageVersion
799
+ *
800
+ * Access interface-specific properties via `data`:
801
+ * - data.modeled, data.sourceUri, data.fixPointArithmetic, data.activeUnicodeCheck
802
+ */
803
+ declare class AdkInterface extends AdkMainObject<typeof Interface, InterfaceXml> {
804
+ static readonly kind: "Interface";
805
+ readonly kind: "Interface";
806
+ get objectUri(): string;
807
+ getSource(): Promise<string>;
808
+ protected get wrapperKey(): string;
809
+ protected get crudContract(): any;
810
+ static get(name: string, ctx?: AdkContext): Promise<AdkInterface>;
811
+ /**
812
+ * Check if an interface exists on SAP
813
+ */
814
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
815
+ /**
816
+ * Create a new ABAP interface on SAP
817
+ *
818
+ * @param name - Interface name (e.g., 'ZIF_MY_INTERFACE')
819
+ * @param description - Short description
820
+ * @param packageName - Package to assign the interface to
821
+ * @param options - Save options (transport)
822
+ * @param ctx - Optional ADK context
823
+ */
824
+ static create(name: string, description: string, packageName: string, options?: {
825
+ transport?: string;
826
+ }, ctx?: AdkContext): Promise<AdkInterface>;
827
+ /**
828
+ * Delete an ABAP interface from SAP
829
+ *
830
+ * @param name - Interface name
831
+ * @param options - Delete options (transport)
832
+ * @param ctx - Optional ADK context
833
+ */
834
+ static delete(name: string, options?: {
835
+ transport?: string;
836
+ lockHandle?: string;
837
+ }, ctx?: AdkContext): Promise<void>;
838
+ }
839
+ //#endregion
840
+ //#region src/objects/repository/devc/devc.types.d.ts
841
+ /**
842
+ * Package type (pak:packageType attribute)
843
+ */
844
+ type PackageType = 'development' | 'structure' | 'main';
845
+ /**
846
+ * Reference to another object (used for superPackage, etc.)
847
+ * Re-exported for backward compatibility
848
+ */
849
+ type ObjectReference = AdtObjectReference;
850
+ /**
851
+ * Package attributes (pak:attributes element)
852
+ */
853
+ interface PackageAttributes {
854
+ readonly packageType: PackageType;
855
+ readonly isEncapsulated: boolean;
856
+ readonly isAddingObjectsAllowed: boolean;
857
+ readonly recordChanges: boolean;
858
+ readonly languageVersion: string;
859
+ }
860
+ /**
861
+ * Application component info
862
+ */
863
+ interface ApplicationComponent {
864
+ readonly name: string;
865
+ readonly description: string;
866
+ }
867
+ /**
868
+ * Software component info
869
+ */
870
+ interface SoftwareComponent {
871
+ readonly name: string;
872
+ readonly description: string;
873
+ }
874
+ /**
875
+ * Transport layer info
876
+ */
877
+ interface TransportLayer {
878
+ readonly name: string;
879
+ readonly description: string;
880
+ }
881
+ /**
882
+ * Transport configuration
883
+ */
884
+ interface TransportConfig {
885
+ readonly softwareComponent?: SoftwareComponent;
886
+ readonly transportLayer?: TransportLayer;
887
+ }
888
+ /**
889
+ * ABAP Package interface
890
+ *
891
+ * Plugins work with this interface - implementation is internal.
892
+ * Mirrors ADT pak:package structure.
893
+ */
894
+ interface AbapPackage extends AbapObject {
895
+ readonly kind: 'Package';
896
+ readonly responsible: string;
897
+ readonly masterLanguage: string;
898
+ readonly language: string;
899
+ readonly version: string;
900
+ readonly createdAt: Date;
901
+ readonly createdBy: string;
902
+ readonly changedAt: Date;
903
+ readonly changedBy: string;
904
+ readonly attributes: PackageAttributes;
905
+ readonly superPackage?: AdtObjectReference;
906
+ readonly applicationComponent?: ApplicationComponent;
907
+ readonly transport?: TransportConfig;
908
+ /**
909
+ * Get direct subpackages
910
+ */
911
+ getSubpackages(): Promise<AbapPackage[]>;
912
+ /**
913
+ * Get objects contained in this package (direct, not recursive)
914
+ */
915
+ getObjects(): Promise<AbapObject[]>;
916
+ /**
917
+ * Get all objects recursively (includes subpackages)
918
+ */
919
+ getAllObjects(): Promise<AbapObject[]>;
920
+ }
921
+ //#endregion
922
+ //#region src/objects/repository/devc/devc.model.d.ts
923
+ /**
924
+ * Package data type - inferred from packagesContract response
925
+ *
926
+ * The schema wraps everything in a 'package' element, so we unwrap it here
927
+ * to provide a flat structure for ADK consumers.
928
+ */
929
+ type PackageXml = NonNullable<PackageResponse['package']>;
930
+ /**
931
+ * ADK Package object
932
+ *
933
+ * Inherits from AdkMainObject which provides:
934
+ * - AdkObject: name, type, description, version, language, changedBy/At, createdBy/At, links
935
+ * - AdkMainObject: packageRef, responsible, masterLanguage, masterSystem, abapLanguageVersion
936
+ *
937
+ * Note: For packages, the parent package is stored in `superPackage` not `packageRef`.
938
+ * The `package` getter is overridden to return the super package name.
939
+ */
940
+ declare class AdkPackage extends AdkMainObject<typeof Package, PackageXml> implements AbapPackage {
941
+ static readonly kind: "Package";
942
+ readonly kind: "Package";
943
+ get objectUri(): string;
944
+ get package(): string;
945
+ get attributes(): PackageAttributes;
946
+ get superPackage(): ObjectReference | undefined;
947
+ get applicationComponent(): ApplicationComponent | undefined;
948
+ get transport(): TransportConfig | undefined;
949
+ getSubpackages(): Promise<AbapPackage[]>;
950
+ getObjects(): Promise<AbapObject[]>;
951
+ getAllObjects(): Promise<AbapObject[]>;
952
+ load(): Promise<this>;
953
+ protected get wrapperKey(): "package";
954
+ protected get crudContract(): any;
955
+ /**
956
+ * Get skeleton data for package creation (POST).
957
+ *
958
+ * SAP requires ALL elements in the Package xs:sequence, even if empty.
959
+ * The sequence order is: attributes, superPackage, extensionAlias, switch,
960
+ * applicationComponent, transport, translation, useAccesses,
961
+ * packageInterfaces, subPackages.
962
+ * Missing elements cause "System expected the element ..." 400 errors.
963
+ */
964
+ protected getSkeletonData(): Promise<Record<string, unknown>>;
965
+ /**
966
+ * Get a package by name
967
+ *
968
+ * @param name - Package name (e.g., '$TMP', 'ZPACKAGE')
969
+ * @param ctx - Optional ADK context (uses global context if not provided)
970
+ */
971
+ static get(name: string, ctx?: AdkContext): Promise<AdkPackage>;
972
+ /**
973
+ * Check if a package exists on SAP
974
+ *
975
+ * @param name - Package name
976
+ * @param ctx - Optional ADK context (uses global context if not provided)
977
+ * @returns true if package exists, false otherwise
978
+ */
979
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
980
+ /**
981
+ * Create a new package on SAP
982
+ *
983
+ * Builds an AdkPackage with the given data and saves it in 'create' mode.
984
+ *
985
+ * @param name - Package name (e.g., 'ZABAPGIT_EXAMPLES_CLAS')
986
+ * @param data - Package data (superPackage, attributes, transport, etc.)
987
+ * @param options - Save options (transport request)
988
+ * @param ctx - Optional ADK context (uses global context if not provided)
989
+ */
990
+ static create(name: string, data: Partial<PackageXml>, options?: {
991
+ transport?: string;
992
+ }, ctx?: AdkContext): Promise<AdkPackage>;
993
+ /**
994
+ * Delete an ABAP package from SAP
995
+ *
996
+ * @param name - Package name
997
+ * @param options - Delete options (transport, lockHandle)
998
+ * @param ctx - Optional ADK context (uses global context if not provided)
999
+ */
1000
+ static delete(name: string, options?: {
1001
+ transport?: string;
1002
+ lockHandle?: string;
1003
+ }, ctx?: AdkContext): Promise<void>;
1004
+ }
1005
+ //#endregion
1006
+ //#region src/objects/repository/prog/prog.model.d.ts
1007
+ /**
1008
+ * Program data type - unwrap from root element
1009
+ *
1010
+ * The schema wraps everything in an 'abapProgram' element, so we unwrap it here
1011
+ * to provide a flat structure for ADK consumers.
1012
+ */
1013
+ type ProgramXml = ProgramResponse['abapProgram'];
1014
+ /**
1015
+ * ADK Program object
1016
+ *
1017
+ * Inherits from AdkMainObject which provides:
1018
+ * - AdkObject: name, type, description, version, language, changedBy/At, createdBy/At, links
1019
+ * - AdkMainObject: package, packageRef, responsible, masterLanguage, masterSystem, abapLanguageVersion
1020
+ *
1021
+ * Access program-specific properties via `data`:
1022
+ * - data.programType, data.sourceUri, data.fixPointArithmetic, data.activeUnicodeCheck
1023
+ */
1024
+ declare class AdkProgram extends AdkMainObject<typeof Program, ProgramXml> {
1025
+ static readonly kind: "Program";
1026
+ readonly kind: "Program";
1027
+ get objectUri(): string;
1028
+ getSource(): Promise<string>;
1029
+ protected get wrapperKey(): string;
1030
+ protected get crudContract(): any;
1031
+ static get(name: string, ctx?: AdkContext): Promise<AdkProgram>;
1032
+ /**
1033
+ * Check if a program exists on SAP
1034
+ */
1035
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1036
+ /**
1037
+ * Create a new ABAP program on SAP
1038
+ *
1039
+ * @param name - Program name (e.g., 'ZMYPROGRAM')
1040
+ * @param description - Short description
1041
+ * @param packageName - Package to assign the program to
1042
+ * @param options - Save options (transport)
1043
+ * @param ctx - Optional ADK context
1044
+ */
1045
+ static create(name: string, description: string, packageName: string, options?: {
1046
+ transport?: string;
1047
+ }, ctx?: AdkContext): Promise<AdkProgram>;
1048
+ /**
1049
+ * Delete an ABAP program from SAP
1050
+ *
1051
+ * @param name - Program name
1052
+ * @param options - Delete options (transport)
1053
+ * @param ctx - Optional ADK context
1054
+ */
1055
+ static delete(name: string, options?: {
1056
+ transport?: string;
1057
+ lockHandle?: string;
1058
+ }, ctx?: AdkContext): Promise<void>;
1059
+ }
1060
+ //#endregion
1061
+ //#region src/objects/repository/incl/incl.model.d.ts
1062
+ /**
1063
+ * Include data type - unwrap from root element.
1064
+ *
1065
+ * The schema wraps everything in an 'abapInclude' element, so we unwrap
1066
+ * it here to provide a flat structure for ADK consumers.
1067
+ */
1068
+ type IncludeXml = IncludeResponse['abapInclude'];
1069
+ /**
1070
+ * ADK Include object
1071
+ *
1072
+ * Inherits from AdkMainObject which provides:
1073
+ * - AdkObject: name, type, description, version, language, changedBy/At,
1074
+ * createdBy/At, links
1075
+ * - AdkMainObject: package, packageRef, responsible, masterLanguage,
1076
+ * masterSystem, abapLanguageVersion
1077
+ *
1078
+ * Access include-specific properties via `data`:
1079
+ * - data.sourceUri, data.fixPointArithmetic, data.activeUnicodeCheck,
1080
+ * data.contextRef (pointer to the main program)
1081
+ */
1082
+ declare class AdkInclude extends AdkMainObject<typeof Include, IncludeXml> {
1083
+ static readonly kind: "Include";
1084
+ readonly kind: "Include";
1085
+ get objectUri(): string;
1086
+ getSource(): Promise<string>;
1087
+ protected get wrapperKey(): string;
1088
+ protected get crudContract(): any;
1089
+ /**
1090
+ * Skeleton POST data for includes.
1091
+ *
1092
+ * Extends the base skeleton (name/type/description/packageRef) with
1093
+ * `contextRef`, which sapcli's `sap.adt.Include(..., master=...)` serializes
1094
+ * at creation time. Without this the include would be created detached
1095
+ * from its main program.
1096
+ */
1097
+ protected getSkeletonData(): Promise<Record<string, unknown>>;
1098
+ static get(name: string, ctx?: AdkContext): Promise<AdkInclude>;
1099
+ /**
1100
+ * Check if an include exists on SAP
1101
+ */
1102
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1103
+ /**
1104
+ * Create a new ABAP include on SAP
1105
+ *
1106
+ * @param name - Include name (e.g., 'ZMY_INCLUDE')
1107
+ * @param description - Short description
1108
+ * @param packageName - Package to assign the include to
1109
+ * @param options - Save options (transport, master program)
1110
+ * @param ctx - Optional ADK context
1111
+ */
1112
+ static create(name: string, description: string, packageName: string, options?: {
1113
+ transport?: string;
1114
+ master?: string;
1115
+ }, ctx?: AdkContext): Promise<AdkInclude>;
1116
+ /**
1117
+ * Delete an ABAP include from SAP
1118
+ *
1119
+ * @param name - Include name
1120
+ * @param options - Delete options (transport, lockHandle)
1121
+ * @param ctx - Optional ADK context
1122
+ */
1123
+ static delete(name: string, options?: {
1124
+ transport?: string;
1125
+ lockHandle?: string;
1126
+ }, ctx?: AdkContext): Promise<void>;
1127
+ }
1128
+ //#endregion
1129
+ //#region src/objects/repository/fugr/fugr.model.d.ts
1130
+ /**
1131
+ * Function group data type - unwrap from root element
1132
+ *
1133
+ * The schema wraps everything in an 'abapFunctionGroup' element, so we unwrap it here
1134
+ * to provide a flat structure for ADK consumers.
1135
+ */
1136
+ type FunctionGroupXml = FunctionGroupResponse['abapFunctionGroup'];
1137
+ /**
1138
+ * ADK Function Group object
1139
+ *
1140
+ * Inherits from AdkMainObject which provides:
1141
+ * - AdkObject: name, type, description, version, language, changedBy/At, createdBy/At, links
1142
+ * - AdkMainObject: package, packageRef, responsible, masterLanguage, masterSystem, abapLanguageVersion
1143
+ *
1144
+ * Access function group-specific properties via `data`:
1145
+ * - data.sourceUri, data.fixPointArithmetic, data.activeUnicodeCheck
1146
+ */
1147
+ declare class AdkFunctionGroup extends AdkMainObject<typeof FunctionGroup, FunctionGroupXml> {
1148
+ static readonly kind: "FunctionGroup";
1149
+ readonly kind: "FunctionGroup";
1150
+ get objectUri(): string;
1151
+ getSource(): Promise<string>;
1152
+ protected get wrapperKey(): string;
1153
+ protected get crudContract(): any;
1154
+ static get(name: string, ctx?: AdkContext): Promise<AdkFunctionGroup>;
1155
+ /**
1156
+ * Check if a function group exists on SAP
1157
+ */
1158
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1159
+ /**
1160
+ * Create a new ABAP function group on SAP
1161
+ */
1162
+ static create(name: string, description: string, packageName: string, options?: {
1163
+ transport?: string;
1164
+ }, ctx?: AdkContext): Promise<AdkFunctionGroup>;
1165
+ /**
1166
+ * Delete an ABAP function group from SAP
1167
+ */
1168
+ static delete(name: string, options?: {
1169
+ transport?: string;
1170
+ lockHandle?: string;
1171
+ }, ctx?: AdkContext): Promise<void>;
1172
+ }
1173
+ //#endregion
1174
+ //#region src/objects/repository/fugr/func/func.model.d.ts
1175
+ /**
1176
+ * Function module data type - unwrap from root element
1177
+ *
1178
+ * The schema wraps everything in an 'abapFunctionModule' element, so we unwrap it here
1179
+ * to provide a flat structure for ADK consumers.
1180
+ */
1181
+ type FunctionModuleXml = FunctionModuleResponse['abapFunctionModule'];
1182
+ /**
1183
+ * ADK Function Module object
1184
+ *
1185
+ * Function modules are child objects of function groups. Unlike main objects
1186
+ * (classes, interfaces, etc.), they don't have their own package reference.
1187
+ * All API operations require the parent group name in the URL path.
1188
+ *
1189
+ * Key differences from AdkMainObject:
1190
+ * - Requires `groupName` for URI construction and all CRUD operations
1191
+ * - Overrides lock/unlock/load/save to pass groupName to contract calls
1192
+ * - No packageRef (lives within parent function group's package)
1193
+ */
1194
+ declare class AdkFunctionModule extends AdkObject<typeof FunctionModule, FunctionModuleXml> {
1195
+ static readonly kind: "FunctionModule";
1196
+ readonly kind: "FunctionModule";
1197
+ /** Parent function group name */
1198
+ groupName: string;
1199
+ /**
1200
+ * Constructor supports two calling patterns:
1201
+ *
1202
+ * 1. Direct (3-arg): `new AdkFunctionModule(ctx, groupName, nameOrData)`
1203
+ * Used by static factory method and when group name is known upfront.
1204
+ *
1205
+ * 2. Factory (2-arg): `new AdkFunctionModule(ctx, data)`
1206
+ * Used by ADK factory's `getWithData()`. The groupName is extracted from
1207
+ * `data._groupName` or `data.containerRef.name`.
1208
+ */
1209
+ constructor(ctx: AdkContext, groupNameOrData: string | FunctionModuleXml, dataOrName?: FunctionModuleXml | string);
1210
+ get objectUri(): string;
1211
+ get collectionUri(): string;
1212
+ protected get wrapperKey(): string;
1213
+ protected get crudContract(): any;
1214
+ /**
1215
+ * Load function module data from SAP
1216
+ *
1217
+ * Overrides base to pass groupName as first arg to contract.get()
1218
+ */
1219
+ load(): Promise<this>;
1220
+ /**
1221
+ * Get skeleton data for FM creation (POST).
1222
+ *
1223
+ * FMs only need name, type, description, and processing attributes.
1224
+ * No packageRef — FMs inherit the package from their parent FUGR.
1225
+ */
1226
+ protected getSkeletonData(): Promise<Record<string, unknown>>;
1227
+ /**
1228
+ * Execute the typed contract call for save
1229
+ *
1230
+ * Overrides base to pass groupName to contract.put()/post()
1231
+ */
1232
+ protected saveViaContract(mode: 'create' | 'update', options: {
1233
+ transport?: string;
1234
+ lockHandle?: string;
1235
+ }): Promise<void>;
1236
+ /**
1237
+ * Check if the function module exists on the SAP system.
1238
+ *
1239
+ * Overrides base to pass groupName to contract.get()
1240
+ */
1241
+ protected checkObjectExists(): Promise<boolean>;
1242
+ /**
1243
+ * Refresh cached ETags after acquiring a lock.
1244
+ *
1245
+ * FM's savePendingSources() does a metadata PUT first (to apply processingType),
1246
+ * then a source PUT. Both need fresh ETags after locking.
1247
+ * The contract uses groupName + name (potentially UPPERCASE), so we must
1248
+ * refresh via the contract to match the same cache key.
1249
+ */
1250
+ protected refreshETagsAfterLock(): Promise<void>;
1251
+ /**
1252
+ * Strip the parameter comment block from FM source code.
1253
+ *
1254
+ * abapGit serializes FM source with a "Local Interface" comment block
1255
+ * that describes IMPORTING/EXPORTING/CHANGING/TABLES/EXCEPTIONS.
1256
+ * SAP ADT rejects this block when saving source — it manages the
1257
+ * interface metadata separately. Strip it before sending.
1258
+ *
1259
+ * Pattern:
1260
+ * ```
1261
+ * *"----------------------------------------------------------------------
1262
+ * *"*"Local Interface:
1263
+ * *" IMPORTING ...
1264
+ * *"----------------------------------------------------------------------
1265
+ * ```
1266
+ */
1267
+ private stripParameterCommentBlock;
1268
+ /**
1269
+ * Save pending source for function module.
1270
+ *
1271
+ * Overrides base to:
1272
+ * 1. PUT metadata first (SAP ignores processingType and other attributes during POST)
1273
+ * 2. Refresh source ETag (metadata PUT changes the object version)
1274
+ * 3. Strip the parameter comment block that abapGit includes
1275
+ * 4. Use the FM-specific source endpoint via groupName
1276
+ */
1277
+ protected savePendingSources(options?: {
1278
+ lockHandle?: string;
1279
+ transport?: string;
1280
+ }): Promise<void>;
1281
+ /**
1282
+ * Extract the body of a FUNCTION...ENDFUNCTION block.
1283
+ *
1284
+ * SAP reconstructs the FUNCTION header when returning source code:
1285
+ * Local: `FUNCTION zage_fm.` (lowercase, period inline)
1286
+ * SAP: `FUNCTION ZAGE_FM\n " template comment"\n.` (uppercase, period on own line)
1287
+ *
1288
+ * The body between the header and ENDFUNCTION is identical, so we compare
1289
+ * only that part. The header ends at the first period that terminates the
1290
+ * FUNCTION statement (either inline `FUNCTION name.` or on a separate line `.`).
1291
+ */
1292
+ private extractFunctionBody;
1293
+ /**
1294
+ * Pre-lock comparison for FM source.
1295
+ *
1296
+ * Overrides base to:
1297
+ * 1. Strip parameter comment block from local source
1298
+ * 2. Extract only the function body (between FUNCTION header and ENDFUNCTION)
1299
+ * from both local and SAP source, because SAP reconstructs the FUNCTION
1300
+ * header with uppercase name and template comments.
1301
+ */
1302
+ protected checkPendingSourcesUnchanged(): Promise<void>;
1303
+ getSource(): Promise<string>;
1304
+ /**
1305
+ * Get a function module by name
1306
+ *
1307
+ * @param groupName - Parent function group name
1308
+ * @param name - Function module name
1309
+ * @param ctx - Optional ADK context (uses global if not provided)
1310
+ */
1311
+ static get(groupName: string, name: string, ctx?: AdkContext): Promise<AdkFunctionModule>;
1312
+ /**
1313
+ * Check if a function module exists on SAP
1314
+ */
1315
+ static exists(groupName: string, name: string, ctx?: AdkContext): Promise<boolean>;
1316
+ /**
1317
+ * Create a new ABAP function module on SAP
1318
+ */
1319
+ static create(groupName: string, name: string, description: string, options?: {
1320
+ transport?: string;
1321
+ processingType?: string;
1322
+ }, ctx?: AdkContext): Promise<AdkFunctionModule>;
1323
+ /**
1324
+ * Delete a function module from SAP
1325
+ */
1326
+ static delete(groupName: string, name: string, options?: {
1327
+ transport?: string;
1328
+ lockHandle?: string;
1329
+ }, ctx?: AdkContext): Promise<void>;
1330
+ }
1331
+ //#endregion
1332
+ //#region src/objects/cts/transport/transport.types.d.ts
1333
+ /**
1334
+ * Full response type from TransportService.get()
1335
+ *
1336
+ * The schema wraps everything in a 'root' element, so we unwrap it here
1337
+ * to provide a flat structure for ADK consumers.
1338
+ */
1339
+ type TransportData = TransportGetResponse['root'];
1340
+ /** Request data from schema */
1341
+ type TransportRequestData = NonNullable<TransportData['request']>;
1342
+ /** Task data from schema */
1343
+ type TransportTaskData = NonNullable<TransportRequestData['task']> extends (infer T)[] ? T : NonNullable<TransportRequestData['task']>;
1344
+ /** Object data from schema */
1345
+ type TransportObjectData = NonNullable<TransportTaskData['abap_object']> extends (infer T)[] ? T : NonNullable<TransportTaskData['abap_object']>;
1346
+ /** Transport status codes */
1347
+ type TransportStatus = 'D' | 'R' | 'N';
1348
+ /** Transport type */
1349
+ type TransportType = 'K' | 'W' | 'T' | 'C';
1350
+ type TransportTask = TransportTaskData;
1351
+ type TransportObject = TransportObjectData;
1352
+ /**
1353
+ * Options for creating a transport
1354
+ */
1355
+ interface TransportCreateOptions {
1356
+ description: string;
1357
+ type?: TransportType;
1358
+ target?: string;
1359
+ project?: string;
1360
+ owner?: string;
1361
+ }
1362
+ /**
1363
+ * Options for updating a transport
1364
+ */
1365
+ interface TransportUpdateOptions {
1366
+ description?: string;
1367
+ target?: string;
1368
+ owner?: string;
1369
+ }
1370
+ /**
1371
+ * Result of release operation
1372
+ */
1373
+ interface ReleaseResult {
1374
+ success: boolean;
1375
+ message?: string;
1376
+ }
1377
+ //#endregion
1378
+ //#region src/objects/cts/transport/transport-object.d.ts
1379
+ /**
1380
+ * Transport Object - wrapper for ABAP objects in a transport
1381
+ */
1382
+ declare class AdkTransportObject {
1383
+ private readonly data;
1384
+ constructor(data: TransportObjectData);
1385
+ get pgmid(): string;
1386
+ get type(): string;
1387
+ get name(): string;
1388
+ get wbtype(): string | undefined;
1389
+ get objectInfo(): string | undefined;
1390
+ get objectDescription(): string | undefined;
1391
+ get lockStatus(): string | undefined;
1392
+ get uri(): string | undefined;
1393
+ /** Full object key (PGMID/TYPE/NAME) */
1394
+ get key(): string;
1395
+ /** Raw schema data */
1396
+ get raw(): TransportObjectData;
1397
+ }
1398
+ //#endregion
1399
+ //#region src/objects/cts/transport/transport.d.ts
1400
+ /** Clear config cache (for testing) */
1401
+ declare function clearConfigCache(): void;
1402
+ interface TransportObjectDataInternal {
1403
+ name: string;
1404
+ type: string;
1405
+ response: TransportData;
1406
+ }
1407
+ /**
1408
+ * Transport Request - main transport object
1409
+ *
1410
+ * Handles both requests (K) and can be extended for tasks (T).
1411
+ * Uses ADT contracts directly - no intermediate service layer.
1412
+ */
1413
+ declare class AdkTransportRequest extends AdkObject<typeof TransportRequest, TransportObjectDataInternal> {
1414
+ readonly kind: "TransportRequest";
1415
+ protected _tasks?: AdkTransportTask[];
1416
+ protected _objects?: AdkTransportObject[];
1417
+ constructor(ctx: AdkContext, dataOrNumber: TransportData | string);
1418
+ protected get response(): TransportData;
1419
+ /** The item's data - override in subclass for different source */
1420
+ protected get itemData(): TransportRequestData;
1421
+ get objectUri(): string;
1422
+ load(): Promise<this>;
1423
+ get itemType(): 'request' | 'task';
1424
+ get number(): string;
1425
+ get owner(): string;
1426
+ get description(): string;
1427
+ get status(): string;
1428
+ get statusText(): string;
1429
+ get target(): string;
1430
+ get targetDescription(): string;
1431
+ get uri(): string;
1432
+ get parent(): string;
1433
+ get lastChangedAt(): Date | undefined;
1434
+ /** Tasks belonging to this transport request */
1435
+ get tasks(): AdkTransportTask[];
1436
+ /**
1437
+ * All objects in this request (aggregated from tasks)
1438
+ * Override in AdkTransportTask for direct objects
1439
+ */
1440
+ get objects(): AdkTransportObject[];
1441
+ release(): Promise<ReleaseResult>;
1442
+ releaseAll(): Promise<ReleaseResult>;
1443
+ update(changes: TransportUpdateOptions): Promise<void>;
1444
+ delete(): Promise<void>;
1445
+ /**
1446
+ * Reassign ownership of this transport (and optionally all tasks) to a new user.
1447
+ *
1448
+ * @param newOwner - SAP username to become the new owner
1449
+ * @param recursive - When true, also reassign all modifiable tasks
1450
+ */
1451
+ reassign(newOwner: string, recursive?: boolean): Promise<void>;
1452
+ /** Create and verify a modifiable task under this request. */
1453
+ addTask(owner: string): Promise<AdkTransportTask>;
1454
+ /**
1455
+ * Create a new transport request
1456
+ *
1457
+ * @param options - Transport creation options
1458
+ * @param ctx - Optional ADK context (uses global context if not provided)
1459
+ */
1460
+ static create(options: TransportCreateOptions, ctx?: AdkContext): Promise<AdkTransportRequest>;
1461
+ /**
1462
+ * Get a transport request by number
1463
+ *
1464
+ * @param number - Transport number (e.g., 'TRLK900001')
1465
+ * @param ctx - Optional ADK context (uses global context if not provided)
1466
+ */
1467
+ static get(number: string, ctx?: AdkContext): Promise<AdkTransportRequest>;
1468
+ /**
1469
+ * List all transports for the current user
1470
+ *
1471
+ * @param ctx - Optional ADK context (uses global context if not provided)
1472
+ */
1473
+ static list(ctx?: AdkContext): Promise<AdkTransportRequest[]>;
1474
+ /**
1475
+ * Get current user from the system metadata
1476
+ *
1477
+ * @param ctx - Optional ADK context (uses global context if not provided)
1478
+ */
1479
+ static getCurrentUser(ctx?: AdkContext): Promise<string>;
1480
+ }
1481
+ /**
1482
+ * Transport Task - child of a transport request
1483
+ *
1484
+ * Minimal overrides:
1485
+ * - itemData: from response.task instead of response.request
1486
+ * - objects: direct from task, not aggregated
1487
+ * - request: parent reference
1488
+ * - No tasks, no CRUD
1489
+ */
1490
+ declare class AdkTransportTask extends AdkTransportRequest {
1491
+ private _parentRequest?;
1492
+ private readonly parentRef?;
1493
+ constructor(ctx: AdkContext, dataOrNumber: TransportData | string, parentRef?: AdkTransportRequest);
1494
+ protected get itemData(): TransportRequestData;
1495
+ get tasks(): AdkTransportTask[];
1496
+ get objects(): AdkTransportObject[];
1497
+ /** Parent transport request */
1498
+ get request(): AdkTransportRequest;
1499
+ /**
1500
+ * Get a transport task by number
1501
+ *
1502
+ * @param number - Task number (e.g., 'TRLK900001')
1503
+ * @param ctx - Optional ADK context (uses global context if not provided)
1504
+ */
1505
+ static get(number: string, ctx?: AdkContext): Promise<AdkTransportTask>;
1506
+ }
1507
+ //#endregion
1508
+ //#region src/objects/ddic/doma/doma.model.d.ts
1509
+ /**
1510
+ * Domain data type - unwrap from schema root element
1511
+ */
1512
+ type DomainXml = DomainResponse['domain'];
1513
+ /**
1514
+ * ADK Domain object
1515
+ *
1516
+ * Inherits from AdkMainObject which provides:
1517
+ * - name, type, description, version, language, changedBy/At, createdBy/At, links
1518
+ * - package, packageRef, responsible, masterLanguage, masterSystem, abapLanguageVersion
1519
+ *
1520
+ * Domain-specific properties via `data`:
1521
+ * - data.typeInformation (dataType, length, decimals, outputLength)
1522
+ * - data.outputInformation (conversionExit, signPresentation, lowerCase)
1523
+ * - data.fixedValues
1524
+ */
1525
+ declare class AdkDomain extends AdkMainObject<typeof Domain, DomainXml> {
1526
+ static readonly kind: "Domain";
1527
+ readonly kind: "Domain";
1528
+ get objectUri(): string;
1529
+ protected get wrapperKey(): string;
1530
+ protected get crudContract(): any;
1531
+ static get(name: string, ctx?: AdkContext): Promise<AdkDomain>;
1532
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1533
+ /**
1534
+ * Create a new ABAP domain on SAP.
1535
+ *
1536
+ * Note: Domains are metadata-only objects (no source code). After creation,
1537
+ * use the `adt get domain <name>` command or abapGit-based deploy to fill in
1538
+ * the domain properties (data type, field length, etc.).
1539
+ */
1540
+ static create(name: string, description: string, packageName: string, options?: {
1541
+ transport?: string;
1542
+ }, ctx?: AdkContext): Promise<AdkDomain>;
1543
+ static delete(name: string, options?: {
1544
+ transport?: string;
1545
+ lockHandle?: string;
1546
+ }, ctx?: AdkContext): Promise<void>;
1547
+ }
1548
+ //#endregion
1549
+ //#region src/objects/ddic/dtel/dtel.model.d.ts
1550
+ /**
1551
+ * Data Element data type - unwrap from wrapper root element
1552
+ * SAP wraps DTEL content in a blue:wbobj element extending AdtMainObject
1553
+ */
1554
+ type DataElementXml = DataElementResponse['wbobj'];
1555
+ /**
1556
+ * ADK Data Element object
1557
+ *
1558
+ * Inherits from AdkMainObject which provides:
1559
+ * - name, type, description, version, language, changedBy/At, createdBy/At, links
1560
+ * - package, packageRef, responsible, masterLanguage, masterSystem, abapLanguageVersion
1561
+ *
1562
+ * Data element-specific properties via `data`:
1563
+ * - data.typeKind, data.typeName, data.dataType
1564
+ * - data.shortDescription, data.mediumDescription, data.longDescription, data.headingDescription
1565
+ * - data.searchHelp
1566
+ */
1567
+ declare class AdkDataElement extends AdkMainObject<typeof DataElement, DataElementXml> {
1568
+ static readonly kind: "DataElement";
1569
+ readonly kind: "DataElement";
1570
+ get objectUri(): string;
1571
+ protected get wrapperKey(): string;
1572
+ protected get crudContract(): any;
1573
+ static get(name: string, ctx?: AdkContext): Promise<AdkDataElement>;
1574
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1575
+ /**
1576
+ * Create a new ABAP data element on SAP.
1577
+ */
1578
+ static create(name: string, description: string, packageName: string, options?: {
1579
+ transport?: string;
1580
+ }, ctx?: AdkContext): Promise<AdkDataElement>;
1581
+ static delete(name: string, options?: {
1582
+ transport?: string;
1583
+ lockHandle?: string;
1584
+ }, ctx?: AdkContext): Promise<void>;
1585
+ }
1586
+ //#endregion
1587
+ //#region src/objects/ddic/tabl/tabl.model.d.ts
1588
+ /**
1589
+ * Table/Structure data type - unwrap from blueSource wrapper root element
1590
+ */
1591
+ type TableXml = TableResponse['blueSource'];
1592
+ /**
1593
+ * ADK Table object (database table - TABL/DT)
1594
+ */
1595
+ declare class AdkTable extends AdkMainObject<typeof Table, TableXml> {
1596
+ static readonly kind: "Table";
1597
+ readonly kind: "Table";
1598
+ get objectUri(): string;
1599
+ /**
1600
+ * Get CDS-style table source code from SAP
1601
+ * Returns the ABAP source definition (annotations + field definitions)
1602
+ */
1603
+ getSource(): Promise<string>;
1604
+ /**
1605
+ * Get table technical settings (DD09L data)
1606
+ * Returns XML from /sap/bc/adt/ddic/db/settings/{name}
1607
+ */
1608
+ getSettings(): Promise<string>;
1609
+ protected get wrapperKey(): string;
1610
+ protected get crudContract(): any;
1611
+ static get(name: string, ctx?: AdkContext): Promise<AdkTable>;
1612
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1613
+ /**
1614
+ * Create a new ABAP database table on SAP.
1615
+ */
1616
+ static create(name: string, description: string, packageName: string, options?: {
1617
+ transport?: string;
1618
+ }, ctx?: AdkContext): Promise<AdkTable>;
1619
+ static delete(name: string, options?: {
1620
+ transport?: string;
1621
+ lockHandle?: string;
1622
+ }, ctx?: AdkContext): Promise<void>;
1623
+ }
1624
+ /**
1625
+ * ADK Structure object (TABL/DS)
1626
+ */
1627
+ declare class AdkStructure extends AdkMainObject<typeof Structure, TableXml> {
1628
+ static readonly kind: "Structure";
1629
+ readonly kind: "Structure";
1630
+ get objectUri(): string;
1631
+ /**
1632
+ * Get CDS-style structure source code from SAP
1633
+ * Returns the ABAP source definition (annotations + field definitions)
1634
+ */
1635
+ getSource(): Promise<string>;
1636
+ protected get wrapperKey(): string;
1637
+ protected get crudContract(): any;
1638
+ static get(name: string, ctx?: AdkContext): Promise<AdkStructure>;
1639
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1640
+ /**
1641
+ * Create a new ABAP structure on SAP.
1642
+ */
1643
+ static create(name: string, description: string, packageName: string, options?: {
1644
+ transport?: string;
1645
+ }, ctx?: AdkContext): Promise<AdkStructure>;
1646
+ static delete(name: string, options?: {
1647
+ transport?: string;
1648
+ lockHandle?: string;
1649
+ }, ctx?: AdkContext): Promise<void>;
1650
+ }
1651
+ //#endregion
1652
+ //#region src/objects/ddic/ttyp/ttyp.model.d.ts
1653
+ /**
1654
+ * Table Type data type - unwrap from schema root element
1655
+ */
1656
+ type TableTypeXml = TableTypeResponse['tableType'];
1657
+ /**
1658
+ * ADK Table Type object
1659
+ *
1660
+ * Inherits from AdkMainObject which provides:
1661
+ * - name, type, description, version, language, changedBy/At, createdBy/At, links
1662
+ * - package, packageRef, responsible, masterLanguage, masterSystem, abapLanguageVersion
1663
+ *
1664
+ * Table type-specific properties via `data`:
1665
+ * - data.rowType (typeName, typeCategory, tableTypeSchemaReference)
1666
+ * - data.primaryKey
1667
+ * - data.secondaryKeys
1668
+ */
1669
+ declare class AdkTableType extends AdkMainObject<typeof TableType, TableTypeXml> {
1670
+ static readonly kind: "TableType";
1671
+ readonly kind: "TableType";
1672
+ get objectUri(): string;
1673
+ protected get wrapperKey(): string;
1674
+ protected get crudContract(): any;
1675
+ static get(name: string, ctx?: AdkContext): Promise<AdkTableType>;
1676
+ }
1677
+ //#endregion
1678
+ //#region src/objects/cds/source-object.d.ts
1679
+ /**
1680
+ * Structural type for the ADT source contract used by CDS source objects.
1681
+ * Captures the `get` and `source.main.get` members used by {@link getSource}
1682
+ * and {@link load}, so incompatible contract shapes are rejected at compile
1683
+ * time instead of failing at runtime.
1684
+ */
1685
+ interface AdkCdsSourceContract {
1686
+ get(name: string): Promise<unknown>;
1687
+ source: {
1688
+ main: {
1689
+ get(name: string): Promise<unknown>;
1690
+ put(name: string, options: Record<string, unknown>, body: string): Promise<unknown>;
1691
+ };
1692
+ };
1693
+ }
1694
+ /**
1695
+ * Broader CRUD contract for standalone source objects that also support
1696
+ * create (POST) and delete. Used by DDL, DCL, BDEF, SRVD, etc.
1697
+ */
1698
+ interface AdkCrudSourceContract extends AdkCdsSourceContract {
1699
+ post(options: Record<string, unknown>, body: unknown): Promise<unknown>;
1700
+ delete(name: string, options: Record<string, unknown>): Promise<unknown>;
1701
+ }
1702
+ /** Minimal shared implementation for CDS source objects used by import. */
1703
+ declare abstract class AdkCdsSourceObject {
1704
+ readonly name: string;
1705
+ protected readonly ctx: AdkContext;
1706
+ protected abstract readonly endpoint: string;
1707
+ private metadata?;
1708
+ protected constructor(ctx: AdkContext, name: string);
1709
+ get objectUri(): string;
1710
+ get description(): string;
1711
+ get originalLanguage(): string | undefined;
1712
+ get abapLanguageVersion(): string | undefined;
1713
+ get package(): string | undefined;
1714
+ protected abstract get contract(): AdkCdsSourceContract;
1715
+ getSource(): Promise<string>;
1716
+ load(): Promise<this>;
1717
+ }
1718
+ //#endregion
1719
+ //#region src/objects/cds/crud-source-object.d.ts
1720
+ /**
1721
+ * Shared implementation for standalone CDS/RAP source objects that support
1722
+ * full CRUD (get, source.main.get/put, post, delete) plus lock/unlock/activate.
1723
+ *
1724
+ * DDL, DCL, BDEF, and SRVD all follow the same lifecycle pattern:
1725
+ * create skeleton → PUT source → activate
1726
+ * This base eliminates the duplicated load/saveMainSource/lock/unlock/activate
1727
+ * boilerplate across those models.
1728
+ */
1729
+ declare abstract class AdkCrudSourceObject<TMetadata extends Record<string, unknown> = Record<string, unknown>> {
1730
+ abstract readonly kind: string;
1731
+ readonly name: string;
1732
+ protected readonly ctx: AdkContext;
1733
+ private metadata?;
1734
+ protected abstract readonly objectType: string;
1735
+ protected abstract readonly endpoint: string;
1736
+ protected constructor(ctx: AdkContext, name: string);
1737
+ get objectUri(): string;
1738
+ protected abstract get contract(): AdkCrudSourceContract;
1739
+ protected abstract getMetadataKey(): keyof TMetadata & string;
1740
+ get description(): string;
1741
+ get originalLanguage(): string | undefined;
1742
+ get abapLanguageVersion(): string | undefined;
1743
+ get package(): string | undefined;
1744
+ getSource(): Promise<string>;
1745
+ load(): Promise<this>;
1746
+ saveMainSource(source: string, options?: {
1747
+ lockHandle?: string;
1748
+ transport?: string;
1749
+ }): Promise<void>;
1750
+ lock(transport?: string): Promise<{
1751
+ handle: string;
1752
+ }>;
1753
+ unlock(lockHandle: string): Promise<void>;
1754
+ activate(): Promise<this>;
1755
+ protected static resolveContext(ctx?: AdkContext): AdkContext;
1756
+ /**
1757
+ * Get a source object (validates it exists by fetching source).
1758
+ * Generic helper used by static `get()` on subclasses.
1759
+ */
1760
+ protected static getSourceObject<T extends AdkCrudSourceObject>(this: new (ctx: AdkContext, name: string) => T, name: string, ctx?: AdkContext): Promise<T>;
1761
+ /**
1762
+ * Check if a source object exists.
1763
+ * Generic helper used by static `exists()` on subclasses.
1764
+ */
1765
+ protected static sourceObjectExists<T extends AdkCrudSourceObject>(this: new (ctx: AdkContext, name: string) => T, name: string, ctx?: AdkContext): Promise<boolean>;
1766
+ /**
1767
+ * Shared skeleton-creation helper. Subclasses pass their contract's `post`
1768
+ * function and the root element name + type that their AFF schema expects.
1769
+ */
1770
+ protected static createSourceSkeleton<T extends AdkCrudSourceObject>(this: new (ctx: AdkContext, name: string) => T, params: {
1771
+ name: string;
1772
+ description: string;
1773
+ packageName: string;
1774
+ transport?: string;
1775
+ ctx?: AdkContext;
1776
+ rootKey: string;
1777
+ objectTypeCode: string;
1778
+ responsible?: string;
1779
+ }, post: (query: Record<string, string>, body: Record<string, unknown>) => Promise<unknown>): Promise<T>;
1780
+ /**
1781
+ * Shared delete helper. Subclasses pass their contract's `delete` function.
1782
+ */
1783
+ protected static deleteSource(name: string, options: {
1784
+ transport?: string;
1785
+ lockHandle?: string;
1786
+ } | undefined, deleteFn: (name: string, options: Record<string, string>) => Promise<unknown>): Promise<void>;
1787
+ }
1788
+ //#endregion
1789
+ //#region src/objects/cds/ddl.model.d.ts
1790
+ interface DdlMetadata {
1791
+ ddlSource?: {
1792
+ description?: string;
1793
+ masterLanguage?: string;
1794
+ abapLanguageVersion?: string;
1795
+ packageRef?: {
1796
+ name?: string;
1797
+ };
1798
+ source_origin?: string;
1799
+ source_type?: string;
1800
+ };
1801
+ }
1802
+ declare class AdkDdlSource extends AdkCrudSourceObject<DdlMetadata> {
1803
+ static readonly kind: "DdlSource";
1804
+ readonly kind: "DdlSource";
1805
+ protected readonly objectType = "DDLS";
1806
+ protected readonly endpoint = "ddic/ddl/sources";
1807
+ private get contract();
1808
+ protected getMetadataKey(): 'ddlSource';
1809
+ get sourceOrigin(): string | undefined;
1810
+ get sourceType(): string | undefined;
1811
+ /**
1812
+ * Get a DDL source (does not fetch metadata, just returns handle)
1813
+ */
1814
+ static get(name: string, ctx?: AdkContext): Promise<AdkDdlSource>;
1815
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1816
+ /**
1817
+ * Create a new CDS DDL source on SAP
1818
+ *
1819
+ * POST /sap/bc/adt/ddic/ddl/sources?corrNr=...
1820
+ * Body matches the `ddl:source` schema (extends abapsource:AbapSourceMainObject).
1821
+ */
1822
+ static create(name: string, description: string, packageName: string, options?: {
1823
+ transport?: string;
1824
+ }, ctx?: AdkContext): Promise<AdkDdlSource>;
1825
+ static delete(name: string, options?: {
1826
+ transport?: string;
1827
+ lockHandle?: string;
1828
+ }, ctx?: AdkContext): Promise<void>;
1829
+ }
1830
+ //#endregion
1831
+ //#region src/objects/cds/dcl.model.d.ts
1832
+ interface DclMetadata {
1833
+ dclSource?: {
1834
+ description?: string;
1835
+ masterLanguage?: string;
1836
+ packageRef?: {
1837
+ name?: string;
1838
+ };
1839
+ };
1840
+ }
1841
+ declare class AdkDclSource extends AdkCrudSourceObject<DclMetadata> {
1842
+ static readonly kind: "DclSource";
1843
+ readonly kind: "DclSource";
1844
+ protected readonly objectType = "DCLS";
1845
+ protected readonly endpoint = "acm/dcl/sources";
1846
+ private get contract();
1847
+ protected getMetadataKey(): 'dclSource';
1848
+ static get(name: string, ctx?: AdkContext): Promise<AdkDclSource>;
1849
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
1850
+ /**
1851
+ * Create a new CDS DCL source on SAP
1852
+ */
1853
+ static create(name: string, description: string, packageName: string, options?: {
1854
+ transport?: string;
1855
+ }, ctx?: AdkContext): Promise<AdkDclSource>;
1856
+ static delete(name: string, options?: {
1857
+ transport?: string;
1858
+ lockHandle?: string;
1859
+ }, ctx?: AdkContext): Promise<void>;
1860
+ }
1861
+ //#endregion
1862
+ //#region src/objects/cds/ddlx.model.d.ts
1863
+ declare class AdkDdlExtension {
1864
+ static readonly kind: "DdlExtension";
1865
+ readonly kind: "DdlExtension";
1866
+ readonly name: string;
1867
+ protected readonly ctx: AdkContext;
1868
+ private metadata?;
1869
+ constructor(ctx: AdkContext, name: string);
1870
+ get objectUri(): string;
1871
+ get description(): string;
1872
+ get originalLanguage(): string | undefined;
1873
+ get abapLanguageVersion(): string | undefined;
1874
+ get package(): string | undefined;
1875
+ private get contract();
1876
+ getSource(): Promise<string>;
1877
+ load(): Promise<this>;
1878
+ }
1879
+ //#endregion
1880
+ //#region src/objects/cds/source-only-object.d.ts
1881
+ /**
1882
+ * CDS source object without a metadata schema in the connected ABAP release.
1883
+ *
1884
+ * DRAS and DRTY are absent from the reference system's repository search, so their source
1885
+ * endpoint is represented by the ADT DDIC naming convention and exercised
1886
+ * with official ABAP File Formats fixtures. The object is intentionally
1887
+ * source-first: import only needs the immutable source and a safe header.
1888
+ */
1889
+ declare abstract class AdkSourceOnlyCdsObject {
1890
+ readonly name: string;
1891
+ protected readonly ctx: AdkContext;
1892
+ protected abstract readonly endpoint: string;
1893
+ private source?;
1894
+ protected constructor(ctx: AdkContext, name: string);
1895
+ get objectUri(): string;
1896
+ get description(): string;
1897
+ get originalLanguage(): string;
1898
+ getSource(): Promise<string>;
1899
+ load(): Promise<this>;
1900
+ }
1901
+ //#endregion
1902
+ //#region src/objects/cds/dras.model.d.ts
1903
+ declare class AdkCdsAspect extends AdkSourceOnlyCdsObject {
1904
+ static readonly kind: "CdsAspect";
1905
+ readonly kind: "CdsAspect";
1906
+ protected readonly endpoint = "ddic/dras/sources";
1907
+ constructor(ctx: AdkContext, name: string);
1908
+ }
1909
+ //#endregion
1910
+ //#region src/objects/cds/drty.model.d.ts
1911
+ declare class AdkCdsType extends AdkSourceOnlyCdsObject {
1912
+ static readonly kind: "CdsType";
1913
+ readonly kind: "CdsType";
1914
+ protected readonly endpoint = "ddic/drty/sources";
1915
+ constructor(ctx: AdkContext, name: string);
1916
+ }
1917
+ //#endregion
1918
+ //#region src/objects/cds/dsfd.model.d.ts
1919
+ declare class AdkScalarFunctionDefinition extends AdkCdsSourceObject {
1920
+ static readonly kind: "ScalarFunctionDefinition";
1921
+ readonly kind: "ScalarFunctionDefinition";
1922
+ protected readonly endpoint = "ddic/dsfd/sources";
1923
+ constructor(ctx: AdkContext, name: string);
1924
+ protected get contract(): AdkCdsSourceContract;
1925
+ }
1926
+ //#endregion
1927
+ //#region src/objects/cds/dsfi.model.d.ts
1928
+ declare class AdkScalarFunctionImplementation {
1929
+ static readonly kind: "ScalarFunctionImplementation";
1930
+ readonly kind: "ScalarFunctionImplementation";
1931
+ readonly name: string;
1932
+ protected readonly ctx: AdkContext;
1933
+ private definition?;
1934
+ constructor(ctx: AdkContext, name: string);
1935
+ get objectUri(): string;
1936
+ private get contract();
1937
+ getSource(): Promise<unknown>;
1938
+ load(): Promise<this>;
1939
+ }
1940
+ //#endregion
1941
+ //#region src/objects/cds/dteb.model.d.ts
1942
+ declare class AdkEntityBuffer extends AdkCdsSourceObject {
1943
+ static readonly kind: "EntityBuffer";
1944
+ readonly kind: "EntityBuffer";
1945
+ protected readonly endpoint = "ddic/dteb/sources";
1946
+ constructor(ctx: AdkContext, name: string);
1947
+ protected get contract(): AdkCdsSourceContract;
1948
+ }
1949
+ //#endregion
1950
+ //#region src/objects/cds/dtdc.model.d.ts
1951
+ declare class AdkDynamicCache extends AdkSourceOnlyCdsObject {
1952
+ static readonly kind: "DynamicCache";
1953
+ readonly kind: "DynamicCache";
1954
+ protected readonly endpoint = "ddic/dtdc/sources";
1955
+ constructor(ctx: AdkContext, name: string);
1956
+ }
1957
+ //#endregion
1958
+ //#region src/objects/cds/dtix.model.d.ts
1959
+ declare class AdkTuningIndex extends AdkSourceOnlyCdsObject {
1960
+ static readonly kind: "TuningIndex";
1961
+ readonly kind: "TuningIndex";
1962
+ protected readonly endpoint = "ddic/dtix/sources";
1963
+ constructor(ctx: AdkContext, name: string);
1964
+ }
1965
+ //#endregion
1966
+ //#region src/objects/cds/dtsc.model.d.ts
1967
+ declare class AdkStaticCache extends AdkSourceOnlyCdsObject {
1968
+ static readonly kind: "StaticCache";
1969
+ readonly kind: "StaticCache";
1970
+ protected readonly endpoint = "ddic/dtsc/sources";
1971
+ constructor(ctx: AdkContext, name: string);
1972
+ }
1973
+ //#endregion
1974
+ //#region src/objects/cds/desd.model.d.ts
1975
+ declare class AdkExternalSchema {
1976
+ static readonly kind: "ExternalSchema";
1977
+ readonly kind: "ExternalSchema";
1978
+ readonly name: string;
1979
+ protected readonly ctx: AdkContext;
1980
+ constructor(ctx: AdkContext, name: string);
1981
+ get objectUri(): string;
1982
+ get description(): string;
1983
+ get originalLanguage(): string;
1984
+ load(): Promise<this>;
1985
+ }
1986
+ //#endregion
1987
+ //#region src/objects/repository/bdef/bdef.model.d.ts
1988
+ interface BdefMetadata {
1989
+ blueSource?: {
1990
+ description?: string;
1991
+ masterLanguage?: string;
1992
+ abapLanguageVersion?: string;
1993
+ packageRef?: {
1994
+ name?: string;
1995
+ };
1996
+ };
1997
+ }
1998
+ declare class AdkBehaviorDefinition extends AdkCrudSourceObject<BdefMetadata> {
1999
+ /** Static ADK kind marker — used by abapGit handler registry if needed. */
2000
+ static readonly kind: "BehaviorDefinition";
2001
+ readonly kind: "BehaviorDefinition";
2002
+ protected readonly objectType = "BDEF";
2003
+ protected readonly endpoint = "bo/behaviordefinitions";
2004
+ private get contract();
2005
+ protected getMetadataKey(): 'blueSource';
2006
+ /**
2007
+ * Get a BDEF (validates it exists by fetching source).
2008
+ */
2009
+ static get(name: string, ctx?: AdkContext): Promise<AdkBehaviorDefinition>;
2010
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
2011
+ /**
2012
+ * Create a new BDEF on SAP.
2013
+ *
2014
+ * POST /sap/bc/adt/bo/behaviordefinitions?corrNr=...
2015
+ * Body matches the `blue:blueSource` envelope (extends
2016
+ * abapsource:AbapSourceMainObject).
2017
+ */
2018
+ static create(name: string, description: string, packageName: string, options?: {
2019
+ transport?: string;
2020
+ }, ctx?: AdkContext): Promise<AdkBehaviorDefinition>;
2021
+ static delete(name: string, options?: {
2022
+ transport?: string;
2023
+ lockHandle?: string;
2024
+ }, ctx?: AdkContext): Promise<void>;
2025
+ }
2026
+ //#endregion
2027
+ //#region src/objects/repository/srvd/srvd.model.d.ts
2028
+ interface SrvdMetadata {
2029
+ srvdSource?: {
2030
+ description?: string;
2031
+ masterLanguage?: string;
2032
+ abapLanguageVersion?: string;
2033
+ packageRef?: {
2034
+ name?: string;
2035
+ };
2036
+ sourceOrigin?: string;
2037
+ srvdSourceType?: string;
2038
+ };
2039
+ }
2040
+ declare class AdkServiceDefinition extends AdkCrudSourceObject<SrvdMetadata> {
2041
+ /** Static ADK kind marker — used by abapGit handler registry if needed. */
2042
+ static readonly kind: "ServiceDefinition";
2043
+ readonly kind: "ServiceDefinition";
2044
+ protected readonly objectType = "SRVD";
2045
+ protected readonly endpoint = "ddic/srvd/sources";
2046
+ private get contract();
2047
+ protected getMetadataKey(): 'srvdSource';
2048
+ get sourceOrigin(): string | undefined;
2049
+ get sourceType(): string | undefined;
2050
+ /**
2051
+ * Get a SRVD (validates it exists by fetching source).
2052
+ */
2053
+ static get(name: string, ctx?: AdkContext): Promise<AdkServiceDefinition>;
2054
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
2055
+ /**
2056
+ * Create a new SRVD on SAP.
2057
+ *
2058
+ * POST /sap/bc/adt/ddic/srvd/sources?corrNr=...
2059
+ * Body matches the `srvd:source` envelope (extends
2060
+ * abapsource:AbapSourceMainObject).
2061
+ */
2062
+ static create(name: string, description: string, packageName: string, options?: {
2063
+ transport?: string;
2064
+ }, ctx?: AdkContext): Promise<AdkServiceDefinition>;
2065
+ static delete(name: string, options?: {
2066
+ transport?: string;
2067
+ lockHandle?: string;
2068
+ }, ctx?: AdkContext): Promise<void>;
2069
+ }
2070
+ //#endregion
2071
+ //#region src/objects/repository/srvb/srvb.model.d.ts
2072
+ declare class AdkServiceBinding {
2073
+ /** Static ADK kind marker — used by abapGit handler registry if needed. */
2074
+ static readonly kind: "ServiceBinding";
2075
+ readonly kind: "ServiceBinding";
2076
+ readonly name: string;
2077
+ protected readonly ctx: AdkContext;
2078
+ constructor(ctx: AdkContext, name: string);
2079
+ get objectUri(): string;
2080
+ /** Placeholder description — full metadata requires additional SAP fetch */
2081
+ get description(): string;
2082
+ private get contract();
2083
+ /**
2084
+ * Fetch the binding metadata document. SRVB has no source text;
2085
+ * `getSource()` returns an empty string for uniform CLI parity.
2086
+ */
2087
+ getMetadata(): Promise<unknown>;
2088
+ getSource(): Promise<string>;
2089
+ load(): Promise<this>;
2090
+ lock(transport?: string): Promise<{
2091
+ handle: string;
2092
+ }>;
2093
+ unlock(lockHandle: string): Promise<void>;
2094
+ activate(): Promise<this>;
2095
+ /**
2096
+ * Publish (activate) the binding in the SAP Gateway.
2097
+ * POST {basePath}/{name}/publishedstates
2098
+ */
2099
+ publish(): Promise<void>;
2100
+ /**
2101
+ * Unpublish (deactivate) the binding.
2102
+ * DELETE {basePath}/{name}/publishedstates
2103
+ */
2104
+ unpublish(): Promise<void>;
2105
+ /**
2106
+ * Get a SRVB (validates it exists by fetching metadata).
2107
+ */
2108
+ static get(name: string, ctx?: AdkContext): Promise<AdkServiceBinding>;
2109
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
2110
+ /**
2111
+ * Create a new SRVB on SAP.
2112
+ *
2113
+ * POST /sap/bc/adt/businessservices/bindings?corrNr=...
2114
+ * Body matches the `srvb:serviceBinding` envelope.
2115
+ */
2116
+ static create(name: string, description: string, packageName: string, options?: {
2117
+ transport?: string;
2118
+ }, ctx?: AdkContext): Promise<AdkServiceBinding>;
2119
+ static delete(name: string, options?: {
2120
+ transport?: string;
2121
+ lockHandle?: string;
2122
+ }, ctx?: AdkContext): Promise<void>;
2123
+ static publish(name: string, ctx?: AdkContext): Promise<void>;
2124
+ static unpublish(name: string, ctx?: AdkContext): Promise<void>;
2125
+ }
2126
+ //#endregion
2127
+ //#region src/base/kinds.d.ts
2128
+ /**
2129
+ * ADK Object Kinds
2130
+ *
2131
+ * Central registry of all ADK object types.
2132
+ * Import specific kinds for type-safe usage:
2133
+ *
2134
+ * @example
2135
+ * import { TransportRequest } from '../base/kinds';
2136
+ * class AdkTransportRequest extends AdkObject<typeof TransportRequest> { ... }
2137
+ */
2138
+ declare const TransportRequest: "TransportRequest";
2139
+ declare const TransportTask$1: "TransportTask";
2140
+ declare const Package: "Package";
2141
+ declare const Class: "Class";
2142
+ declare const Interface: "Interface";
2143
+ declare const FunctionGroup: "FunctionGroup";
2144
+ declare const FunctionModule: "FunctionModule";
2145
+ declare const Program: "Program";
2146
+ declare const Include: "Include";
2147
+ declare const Table: "Table";
2148
+ declare const Structure: "Structure";
2149
+ declare const DataElement: "DataElement";
2150
+ declare const Domain: "Domain";
2151
+ declare const TableType: "TableType";
2152
+ declare const DdlSource: "DdlSource";
2153
+ declare const DclSource: "DclSource";
2154
+ declare const DdlExtension: "DdlExtension";
2155
+ declare const CdsAspect: "CdsAspect";
2156
+ declare const CdsType: "CdsType";
2157
+ declare const ScalarFunctionDefinition: "ScalarFunctionDefinition";
2158
+ declare const ScalarFunctionImplementation: "ScalarFunctionImplementation";
2159
+ declare const EntityBuffer: "EntityBuffer";
2160
+ declare const DynamicCache: "DynamicCache";
2161
+ declare const TuningIndex: "TuningIndex";
2162
+ declare const StaticCache: "StaticCache";
2163
+ declare const ExternalSchema: "ExternalSchema";
2164
+ declare const BehaviorDefinition: "BehaviorDefinition";
2165
+ declare const ServiceDefinition: "ServiceDefinition";
2166
+ declare const ServiceBinding: "ServiceBinding";
2167
+ declare const MessageClass: "MessageClass";
2168
+ declare const EnhancementSpot: "EnhancementSpot";
2169
+ /** Union type of all ADK kinds */
2170
+ type AdkKind = typeof TransportRequest | typeof TransportTask$1 | typeof Package | typeof Class | typeof Interface | typeof FunctionGroup | typeof FunctionModule | typeof Program | typeof Include | typeof Table | typeof Structure | typeof DataElement | typeof Domain | typeof TableType | typeof DdlSource | typeof DclSource | typeof DdlExtension | typeof CdsAspect | typeof CdsType | typeof ScalarFunctionDefinition | typeof ScalarFunctionImplementation | typeof EntityBuffer | typeof DynamicCache | typeof TuningIndex | typeof StaticCache | typeof ExternalSchema | typeof BehaviorDefinition | typeof ServiceDefinition | typeof ServiceBinding | typeof MessageClass | typeof EnhancementSpot;
2171
+ /**
2172
+ * Maps ADK kind to concrete object type
2173
+ *
2174
+ * Enables type-safe factory methods:
2175
+ * ```ts
2176
+ * const cls = factory.byKind(Class, 'ZCL_TEST'); // → AdkClass
2177
+ * const intf = factory.byKind(Interface, 'ZIF'); // → AdkInterface
2178
+ * ```
2179
+ */
2180
+ type AdkObjectForKind<K extends AdkKind> = K extends typeof Class ? AdkClass : K extends typeof Interface ? AdkInterface : K extends typeof Package ? AdkPackage : K extends typeof Program ? AdkProgram : K extends typeof Include ? AdkInclude : K extends typeof FunctionGroup ? AdkFunctionGroup : K extends typeof FunctionModule ? AdkFunctionModule : K extends typeof TransportRequest ? AdkTransportRequest : K extends typeof TransportTask$1 ? AdkTransportTask : K extends typeof Domain ? AdkDomain : K extends typeof DataElement ? AdkDataElement : K extends typeof Table ? AdkTable : K extends typeof Structure ? AdkStructure : K extends typeof TableType ? AdkTableType : K extends typeof DdlSource ? AdkDdlSource : K extends typeof DclSource ? AdkDclSource : K extends typeof DdlExtension ? AdkDdlExtension : K extends typeof CdsAspect ? AdkCdsAspect : K extends typeof CdsType ? AdkCdsType : K extends typeof ScalarFunctionDefinition ? AdkScalarFunctionDefinition : K extends typeof ScalarFunctionImplementation ? AdkScalarFunctionImplementation : K extends typeof EntityBuffer ? AdkEntityBuffer : K extends typeof DynamicCache ? AdkDynamicCache : K extends typeof TuningIndex ? AdkTuningIndex : K extends typeof StaticCache ? AdkStaticCache : K extends typeof ExternalSchema ? AdkExternalSchema : K extends typeof BehaviorDefinition ? AdkBehaviorDefinition : K extends typeof ServiceDefinition ? AdkServiceDefinition : K extends typeof ServiceBinding ? AdkServiceBinding : AdkObject;
2181
+ //#endregion
2182
+ //#region src/base/types.d.ts
2183
+ /**
2184
+ * Base interface for all ABAP objects
2185
+ */
2186
+ interface AbapObject {
2187
+ readonly kind: AdkKind | string;
2188
+ readonly name: string;
2189
+ readonly package: string;
2190
+ readonly description: string;
2191
+ /**
2192
+ * ADT object type (e.g., 'DEVC/K', 'CLAS/OC')
2193
+ */
2194
+ readonly type: string;
2195
+ }
2196
+ //#endregion
2197
+ //#region src/base/object-set.d.ts
2198
+ /**
2199
+ * Result of bulk save operation
2200
+ */
2201
+ interface BulkSaveResult {
2202
+ /** Number of successfully saved objects */
2203
+ success: number;
2204
+ /** Number of objects that failed to save */
2205
+ failed: number;
2206
+ /** Number of unchanged objects (skipped) */
2207
+ unchanged: number;
2208
+ /** Details per object */
2209
+ results: Array<{
2210
+ object: AdkObject;
2211
+ success: boolean;
2212
+ /** True if object was skipped because source is identical to SAP */
2213
+ unchanged?: boolean;
2214
+ error?: string;
2215
+ }>;
2216
+ }
2217
+ /**
2218
+ * Options for bulk save operation
2219
+ */
2220
+ interface BulkSaveOptions extends SaveOptions {
2221
+ /** Continue saving remaining objects if one fails (default: true) */
2222
+ continueOnError?: boolean;
2223
+ /** Callback for progress reporting */
2224
+ onProgress?: (processed: number, total: number, current: AdkObject) => void;
2225
+ }
2226
+ /**
2227
+ * Options for bulk activation
2228
+ */
2229
+ interface BulkActivateOptions {
2230
+ /** Callback for progress reporting */
2231
+ onProgress?: (message: string) => void;
2232
+ }
2233
+ /**
2234
+ * ADK Object Set - Collection of objects with bulk operations
2235
+ *
2236
+ * A semantic layer for managing collections of ADK objects and
2237
+ * performing bulk operations like save and activate.
2238
+ */
2239
+ declare class AdkObjectSet {
2240
+ private readonly ctx;
2241
+ private readonly objects;
2242
+ constructor(ctx: AdkContext);
2243
+ /**
2244
+ * Add a single object to the set
2245
+ *
2246
+ * Propagates the set's context (lockService, lockStore) to the object
2247
+ * so that objects created by plugins with a bare { client } context
2248
+ * inherit the services configured on the set.
2249
+ */
2250
+ add(object: AdkObject): this;
2251
+ /**
2252
+ * Add multiple objects to the set
2253
+ */
2254
+ addAll(objects: AdkObject[]): this;
2255
+ /**
2256
+ * Remove an object from the set
2257
+ */
2258
+ remove(object: AdkObject): this;
2259
+ /**
2260
+ * Clear all objects from the set
2261
+ */
2262
+ clear(): this;
2263
+ /**
2264
+ * Get all objects in the set
2265
+ */
2266
+ getAll(): AdkObject[];
2267
+ /**
2268
+ * Get number of objects in the set
2269
+ */
2270
+ get size(): number;
2271
+ /**
2272
+ * Check if set is empty
2273
+ */
2274
+ get isEmpty(): boolean;
2275
+ /**
2276
+ * Filter objects by type
2277
+ */
2278
+ filterByType(type: string): AdkObject[];
2279
+ /**
2280
+ * Filter objects by kind
2281
+ */
2282
+ filterByKind(kind: string): AdkObject[];
2283
+ /**
2284
+ * Iterate over objects
2285
+ */
2286
+ [Symbol.iterator](): Iterator<AdkObject>;
2287
+ /**
2288
+ * Save all objects in the set
2289
+ *
2290
+ * Saves each object individually, handling lock/unlock per object.
2291
+ * By default continues on error to save as many objects as possible.
2292
+ *
2293
+ * @param options - Save options (transport, inactive, continueOnError)
2294
+ * @returns Result with success/failure counts and details
2295
+ */
2296
+ saveAll(options?: BulkSaveOptions): Promise<BulkSaveResult>;
2297
+ /**
2298
+ * Activate all objects in the set (bulk activation)
2299
+ *
2300
+ * Uses SAP's bulk activation endpoint for efficiency.
2301
+ * All objects are activated in a single request.
2302
+ *
2303
+ * @param options - Activation options
2304
+ * @returns Activation result with success/failure counts
2305
+ */
2306
+ activateAll(options?: BulkActivateOptions): Promise<ActivationResult>;
2307
+ /**
2308
+ * Save all objects as inactive, then bulk activate, then unlock
2309
+ *
2310
+ * This is the recommended pattern for deploying multiple objects:
2311
+ * 1. Save all objects as inactive (handles dependencies)
2312
+ * 2. Bulk activate all saved objects
2313
+ * 3. Unlock all objects
2314
+ *
2315
+ * @param options - Save options (transport required)
2316
+ * @returns Combined result of save and activation
2317
+ */
2318
+ deploy(options: BulkSaveOptions & {
2319
+ activate?: boolean;
2320
+ }): Promise<{
2321
+ save: BulkSaveResult;
2322
+ activation?: ActivationResult;
2323
+ }>;
2324
+ /**
2325
+ * Lock all objects in the set
2326
+ *
2327
+ * @returns Array of lock handles
2328
+ */
2329
+ lockAll(): Promise<LockHandle[]>;
2330
+ /**
2331
+ * Unlock all objects in the set
2332
+ */
2333
+ unlockAll(): Promise<void>;
2334
+ /**
2335
+ * Load all objects (fetch data from SAP)
2336
+ *
2337
+ * @param options - Load options
2338
+ * @returns This set (for chaining)
2339
+ */
2340
+ loadAll(options?: {
2341
+ parallel?: boolean;
2342
+ }): Promise<this>;
2343
+ /**
2344
+ * Create an object set from an array of objects
2345
+ */
2346
+ static from(objects: AdkObject[], ctx: AdkContext): AdkObjectSet;
2347
+ /**
2348
+ * Create an object set by collecting from an async generator
2349
+ *
2350
+ * Collects all objects yielded by the generator into the set.
2351
+ * Useful for collecting objects from format plugin export generators.
2352
+ *
2353
+ * @param generator - Async generator yielding AdkObject instances
2354
+ * @param ctx - ADK context for the set
2355
+ * @param options - Collection options
2356
+ * @returns Promise resolving to populated AdkObjectSet
2357
+ */
2358
+ static fromGenerator(generator: AsyncGenerator<AdkObject>, ctx: AdkContext, options?: {
2359
+ /** Filter function to include/exclude objects */
2360
+ filter?: (obj: AdkObject) => boolean;
2361
+ /** Callback for each object collected */
2362
+ onObject?: (obj: AdkObject) => void;
2363
+ }): Promise<AdkObjectSet>;
2364
+ }
2365
+ //#endregion
2366
+ //#region src/base/global-context.d.ts
2367
+ /**
2368
+ * Initialize the global ADK context from an ADT client.
2369
+ *
2370
+ * Call this once during application bootstrap (e.g., in CLI initialization).
2371
+ * After initialization, ADK objects can be used without passing context.
2372
+ *
2373
+ * @param client - ADT client v2 instance
2374
+ * @throws Error if client is not provided
2375
+ *
2376
+ * @example
2377
+ * ```ts
2378
+ * import { initializeAdk } from '@abapify/adk';
2379
+ * import { createAdtClient } from '@abapify/adt-client';
2380
+ *
2381
+ * const client = createAdtClient({ ... });
2382
+ * initializeAdk(client);
2383
+ *
2384
+ * // Now ADK objects work without context
2385
+ * const transport = await AdkTransportRequest.get('TRLK900001');
2386
+ * ```
2387
+ */
2388
+ declare function initializeAdk(client: AdtClient, options?: {
2389
+ lockStore?: LockStore$1;
2390
+ lockService?: LockService$1;
2391
+ }): void;
2392
+ /**
2393
+ * Get the global ADK context.
2394
+ *
2395
+ * Used internally by ADK objects when no explicit context is provided.
2396
+ *
2397
+ * @returns The global ADK context
2398
+ * @throws Error if ADK has not been initialized
2399
+ *
2400
+ * @example
2401
+ * ```ts
2402
+ * // Internal usage in ADK objects:
2403
+ * static async get(number: string, ctx?: AdkContext): Promise<AdkTransportRequest> {
2404
+ * const context = ctx ?? getGlobalContext();
2405
+ * // ...
2406
+ * }
2407
+ * ```
2408
+ */
2409
+ declare function getGlobalContext(): AdkContext;
2410
+ /**
2411
+ * Check if ADK has been initialized.
2412
+ *
2413
+ * Useful for conditional logic or error handling.
2414
+ *
2415
+ * @returns true if initializeAdk() has been called
2416
+ */
2417
+ declare function isAdkInitialized(): boolean;
2418
+ /**
2419
+ * Reset the global ADK context.
2420
+ *
2421
+ * Primarily for testing purposes. Clears the global context.
2422
+ */
2423
+ declare function resetAdk(): void;
2424
+ /**
2425
+ * Get the global context or return undefined if not initialized.
2426
+ *
2427
+ * Unlike getGlobalContext(), this doesn't throw - useful when you want
2428
+ * to check if context exists before using it.
2429
+ *
2430
+ * @returns The global context or undefined
2431
+ */
2432
+ declare function tryGetGlobalContext(): AdkContext | undefined;
2433
+ //#endregion
2434
+ //#region src/objects/repository/intf/intf.types.d.ts
2435
+ /**
2436
+ * ABAP Interface interface
2437
+ *
2438
+ * Plugins work with this interface - implementation is internal.
2439
+ * Mirrors ADT intf:abapInterface structure.
2440
+ */
2441
+ interface AbapInterface extends AbapObject {
2442
+ readonly kind: 'Interface';
2443
+ readonly responsible: string;
2444
+ readonly masterLanguage: string;
2445
+ readonly language: string;
2446
+ readonly version: string;
2447
+ readonly createdAt: Date;
2448
+ readonly createdBy: string;
2449
+ readonly changedAt: Date;
2450
+ readonly changedBy: string;
2451
+ readonly modeled: boolean;
2452
+ readonly sourceUri: string;
2453
+ readonly fixPointArithmetic: boolean;
2454
+ readonly activeUnicodeCheck: boolean;
2455
+ readonly packageRef?: AdtObjectReference;
2456
+ /**
2457
+ * Get interface source code
2458
+ */
2459
+ getSource(): Promise<string>;
2460
+ }
2461
+ //#endregion
2462
+ //#region src/objects/repository/prog/prog.types.d.ts
2463
+ /**
2464
+ * ABAP Program interface
2465
+ *
2466
+ * Plugins work with this interface - implementation is internal.
2467
+ * Mirrors ADT prog:abapProgram structure.
2468
+ */
2469
+ interface AbapProgram extends AbapObject {
2470
+ readonly kind: 'Program';
2471
+ readonly responsible: string;
2472
+ readonly masterLanguage: string;
2473
+ readonly language: string;
2474
+ readonly version: string;
2475
+ readonly createdAt: Date;
2476
+ readonly createdBy: string;
2477
+ readonly changedAt: Date;
2478
+ readonly changedBy: string;
2479
+ readonly sourceUri: string;
2480
+ readonly fixPointArithmetic: boolean;
2481
+ readonly activeUnicodeCheck: boolean;
2482
+ readonly programType?: string;
2483
+ readonly packageRef?: AdtObjectReference;
2484
+ /**
2485
+ * Get program source code
2486
+ */
2487
+ getSource(): Promise<string>;
2488
+ }
2489
+ //#endregion
2490
+ //#region src/objects/repository/incl/incl.types.d.ts
2491
+ /**
2492
+ * ABAP Include interface
2493
+ *
2494
+ * Plugins work with this interface - implementation is internal.
2495
+ * Mirrors ADT include:abapInclude structure.
2496
+ */
2497
+ interface AbapInclude extends AbapObject {
2498
+ readonly kind: 'Include';
2499
+ readonly responsible: string;
2500
+ readonly masterLanguage: string;
2501
+ readonly language: string;
2502
+ readonly version: string;
2503
+ readonly createdAt: Date;
2504
+ readonly createdBy: string;
2505
+ readonly changedAt: Date;
2506
+ readonly changedBy: string;
2507
+ readonly sourceUri: string;
2508
+ readonly fixPointArithmetic: boolean;
2509
+ readonly activeUnicodeCheck: boolean;
2510
+ readonly packageRef?: AdtObjectReference;
2511
+ /** Reference to the "main" program that owns this include. */
2512
+ readonly contextRef?: AdtObjectReference;
2513
+ /** Get include source code */
2514
+ getSource(): Promise<string>;
2515
+ }
2516
+ //#endregion
2517
+ //#region src/objects/repository/fugr/fugr.types.d.ts
2518
+ /**
2519
+ * ABAP Function Group interface
2520
+ *
2521
+ * Plugins work with this interface - implementation is internal.
2522
+ * Mirrors ADT fugr:abapFunctionGroup structure.
2523
+ */
2524
+ interface AbapFunctionGroup extends AbapObject {
2525
+ readonly kind: 'FunctionGroup';
2526
+ readonly responsible: string;
2527
+ readonly masterLanguage: string;
2528
+ readonly language: string;
2529
+ readonly version: string;
2530
+ readonly createdAt: Date;
2531
+ readonly createdBy: string;
2532
+ readonly changedAt: Date;
2533
+ readonly changedBy: string;
2534
+ readonly sourceUri: string;
2535
+ readonly fixPointArithmetic: boolean;
2536
+ readonly activeUnicodeCheck: boolean;
2537
+ readonly packageRef?: AdtObjectReference;
2538
+ /**
2539
+ * Get function group top-include source code
2540
+ */
2541
+ getSource(): Promise<string>;
2542
+ }
2543
+ //#endregion
2544
+ //#region src/objects/repository/fugr/func/func.types.d.ts
2545
+ /**
2546
+ * Function module processing type
2547
+ */
2548
+ type FunctionModuleProcessingType = 'normal' | 'rfc' | 'update';
2549
+ /**
2550
+ * Function module release state
2551
+ */
2552
+ type FunctionModuleReleaseState = 'notReleased' | 'internal' | 'external' | 'obsolete' | 'markedForRelease';
2553
+ /**
2554
+ * ABAP Function Module interface
2555
+ *
2556
+ * Plugins work with this interface - implementation is internal.
2557
+ * Mirrors ADT fmodules:abapFunctionModule structure.
2558
+ */
2559
+ interface AbapFunctionModule extends AbapObject {
2560
+ readonly kind: 'FunctionModule';
2561
+ /** Parent function group name */
2562
+ readonly groupName: string;
2563
+ readonly version: string;
2564
+ readonly language: string;
2565
+ readonly createdAt: Date;
2566
+ readonly createdBy: string;
2567
+ readonly changedAt: Date;
2568
+ readonly changedBy: string;
2569
+ readonly sourceUri: string;
2570
+ readonly processingType: FunctionModuleProcessingType;
2571
+ readonly releaseState: FunctionModuleReleaseState;
2572
+ readonly basXMLEnabled: boolean;
2573
+ /**
2574
+ * Get function module source code
2575
+ */
2576
+ getSource(): Promise<string>;
2577
+ }
2578
+ //#endregion
2579
+ //#region src/objects/repository/badi/badi.model.d.ts
2580
+ declare class AdkBadi {
2581
+ /** Static ADK kind marker. */
2582
+ static readonly kind: "Badi";
2583
+ readonly kind: "Badi";
2584
+ readonly name: string;
2585
+ protected readonly ctx: AdkContext;
2586
+ private _description?;
2587
+ private _package?;
2588
+ constructor(ctx: AdkContext, name: string);
2589
+ /** ADT URI (lowercase path segment — SAP convention). */
2590
+ get objectUri(): string;
2591
+ /** Description from the ENHO metadata, falling back to the object name. */
2592
+ get description(): string;
2593
+ /** Package name from the ENHO metadata. */
2594
+ get package(): string;
2595
+ private get contract();
2596
+ getMetadata(): Promise<unknown>;
2597
+ getSource(): Promise<string>;
2598
+ saveMainSource(source: string, options?: {
2599
+ lockHandle?: string;
2600
+ transport?: string;
2601
+ }): Promise<void>;
2602
+ lock(transport?: string): Promise<{
2603
+ handle: string;
2604
+ }>;
2605
+ unlock(lockHandle: string): Promise<void>;
2606
+ activate(): Promise<this>;
2607
+ /** Fetch a BAdI / ENHO, validating existence via a metadata GET. */
2608
+ static get(name: string, ctx?: AdkContext): Promise<AdkBadi>;
2609
+ static exists(name: string, ctx?: AdkContext): Promise<boolean>;
2610
+ /**
2611
+ * Create a new Enhancement Implementation (BAdI container).
2612
+ *
2613
+ * Trial systems typically reject this with HTTP 403 — this is an
2614
+ * area that requires elevated authorisation on most SAP installs.
2615
+ */
2616
+ static create(name: string, description: string, packageName: string, options?: {
2617
+ transport?: string;
2618
+ }, ctx?: AdkContext): Promise<AdkBadi>;
2619
+ static delete(name: string, options?: {
2620
+ transport?: string;
2621
+ lockHandle?: string;
2622
+ }, ctx?: AdkContext): Promise<void>;
2623
+ }
2624
+ //#endregion
2625
+ //#region src/objects/repository/classic-badi/classic-badi.model.d.ts
2626
+ interface ClassicBadiInput {
2627
+ name: string;
2628
+ ctx?: AdkContext;
2629
+ }
2630
+ declare abstract class AdkClassicBadiBase {
2631
+ readonly name: string;
2632
+ protected readonly ctx: AdkContext;
2633
+ constructor(input: {
2634
+ ctx: AdkContext;
2635
+ name: string;
2636
+ });
2637
+ abstract get kind(): string;
2638
+ abstract get objectUri(): string;
2639
+ abstract getMetadata(): Promise<BasicObjectPropertiesResponse>;
2640
+ static get<T extends AdkClassicBadiBase>(this: {
2641
+ new (input: {
2642
+ ctx: AdkContext;
2643
+ name: string;
2644
+ }): T;
2645
+ }, input: ClassicBadiInput): Promise<T>;
2646
+ static exists<T extends AdkClassicBadiBase>(this: {
2647
+ new (input: {
2648
+ ctx: AdkContext;
2649
+ name: string;
2650
+ }): T;
2651
+ }, input: ClassicBadiInput): Promise<boolean>;
2652
+ }
2653
+ declare class AdkClassicBadiDefinition extends AdkClassicBadiBase {
2654
+ readonly kind: "ClassicBadiDefinition";
2655
+ get objectUri(): string;
2656
+ getMetadata(): Promise<BasicObjectPropertiesResponse>;
2657
+ }
2658
+ declare class AdkClassicBadiImplementation extends AdkClassicBadiBase {
2659
+ readonly kind: "ClassicBadiImplementation";
2660
+ get objectUri(): string;
2661
+ getMetadata(): Promise<BasicObjectPropertiesResponse>;
2662
+ }
2663
+ //#endregion
2664
+ //#region src/objects/cts/transport-import.d.ts
2665
+ interface TransportObjectData$1 {
2666
+ pgmid?: string;
2667
+ type?: string;
2668
+ name?: string;
2669
+ wbtype?: string;
2670
+ uri?: string;
2671
+ obj_desc?: string;
2672
+ obj_info?: string;
2673
+ lock_status?: string;
2674
+ /** Object function code (e.g. 'D' = deletion, 'K' = key, '' = modification) */
2675
+ obj_func?: string;
2676
+ }
2677
+ /**
2678
+ * Selector for filtering transport objects.
2679
+ *
2680
+ * All specified dimensions are ANDed together.
2681
+ * Use '*' for a wildcard that matches any non-empty value.
2682
+ */
2683
+ interface TransportObjectSelector {
2684
+ /**
2685
+ * Filter by object function code.
2686
+ * 'D' = deletion only, 'K' = key only, '*' = any non-empty value, '' = empty (normal)
2687
+ */
2688
+ objFunc?: string | string[];
2689
+ /**
2690
+ * Filter by program ID.
2691
+ * 'R3TR' = repository objects, 'LIMU' = sub-objects, '*' = any
2692
+ */
2693
+ pgmid?: string | string[];
2694
+ /**
2695
+ * Filter by object type (e.g. 'CLAS', 'TABL', '*' = any)
2696
+ */
2697
+ type?: string | string[];
2698
+ }
2699
+ interface TransportTaskData$1 {
2700
+ number?: string;
2701
+ owner?: string;
2702
+ desc?: string;
2703
+ status?: string;
2704
+ status_text?: string;
2705
+ target?: string;
2706
+ abap_object?: TransportObjectData$1 | TransportObjectData$1[];
2707
+ }
2708
+ /**
2709
+ * Check if an object ref matches all dimensions of a {@link TransportObjectSelector}.
2710
+ *
2711
+ * Exported so that consumers (e.g. import service) can reuse the same logic
2712
+ * without duplicating it.
2713
+ */
2714
+ declare function matchesSelector(obj: AdkTransportObjectRef, selector: TransportObjectSelector): boolean;
2715
+ /**
2716
+ * Transport object reference - lightweight wrapper
2717
+ *
2718
+ * Contains metadata about an object in the transport.
2719
+ * Call load() to get the full ADK object.
2720
+ */
2721
+ declare class AdkTransportObjectRef {
2722
+ private readonly ctx;
2723
+ private readonly data;
2724
+ constructor(ctx: AdkContext, data: TransportObjectData$1);
2725
+ /** Program ID (R3TR, LIMU, etc.) */
2726
+ get pgmid(): string;
2727
+ /** Object type (CLAS, INTF, DOMA, etc.) */
2728
+ get type(): string;
2729
+ /** Object name */
2730
+ get name(): string;
2731
+ /** Workbench type (more specific type) */
2732
+ get wbtype(): string | undefined;
2733
+ /** Object URI for direct access */
2734
+ get uri(): string | undefined;
2735
+ /** Object description */
2736
+ get description(): string | undefined;
2737
+ /**
2738
+ * Object function code (SAP OBJFUNC).
2739
+ * 'D' = marked for deletion, 'K' = key entry, '' = regular modification.
2740
+ */
2741
+ get objFunc(): string;
2742
+ /** Whether this object is marked for deletion (obj_func === 'D') */
2743
+ get isDeleted(): boolean;
2744
+ /** Full object key (PGMID/TYPE/NAME) */
2745
+ get key(): string;
2746
+ /**
2747
+ * Load the full ADK object
2748
+ *
2749
+ * Uses the ADK factory to create the appropriate object type
2750
+ * (AdkClass, AdkInterface, AdkPackage, etc.)
2751
+ *
2752
+ * @returns The loaded ADK object, or undefined if type not supported
2753
+ */
2754
+ load(): Promise<unknown>;
2755
+ /** Raw data from API */
2756
+ get raw(): TransportObjectData$1;
2757
+ }
2758
+ /**
2759
+ * Transport task reference
2760
+ */
2761
+ declare class AdkTransportTaskRef {
2762
+ private readonly ctx;
2763
+ private readonly data;
2764
+ constructor(ctx: AdkContext, data: TransportTaskData$1);
2765
+ get number(): string;
2766
+ get owner(): string;
2767
+ get description(): string;
2768
+ get status(): string;
2769
+ get statusText(): string;
2770
+ /** Objects in this task */
2771
+ get objects(): AdkTransportObjectRef[];
2772
+ }
2773
+ /**
2774
+ * AdkTransport - Transport request for import operations
2775
+ *
2776
+ * Simple, focused API for importing transport objects:
2777
+ *
2778
+ * @example
2779
+ * ```typescript
2780
+ * const transport = await AdkTransport.get('DEVK900001');
2781
+ *
2782
+ * for (const objRef of transport.objects) {
2783
+ * console.log(`${objRef.type} ${objRef.name}`);
2784
+ * const adkObject = await objRef.load();
2785
+ * if (adkObject) {
2786
+ * // Serialize with plugin
2787
+ * await plugin.serialize(adkObject);
2788
+ * }
2789
+ * }
2790
+ * ```
2791
+ */
2792
+ declare class AdkTransport {
2793
+ private readonly ctx;
2794
+ private readonly data;
2795
+ private readonly requestedNumber;
2796
+ private _objects?;
2797
+ private _tasks?;
2798
+ private constructor();
2799
+ /** Transport number */
2800
+ get number(): string;
2801
+ private get itemData();
2802
+ /** Transport description */
2803
+ get description(): string;
2804
+ /** Transport owner */
2805
+ get owner(): string;
2806
+ /** Transport status (D=Modifiable, R=Released) */
2807
+ get status(): string;
2808
+ /** Transport status text */
2809
+ get statusText(): string;
2810
+ /** Transport target system */
2811
+ get target(): string;
2812
+ /** Object type (K=Request, T=Task) */
2813
+ get objectType(): string;
2814
+ /** Tasks belonging to this transport */
2815
+ get tasks(): AdkTransportTaskRef[];
2816
+ /**
2817
+ * All objects in this transport
2818
+ *
2819
+ * Collects objects from:
2820
+ * - Direct objects on request
2821
+ * - Objects from all tasks
2822
+ * - all_objects container (if present)
2823
+ */
2824
+ get objects(): AdkTransportObjectRef[];
2825
+ private collectObjects;
2826
+ /**
2827
+ * Get objects filtered by type
2828
+ *
2829
+ * @param types - Object types to include (e.g., ['CLAS', 'INTF'])
2830
+ */
2831
+ getObjectsByType(...types: string[]): AdkTransportObjectRef[];
2832
+ /**
2833
+ * Get objects filtered by a {@link TransportObjectSelector}.
2834
+ *
2835
+ * All dimensions specified in the selector are ANDed together.
2836
+ *
2837
+ * @example
2838
+ * ```typescript
2839
+ * // Get only deletion objects with pgmid=R3TR
2840
+ * const deleted = transport.getObjectsBySelector({ objFunc: 'D', pgmid: 'R3TR' });
2841
+ * ```
2842
+ */
2843
+ getObjectsBySelector(selector: TransportObjectSelector): AdkTransportObjectRef[];
2844
+ /**
2845
+ * Convenience accessor for objects marked for deletion (obj_func === 'D').
2846
+ *
2847
+ * Equivalent to `getObjectsBySelector({ objFunc: 'D' })`.
2848
+ */
2849
+ get deletionObjects(): AdkTransportObjectRef[];
2850
+ /**
2851
+ * Get unique object types in this transport
2852
+ */
2853
+ getObjectTypes(): string[];
2854
+ /**
2855
+ * Get object count by type
2856
+ */
2857
+ getObjectCountByType(): Record<string, number>;
2858
+ /** Raw API response (unwrapped) */
2859
+ get raw(): TransportData;
2860
+ /**
2861
+ * Get a transport by number
2862
+ *
2863
+ * @param number - Transport number (e.g., 'DEVK900001')
2864
+ * @param ctx - Optional ADK context (uses global context if not provided)
2865
+ *
2866
+ * @example
2867
+ * ```typescript
2868
+ * const transport = await AdkTransport.get('DEVK900001');
2869
+ * console.log(`${transport.description} - ${transport.objects.length} objects`);
2870
+ * ```
2871
+ */
2872
+ static get(number: string, ctx?: AdkContext): Promise<AdkTransport>;
2873
+ /**
2874
+ * Load multiple transports and merge their objects into a single view.
2875
+ *
2876
+ * De-duplication key is `pgmid/type/name`. When the same key appears in
2877
+ * multiple transports the **first** occurrence wins (first transport in the
2878
+ * `numbers` array). The source transport number is available via
2879
+ * `AdkTransportObjectRef.sourceTransport`.
2880
+ *
2881
+ * @param numbers - Transport numbers to load and merge
2882
+ * @param ctx - Optional ADK context
2883
+ *
2884
+ * @example
2885
+ * ```typescript
2886
+ * const merged = await AdkTransport.merge(['DEVK900001', 'DEVK900002']);
2887
+ * const deletions = merged.getObjectsBySelector({ objFunc: 'D' });
2888
+ * ```
2889
+ */
2890
+ static merge(numbers: string[], ctx?: AdkContext): Promise<MergedTransportView>;
2891
+ }
2892
+ /**
2893
+ * Result of resolving transport objects (single or multi-TR).
2894
+ *
2895
+ * Returned by {@link resolveTransportObjects}.
2896
+ */
2897
+ interface ResolvedTransportObjects {
2898
+ /** Deduplicated list of transport objects (first-win across TRs). */
2899
+ objects: AdkTransportObjectRef[];
2900
+ /** Maps each object key to the concrete request or task that supplied it. */
2901
+ sourceTransportMap: Map<string, string>;
2902
+ /** Requested roots/tasks plus observed child tasks, in stable order. */
2903
+ scopeTransportNumbers: string[];
2904
+ }
2905
+ /**
2906
+ * Load and resolve objects from one or more transport numbers, with optional
2907
+ * selector-based filtering and deduplication across TRs.
2908
+ *
2909
+ * This is the shared logic used by both the CLI `cts tr objects` command and
2910
+ * the MCP `cts_transport_objects` tool — extracted here to avoid duplication.
2911
+ *
2912
+ * @param transportNumbers - Ordered list of TR numbers (first-win deduplication).
2913
+ * @param selector - Optional dimension filter (objFunc, pgmid, type).
2914
+ * @param ctx - Optional ADK context (uses global context if omitted).
2915
+ */
2916
+ declare function resolveTransportObjects(transportNumbers: string[], selector: TransportObjectSelector, ctx?: AdkContext): Promise<ResolvedTransportObjects>;
2917
+ /**
2918
+ * Merged view of objects from multiple transports.
2919
+ *
2920
+ * De-duplicates by `pgmid/type/name`; first occurrence wins.
2921
+ */
2922
+ declare class MergedTransportView {
2923
+ private readonly _objects;
2924
+ readonly transports: AdkTransport[];
2925
+ constructor(transports: AdkTransport[]);
2926
+ /** All objects across transports (deduplicated) */
2927
+ get objects(): AdkTransportObjectRef[];
2928
+ /** Objects matching a selector across all transports */
2929
+ getObjectsBySelector(selector: TransportObjectSelector): AdkTransportObjectRef[];
2930
+ /** Convenience: objects marked for deletion (obj_func === 'D') */
2931
+ get deletionObjects(): AdkTransportObjectRef[];
2932
+ /**
2933
+ * Load multiple transports and return a merged view.
2934
+ *
2935
+ * @param numbers - Transport numbers to load and merge
2936
+ * @param ctx - Optional ADK context
2937
+ */
2938
+ static create(numbers: string[], ctx?: AdkContext): Promise<MergedTransportView>;
2939
+ }
2940
+ //#endregion
2941
+ //#region src/transport-source-manifest.d.ts
2942
+ type TransportSourceChangeKind = 'added' | 'modified' | 'deleted' | 'ambiguous' | 'unsupported' | 'failed';
2943
+ type SourceHistoryDiagnosticCode = 'DELETED_SOURCE_BASE_UNAVAILABLE' | 'OBJECT_METADATA_LOAD_FAILED' | 'OBJECT_METADATA_UNAVAILABLE' | 'OBJECT_TYPE_UNSUPPORTED' | 'SOURCE_COMPONENT_NOT_FOUND' | 'SOURCE_COMPONENTS_UNAVAILABLE' | 'SOURCE_COMPONENT_URI_UNSAFE' | 'SOURCE_COMPONENT_VERSIONS_UNAVAILABLE' | 'SOURCE_HISTORY_INTERVENING_VERSION' | 'SOURCE_HISTORY_ORDER_INVALID' | 'SOURCE_HISTORY_PROVENANCE_MISSING' | 'SOURCE_HISTORY_RETRIEVAL_FAILED' | 'SOURCE_HISTORY_SCOPE_VERSION_MISSING';
2944
+ interface SourceHistoryDiagnostic {
2945
+ code: SourceHistoryDiagnosticCode;
2946
+ message: string;
2947
+ }
2948
+ type TransportSourceDiagnostic = SourceHistoryDiagnostic;
2949
+ interface ObjectSourceHistoryIdentity {
2950
+ name: string;
2951
+ type: string;
2952
+ packageName?: string;
2953
+ }
2954
+ interface ListObjectSourceVersionsOptions {
2955
+ component?: string;
2956
+ }
2957
+ type ObjectSourceVersionsComponent = (TransportSourceManifestComponent & {
2958
+ versions: SourceVersionRef[];
2959
+ diagnostic?: never;
2960
+ }) | (TransportSourceManifestComponent & {
2961
+ versions?: never;
2962
+ diagnostic: SourceHistoryDiagnostic;
2963
+ });
2964
+ interface ObjectSourceVersionsResult {
2965
+ object: ObjectSourceHistoryIdentity;
2966
+ components: ObjectSourceVersionsComponent[];
2967
+ }
2968
+ type ObjectSourceHistoryErrorCode = 'OBJECT_METADATA_LOAD_FAILED' | 'OBJECT_METADATA_UNAVAILABLE' | 'OBJECT_TYPE_UNSUPPORTED' | 'SOURCE_COMPONENT_NOT_FOUND' | 'SOURCE_COMPONENTS_UNAVAILABLE';
2969
+ /** Stable public failure for errors that occur before a component result exists. */
2970
+ declare class ObjectSourceHistoryError extends Error {
2971
+ readonly code: ObjectSourceHistoryErrorCode;
2972
+ readonly object: ObjectSourceHistoryIdentity;
2973
+ readonly name = "ObjectSourceHistoryError";
2974
+ constructor(code: ObjectSourceHistoryErrorCode, message: string, object: ObjectSourceHistoryIdentity);
2975
+ }
2976
+ interface TransportSourceVersionSelection {
2977
+ changeKind: TransportSourceChangeKind;
2978
+ exact: boolean;
2979
+ base?: SourceVersionRef;
2980
+ head?: SourceVersionRef;
2981
+ diagnostic?: TransportSourceDiagnostic;
2982
+ }
2983
+ interface TransportSourceManifestObject {
2984
+ pgmid: string;
2985
+ type: string;
2986
+ name: string;
2987
+ packageName?: string;
2988
+ }
2989
+ interface TransportSourceManifestComponent {
2990
+ id: string;
2991
+ sourceUri?: string;
2992
+ versionsUri?: string;
2993
+ }
2994
+ interface TransportSourceManifestEntry extends TransportSourceVersionSelection {
2995
+ object: TransportSourceManifestObject;
2996
+ repositoryObject?: TransportSourceManifestObject;
2997
+ component: TransportSourceManifestComponent;
2998
+ sourceTransport: string;
2999
+ }
3000
+ interface TransportObjectInventoryEntry {
3001
+ pgmid: string;
3002
+ type: string;
3003
+ name: string;
3004
+ wbtype?: string;
3005
+ uri?: string;
3006
+ objFunc: string;
3007
+ sourceTransport: string;
3008
+ }
3009
+ interface TransportSourceManifest {
3010
+ requestedTransports: string[];
3011
+ scopeTransports: string[];
3012
+ inventory: TransportObjectInventoryEntry[];
3013
+ entries: TransportSourceManifestEntry[];
3014
+ }
3015
+ interface BuildTransportSourceManifestOptions {
3016
+ selector?: TransportObjectSelector;
3017
+ concurrency?: number;
3018
+ }
3019
+ /**
3020
+ * Select immutable before/after references using SAP's observed feed ordinal.
3021
+ */
3022
+ declare function selectTransportSourceVersions(
3023
+ // NOSONAR - SAP feed-order selection is inherently branch-heavy; will be refactored in follow-up
3024
+ versions: readonly SourceVersionRef[], scopeTransportNumbers: readonly string[], deleted?: boolean): TransportSourceVersionSelection;
3025
+ /**
3026
+ * List immutable source-version metadata for every discovered object component.
3027
+ * Source bodies remain lazy and are never read by this operation.
3028
+ */
3029
+ declare function listObjectSourceVersions(objectName: string, objectType: string, options?: ListObjectSourceVersionsOptions, ctx?: AdkContext): Promise<ObjectSourceVersionsResult>;
3030
+ /**
3031
+ * Resolve transport objects and produce immutable source-history references.
3032
+ * Source bodies remain lazy and are never read while building the manifest.
3033
+ */
3034
+ declare function buildTransportSourceManifest(requestedTransports: string[], options?: BuildTransportSourceManifestOptions, ctx?: AdkContext): Promise<TransportSourceManifest>;
3035
+ //#endregion
3036
+ //#region src/factory.d.ts
3037
+ /**
3038
+ * Extract ADT type and name from XML
3039
+ *
3040
+ * Relies on adtcore:type and adtcore:name attributes which are
3041
+ * the standard identifiers in ADT XML responses.
3042
+ *
3043
+ * @param xml - XML string from ADT response
3044
+ * @returns Extracted type and name, or undefined if not found
3045
+ */
3046
+ declare function parseXmlIdentity(xml: string): {
3047
+ type: string;
3048
+ name: string;
3049
+ } | undefined;
3050
+ /**
3051
+ * Generic ADK object for unregistered types
3052
+ *
3053
+ * Provides core functionality (adtcore attributes, links)
3054
+ * without type-specific features.
3055
+ */
3056
+ declare class AdkGenericObject {
3057
+ readonly adtType: string;
3058
+ readonly adtMainType: string;
3059
+ readonly adtSubType?: string;
3060
+ protected readonly ctx: AdkContext;
3061
+ protected _name: string;
3062
+ protected _data?: unknown;
3063
+ constructor(ctx: AdkContext, name: string, adtType: string);
3064
+ get name(): string;
3065
+ get type(): string;
3066
+ /** Check if data is loaded */
3067
+ get isLoaded(): boolean;
3068
+ /** Get raw data (if loaded) */
3069
+ get data(): unknown;
3070
+ /** Set data (for manual population) */
3071
+ setData(data: unknown): void;
3072
+ }
3073
+ /**
3074
+ * ADK Factory - Generic object creation
3075
+ */
3076
+ interface AdkFactory {
3077
+ /** Context used by this factory */
3078
+ readonly ctx: AdkContext;
3079
+ /**
3080
+ * Get object by name and ADT type
3081
+ *
3082
+ * Supports both full types (DEVC/K) and main types (DEVC).
3083
+ * Returns deferred object - call load() to fetch data.
3084
+ *
3085
+ * @example
3086
+ * const pkg = factory.get('ZPACKAGE', 'DEVC/K');
3087
+ * await pkg.load();
3088
+ *
3089
+ * const cls = factory.get('ZCL_TEST', 'CLAS');
3090
+ * await cls.load();
3091
+ */
3092
+ get(name: string, adtType: string): AdkObject | AdkGenericObject;
3093
+ /**
3094
+ * Get object with initial data (for deserialization)
3095
+ *
3096
+ * Creates object pre-populated with data - no load() needed.
3097
+ * Used when deserializing from files rather than loading from SAP.
3098
+ *
3099
+ * @example
3100
+ * const cls = factory.getWithData({ name: 'ZCL_TEST', description: 'Test' }, 'CLAS');
3101
+ * // cls.isLoaded is true, no need to call load()
3102
+ */
3103
+ getWithData(data: Record<string, unknown>, adtType: string): AdkObject | AdkGenericObject;
3104
+ /**
3105
+ * Get object by ADK kind (type-safe)
3106
+ *
3107
+ * Returns correctly typed object based on kind.
3108
+ * TypeScript infers the concrete return type from the kind parameter.
3109
+ *
3110
+ * @example
3111
+ * import { Class, Interface } from '@abapify/adk';
3112
+ * const cls = factory.byKind(Class, 'ZCL_TEST'); // → AdkClass
3113
+ * const intf = factory.byKind(Interface, 'ZIF_TEST'); // → AdkInterface
3114
+ */
3115
+ byKind<K extends AdkKind>(kind: K, name: string): AdkObjectForKind<K>;
3116
+ /**
3117
+ * Create object from XML response
3118
+ *
3119
+ * Parses XML to extract type and name, then constructs
3120
+ * the correct object type.
3121
+ *
3122
+ * @example
3123
+ * const xml = await client.fetch('/sap/bc/adt/oo/classes/ZCL_TEST');
3124
+ * const cls = factory.fromXml(xml);
3125
+ */
3126
+ fromXml(xml: string): AdkObject | AdkGenericObject | undefined;
3127
+ /**
3128
+ * Create new object (for creation workflows)
3129
+ *
3130
+ * Returns deferred object without name - used when
3131
+ * creating new objects in SAP.
3132
+ */
3133
+ create(adtType: string): AdkObject | AdkGenericObject;
3134
+ }
3135
+ /**
3136
+ * Create ADK factory
3137
+ *
3138
+ * @param ctx - ADK context with services
3139
+ * @returns Factory instance
3140
+ */
3141
+ declare function createAdkFactory(ctx: AdkContext): AdkFactory;
3142
+ /**
3143
+ * Create ADK factory from ADT client
3144
+ *
3145
+ * Builds context from client and returns factory.
3146
+ * This is the main entry point for most users.
3147
+ *
3148
+ * @example
3149
+ * import { createAdtClient } from '@abapify/adt-client';
3150
+ * import { createAdk } from '@abapify/adk';
3151
+ *
3152
+ * const client = createAdtClient({ ... });
3153
+ * const adk = createAdk(client);
3154
+ *
3155
+ * const cls = adk.get('ZCL_TEST', 'CLAS');
3156
+ * await cls.load();
3157
+ */
3158
+ declare function createAdk(client: AdtClient$1): AdkFactory;
3159
+ //#endregion
3160
+ //#region src/base/registry.d.ts
3161
+ /**
3162
+ * Minimal contract for any object that can be registered.
3163
+ *
3164
+ * Both `AdkObject` subclasses and lightweight source-only CDS/RAP objects
3165
+ * (which do not extend `AdkObject`) satisfy this interface, allowing the
3166
+ * registry to store constructors for both without `as any` casts.
3167
+ */
3168
+ interface AdkRegistrable {
3169
+ readonly name: string;
3170
+ readonly kind: AdkKind;
3171
+ }
3172
+ /** Constructor signature for ADK objects */
3173
+ type AdkObjectConstructor<T extends AdkRegistrable = AdkRegistrable> = new (ctx: AdkContext, nameOrData: string | Record<string, unknown>) => T;
3174
+ /** How to transform object name for the URI path segment */
3175
+ type NameTransform = 'lowercase' | 'preserve';
3176
+ /** Registry entry with constructor and kind */
3177
+ interface RegistryEntry {
3178
+ readonly kind: AdkKind;
3179
+ readonly constructor: AdkObjectConstructor;
3180
+ /** ADT REST endpoint path segment (e.g., 'oo/classes', 'ddic/tabletypes') */
3181
+ readonly endpoint?: string;
3182
+ /** How to transform the object name in URIs (default: lowercase) */
3183
+ readonly nameTransform?: NameTransform;
3184
+ /** Optional name normalizer — e.g., strip SAPL prefix for FUGR */
3185
+ readonly normalizeName?: (name: string) => string;
3186
+ }
3187
+ /**
3188
+ * Parse ADT type into components
3189
+ *
3190
+ * @example
3191
+ * parseAdtType("DEVC/K") // { full: "DEVC/K", main: "DEVC", sub: "K" }
3192
+ * parseAdtType("DEVC") // { full: "DEVC", main: "DEVC", sub: undefined }
3193
+ */
3194
+ declare function parseAdtType(adtType: string): {
3195
+ full: string;
3196
+ main: string;
3197
+ sub?: string;
3198
+ };
3199
+ /**
3200
+ * Get main type from ADT type
3201
+ *
3202
+ * @example
3203
+ * getMainType("DEVC/K") // "DEVC"
3204
+ * getMainType("CLAS") // "CLAS"
3205
+ */
3206
+ declare function getMainType(adtType: string): string;
3207
+ /** Options for registerObjectType */
3208
+ interface RegisterObjectTypeOptions {
3209
+ /** ADT REST endpoint path segment (e.g., 'oo/classes', 'ddic/tabletypes') */
3210
+ endpoint?: string;
3211
+ /** How to transform the object name in URIs (default: 'lowercase') */
3212
+ nameTransform?: NameTransform;
3213
+ /** Optional name normalizer — e.g., strip SAPL prefix for FUGR */
3214
+ normalizeName?: (name: string) => string;
3215
+ }
3216
+ /**
3217
+ * Register an ADK object type
3218
+ *
3219
+ * @param adtType - ADT type, either main (e.g., "CLAS") or full (e.g., "TABL/DS")
3220
+ * @param kind - ADK kind constant
3221
+ * @param constructor - Object constructor
3222
+ * @param options - Optional endpoint and name transform settings
3223
+ */
3224
+ declare function registerObjectType(adtType: string, kind: AdkKind, constructor: AdkObjectConstructor, options?: RegisterObjectTypeOptions): void;
3225
+ /**
3226
+ * Resolve ADT type to registry entry
3227
+ *
3228
+ * Tries full type first (e.g., "TABL/DS"), then falls back to main type (e.g., "TABL").
3229
+ * This allows registering subtypes with different constructors/endpoints.
3230
+ *
3231
+ * @param adtType - Full or main ADT type (e.g., "DEVC/K" or "DEVC")
3232
+ * @returns Registry entry or undefined if not found
3233
+ */
3234
+ declare function resolveType(adtType: string): RegistryEntry | undefined;
3235
+ /**
3236
+ * Resolve ADK kind to registry entry
3237
+ *
3238
+ * @param kind - ADK kind constant
3239
+ * @returns Registry entry or undefined if not found
3240
+ */
3241
+ declare function resolveKind(kind: AdkKind): RegistryEntry | undefined;
3242
+ /**
3243
+ * Get ADK kind for ADT type
3244
+ */
3245
+ declare function getKindForType(adtType: string): AdkKind | undefined;
3246
+ /**
3247
+ * Get ADT main type for ADK kind
3248
+ */
3249
+ declare function getTypeForKind(kind: AdkKind): string | undefined;
3250
+ /**
3251
+ * Check if ADT type is registered
3252
+ */
3253
+ declare function isTypeRegistered(adtType: string): boolean;
3254
+ /**
3255
+ * Get all registered ADT types
3256
+ */
3257
+ declare function getRegisteredTypes(): string[];
3258
+ /**
3259
+ * Get all registered ADK kinds
3260
+ */
3261
+ declare function getRegisteredKinds(): AdkKind[];
3262
+ /**
3263
+ * Get ADT REST endpoint for a type (e.g., 'oo/classes', 'ddic/tabletypes')
3264
+ * Checks exact type first (e.g., 'TABL/DS') before falling back to main type.
3265
+ */
3266
+ declare function getEndpointForType(adtType: string): string | undefined;
3267
+ /**
3268
+ * Build the full ADT object URI for a given type and name.
3269
+ *
3270
+ * @example
3271
+ * getObjectUri('CLAS', 'ZCL_MY_CLASS') // '/sap/bc/adt/oo/classes/zcl_my_class'
3272
+ * getObjectUri('DEVC', 'ZPACKAGE') // '/sap/bc/adt/packages/ZPACKAGE'
3273
+ * getObjectUri('TTYP', 'ZAGE_TTYP_STRTAB') // '/sap/bc/adt/ddic/tabletypes/zage_ttyp_strtab'
3274
+ */
3275
+ declare function getObjectUri(adtType: string, name: string): string | undefined;
3276
+ /**
3277
+ * Normalize an object name using type-specific rules.
3278
+ *
3279
+ * If `adtType` is provided, applies that type's normalizer only.
3280
+ * Otherwise, collects all possible normalized forms from every registered type.
3281
+ *
3282
+ * @returns Array of candidate names (always includes the original).
3283
+ *
3284
+ * @example
3285
+ * normalizeObjectName('SAPLZAGE_FUGR') // ['SAPLZAGE_FUGR', 'ZAGE_FUGR']
3286
+ * normalizeObjectName('SAPLZAGE_FUGR', 'FUGR') // ['ZAGE_FUGR']
3287
+ * normalizeObjectName('ZCLAS_TEST') // ['ZCLAS_TEST'] (no normalizer matches)
3288
+ */
3289
+ declare function normalizeObjectName(name: string, adtType?: string): string[];
3290
+ /**
3291
+ * Extract the root object URI from a full (possibly sub-resource) URI.
3292
+ *
3293
+ * SAP locks must target the object root, not sub-resources like `/source/main`.
3294
+ * This function matches against registered endpoint prefixes and strips
3295
+ * everything after the object name segment.
3296
+ *
3297
+ * @returns The root object URI, or the original URI unchanged if no endpoint matches.
3298
+ *
3299
+ * @example
3300
+ * getObjectRootUri('/sap/bc/adt/functions/groups/zage_fugr/source/main')
3301
+ * // → '/sap/bc/adt/functions/groups/zage_fugr'
3302
+ * getObjectRootUri('/sap/bc/adt/oo/classes/zcl_test/includes/testclasses')
3303
+ * // → '/sap/bc/adt/oo/classes/zcl_test'
3304
+ * getObjectRootUri('/sap/bc/adt/oo/classes/zcl_test')
3305
+ * // → '/sap/bc/adt/oo/classes/zcl_test' (already root)
3306
+ */
3307
+ declare function getObjectRootUri(uri: string): string;
3308
+ /**
3309
+ * Known ADT type to ADK kind mappings
3310
+ *
3311
+ * Repository Objects:
3312
+ * - DEVC → Package
3313
+ * - CLAS → Class
3314
+ * - INTF → Interface
3315
+ * - FUGR → FunctionGroup
3316
+ * - FUNC → FunctionModule
3317
+ * - PROG → Program
3318
+ * - INCL → Include
3319
+ *
3320
+ * Data Dictionary:
3321
+ * - TABL → Table
3322
+ * - STRU → Structure (actually TABL with different category)
3323
+ * - DTEL → DataElement
3324
+ * - DOMA → Domain
3325
+ * - TTYP → TableType
3326
+ *
3327
+ * Other:
3328
+ * - MSAG → MessageClass
3329
+ * - ENHS → EnhancementSpot
3330
+ *
3331
+ * CTS:
3332
+ * - (Transport requests/tasks use different identification)
3333
+ */
3334
+ declare const ADT_TYPE_MAPPINGS: {
3335
+ readonly DEVC: "Package";
3336
+ readonly CLAS: "Class";
3337
+ readonly INTF: "Interface";
3338
+ readonly FUGR: "FunctionGroup";
3339
+ readonly FUNC: "FunctionModule";
3340
+ readonly PROG: "Program";
3341
+ readonly INCL: "Include";
3342
+ readonly TABL: "Table";
3343
+ readonly DTEL: "DataElement";
3344
+ readonly DOMA: "Domain";
3345
+ readonly TTYP: "TableType";
3346
+ readonly MSAG: "MessageClass";
3347
+ readonly ENHS: "EnhancementSpot";
3348
+ };
3349
+ //#endregion
3350
+ export { ADT_TYPE_MAPPINGS, type AbapClass, type AbapFunctionGroup, type AbapFunctionModule, type AbapInclude, type AbapInterface, type AbapObject, type AbapPackage, type AbapProgram, type ActivationResult, AdkBadi, AdkBehaviorDefinition, AdkCdsAspect, AdkCdsType, AdkClass, AdkClassicBadiDefinition, AdkClassicBadiImplementation, type AdkContext, type AdkContract, AdkDataElement, AdkDclSource, AdkDdlExtension, AdkDdlSource, AdkDomain, AdkDynamicCache, AdkEntityBuffer, AdkExternalSchema, type AdkFactory, AdkFunctionGroup, AdkFunctionModule, AdkGenericObject, AdkInclude, AdkInterface, AdkKind, AdkMainObject, type AdkMainObjectData, AdkObject, type AdkObjectData, AdkObjectForKind, AdkObjectSet, AdkPackage, AdkPostCreateLockError, AdkProgram, AdkScalarFunctionDefinition, AdkScalarFunctionImplementation, AdkServiceBinding, AdkServiceDefinition, AdkStaticCache, AdkStructure, AdkTable, AdkTableType, AdkTransport, AdkTransportRequest as AdkTransportItem, AdkTransportRequest, AdkTransportObject, AdkTransportObjectRef, AdkTransportTask, AdkTransportTaskRef, AdkTuningIndex, type AdtClient, type AdtContracts, type AdtObjectReference, type ApplicationComponent, type AtomLink, BehaviorDefinition, type BuildTransportSourceManifestOptions, type BulkActivateOptions, type BulkSaveOptions, type BulkSaveResult, CdsAspect, CdsType, Class, type ClassCategory, type ClassInclude, type ClassIncludeType, type ClassResponse, type ClassVisibility, type ClassXml, DataElement, type DataElementResponse, type DataElementXml, DclSource, DdlExtension, DdlSource, Domain, type DomainResponse, type DomainXml, DynamicCache, EnhancementSpot, EntityBuffer, ExternalSchema, FunctionGroup, type FunctionGroupResponse, type FunctionGroupXml, FunctionModule, type FunctionModuleResponse, type FunctionModuleXml, Include, type IncludeResponse, type IncludeXml, Interface, type InterfaceResponse, type InterfaceXml, type ListObjectSourceVersionsOptions, type LockEntry, type LockHandle, type LockRegistry, type LockService, type LockStore, MergedTransportView, MessageClass, type NameTransform, type ObjectReference, ObjectSourceHistoryError, type ObjectSourceHistoryErrorCode, type ObjectSourceHistoryIdentity, type ObjectSourceVersionsComponent, type ObjectSourceVersionsResult, Package, type PackageAttributes, type PackageResponse, type PackageType, type PackageXml, Program, type ProgramResponse, type ProgramXml, type RegisterObjectTypeOptions, type ReleaseResult, type ResolvedTransportObjects, type SaveOptions, ScalarFunctionDefinition, ScalarFunctionImplementation, ServiceBinding, ServiceDefinition, type SoftwareComponent, type SourceHistoryDiagnostic, type SourceHistoryDiagnosticCode, StaticCache, Structure, Table, TableType, type TableTypeResponse, type TableTypeXml, type TableXml, type TransportConfig, type TransportCreateOptions, type TransportData, type TransportGetResponse, type TransportGetResponse as TransportResponse, type TransportLayer, type TransportObject, type TransportObjectData, type TransportObjectSelector, TransportRequest, type TransportRequestData, type TransportSourceChangeKind, type TransportSourceDiagnostic, type TransportSourceManifest, type TransportSourceManifestComponent, type TransportSourceManifestEntry, type TransportSourceManifestObject, type TransportSourceVersionSelection, type TransportStatus, TransportTask, type TransportTaskData, type TransportType, type TransportUpdateOptions, TuningIndex, buildTransportSourceManifest, clearConfigCache, createAdk, createAdkContract, createAdkFactory, createLockService, getEndpointForType, getGlobalContext, getKindForType, getMainType, getObjectRootUri, getObjectUri, getRegisteredKinds, getRegisteredTypes, getTypeForKind, initializeAdk, isAdkInitialized, isTypeRegistered, listObjectSourceVersions, matchesSelector, normalizeObjectName, parseAdtType, parseXmlIdentity, registerObjectType, resetAdk, resolveKind, resolveTransportObjects, resolveType, selectTransportSourceVersions, tryGetGlobalContext };
3351
+ //# sourceMappingURL=index.d.mts.map