@mcp-abap-adt/interfaces 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/README.md +0 -1
- package/dist/adt/IAdtObjectState.d.ts +11 -11
- package/dist/adt/IAdtObjectState.d.ts.map +1 -1
- package/dist/connection/IAbapConnection.d.ts +16 -4
- package/dist/connection/IAbapConnection.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/token/ITokenProvider.d.ts +1 -3
- package/dist/token/ITokenProvider.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,10 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.13] - 2025-12-24
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- `IAdtResponse.headers` now allows ADT-specific header keys such as `location` and `sap-adt-location`.
|
|
14
|
+
|
|
15
|
+
## [0.2.12] - 2025-12-24
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- `IAbapConnection` now uses `IAdtResponse<T, D>` (custom response type, no axios dependency).
|
|
19
|
+
- `makeAdtRequest` is generic and returns `IAdtResponse<T, D>`.
|
|
20
|
+
|
|
10
21
|
## [0.2.11] - 2025-12-24
|
|
11
22
|
|
|
12
23
|
### Changed
|
|
13
|
-
- `IAbapConnection.AxiosResponse` now aliases `axios` `AxiosResponse`
|
|
24
|
+
- `IAbapConnection.AxiosResponse` now aliases `axios` `AxiosResponse` with generics preserved.
|
|
25
|
+
- `makeAdtRequest` is generic and returns `AxiosResponse<T, D>`.
|
|
14
26
|
- `axios` is now required for typing (moved from dev-only usage).
|
|
15
27
|
|
|
16
28
|
## [0.2.10] - 2025-12-24
|
package/README.md
CHANGED
|
@@ -214,7 +214,6 @@ This package is responsible for:
|
|
|
214
214
|
This package has **no runtime dependencies**. It only has devDependencies for TypeScript compilation:
|
|
215
215
|
- `typescript` - TypeScript compiler
|
|
216
216
|
- `@types/node` - Node.js type definitions
|
|
217
|
-
- `axios` - For AxiosResponse type
|
|
218
217
|
|
|
219
218
|
## Documentation
|
|
220
219
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* All specific state types (DomainBuilderState, DataElementBuilderState, etc.)
|
|
5
5
|
* should extend this interface to ensure consistency across all ADT object types.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { IAdtResponse } from '../connection/IAbapConnection';
|
|
8
8
|
/**
|
|
9
9
|
* Base state that all ADT Object state types should extend
|
|
10
10
|
*
|
|
@@ -22,27 +22,27 @@ import type { AxiosResponse } from 'axios';
|
|
|
22
22
|
*/
|
|
23
23
|
export interface IAdtObjectState {
|
|
24
24
|
/** Validation response from validate() method */
|
|
25
|
-
validationResponse?:
|
|
25
|
+
validationResponse?: IAdtResponse;
|
|
26
26
|
/** Create operation response from create() method */
|
|
27
|
-
createResult?:
|
|
27
|
+
createResult?: IAdtResponse;
|
|
28
28
|
/** Lock handle obtained from lock operations */
|
|
29
29
|
lockHandle?: string;
|
|
30
30
|
/** Update operation response from update() method */
|
|
31
|
-
updateResult?:
|
|
31
|
+
updateResult?: IAdtResponse;
|
|
32
32
|
/** Check operation response from check() method */
|
|
33
|
-
checkResult?:
|
|
33
|
+
checkResult?: IAdtResponse;
|
|
34
34
|
/** Unlock operation response from unlock operations */
|
|
35
|
-
unlockResult?:
|
|
35
|
+
unlockResult?: IAdtResponse;
|
|
36
36
|
/** Activate operation response from activate() method */
|
|
37
|
-
activateResult?:
|
|
37
|
+
activateResult?: IAdtResponse;
|
|
38
38
|
/** Delete operation response from delete() method */
|
|
39
|
-
deleteResult?:
|
|
39
|
+
deleteResult?: IAdtResponse;
|
|
40
40
|
/** Read operation response from read() method (source code or XML) */
|
|
41
|
-
readResult?:
|
|
41
|
+
readResult?: IAdtResponse;
|
|
42
42
|
/** Metadata read result from readMetadata() method (object characteristics: package, responsible, description, etc.) */
|
|
43
|
-
metadataResult?:
|
|
43
|
+
metadataResult?: IAdtResponse;
|
|
44
44
|
/** Transport request read result from readTransport() method */
|
|
45
|
-
transportResult?:
|
|
45
|
+
transportResult?: IAdtResponse;
|
|
46
46
|
/** Array of errors that occurred during operations */
|
|
47
47
|
errors: Array<{
|
|
48
48
|
method: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdtObjectState.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtObjectState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"IAdtObjectState.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtObjectState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAClC,qDAAqD;IACrD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,mDAAmD;IACnD,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,uDAAuD;IACvD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,yDAAyD;IACzD,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,qDAAqD;IACrD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,sEAAsE;IACtE,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,wHAAwH;IACxH,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,gEAAgE;IAChE,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,sDAAsD;IACtD,MAAM,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CAClE;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import type { AxiosResponse as AxiosResponseType } from 'axios';
|
|
2
1
|
import type { IAbapRequestOptions } from './IAbapRequestOptions';
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
3
|
+
* Minimal response type for ADT requests.
|
|
5
4
|
*/
|
|
6
|
-
export
|
|
5
|
+
export interface IAdtResponse<T = any, D = any> {
|
|
6
|
+
data: T;
|
|
7
|
+
status: number;
|
|
8
|
+
statusText: string;
|
|
9
|
+
headers: Record<string, string | string[] | undefined> & {
|
|
10
|
+
location?: string;
|
|
11
|
+
Location?: string;
|
|
12
|
+
'content-location'?: string | string[];
|
|
13
|
+
'Content-Location'?: string | string[];
|
|
14
|
+
'sap-adt-location'?: string | string[];
|
|
15
|
+
};
|
|
16
|
+
config?: D;
|
|
17
|
+
request?: unknown;
|
|
18
|
+
}
|
|
7
19
|
/**
|
|
8
20
|
* ABAP Connection interface
|
|
9
21
|
*
|
|
@@ -38,6 +50,6 @@ export interface IAbapConnection {
|
|
|
38
50
|
* @param options - Request options (url, method, data, etc.)
|
|
39
51
|
* @returns Promise with Axios response
|
|
40
52
|
*/
|
|
41
|
-
makeAdtRequest(options: IAbapRequestOptions): Promise<
|
|
53
|
+
makeAdtRequest<T = any, D = any>(options: IAbapRequestOptions): Promise<IAdtResponse<T, D>>;
|
|
42
54
|
}
|
|
43
55
|
//# sourceMappingURL=IAbapConnection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/IAbapConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"IAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/IAbapConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG;IAC5C,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG;QACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACvC,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACvC,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACxC,CAAC;IACF,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9B;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAAC;IAErD;;;;;;;;;;OAUG;IACH,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAC7B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAChC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type { AuthType as AuthTypeEnum } from './auth/AuthType';
|
|
|
11
11
|
export type { IAuthorizationConfig } from './auth/IAuthorizationConfig';
|
|
12
12
|
export type { IConfig } from './auth/IConfig';
|
|
13
13
|
export type { IConnectionConfig } from './auth/IConnectionConfig';
|
|
14
|
-
export type { IAbapConnection } from './connection/IAbapConnection';
|
|
14
|
+
export type { IAbapConnection, IAdtResponse, } from './connection/IAbapConnection';
|
|
15
15
|
export type { IAbapRequestOptions } from './connection/IAbapRequestOptions';
|
|
16
16
|
export type { NetworkErrorCode } from './connection/NetworkErrors';
|
|
17
17
|
export { isNetworkError, NETWORK_ERROR_CODES, } from './connection/NetworkErrors';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC/E,YAAY,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEhE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,UAA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B,EAC5B,iCAAiC,EACjC,4BAA4B,EAC5B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,YAAY,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAEpF,YAAY,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
* Stateful providers that manage token lifecycle internally.
|
|
5
5
|
* The provider validates, refreshes, or re-authenticates as needed.
|
|
6
6
|
*/
|
|
7
|
-
import type { IAuthorizationConfig } from '../auth/IAuthorizationConfig';
|
|
8
|
-
import type { ITokenProviderOptions } from './ITokenProviderOptions';
|
|
9
7
|
import type { ITokenResult } from './ITokenResult';
|
|
10
8
|
/**
|
|
11
9
|
* Interface for token providers (stateful)
|
|
@@ -17,7 +15,7 @@ export interface ITokenProvider {
|
|
|
17
15
|
* Stateful providers cache tokens internally and handle refresh automatically.
|
|
18
16
|
* Checks token expiration, refreshes if needed, or triggers login.
|
|
19
17
|
*/
|
|
20
|
-
getTokens(
|
|
18
|
+
getTokens(): Promise<ITokenResult>;
|
|
21
19
|
/**
|
|
22
20
|
* Validate JWT token locally (optional)
|
|
23
21
|
* @param token JWT token to validate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITokenProvider.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ITokenProvider.d.ts","sourceRoot":"","sources":["../../src/token/ITokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAEnC;;;;;OAKG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtE"}
|