@abapify/adt-server-client 0.0.0 → 0.4.5
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/dist/index.d.mts +430 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +215 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +32 -1
- package/README.md +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
//#region src/generated.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* GENERATED FROM @abapify/adt-server's OpenAPI document.
|
|
4
|
+
* Run `bun run --filter @abapify/adt-server-client generate`; do not edit manually.
|
|
5
|
+
*/
|
|
6
|
+
interface AdtServerClientOptions {
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
fetch?: typeof globalThis.fetch;
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
interface AdtServerRequestOptions {
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
}
|
|
14
|
+
declare class AdtServerHttpError extends Error {
|
|
15
|
+
readonly status: number;
|
|
16
|
+
readonly body: unknown;
|
|
17
|
+
constructor(status: number, body: unknown);
|
|
18
|
+
}
|
|
19
|
+
type BuildTransportSourceManifestParams = {
|
|
20
|
+
destination: string;
|
|
21
|
+
body: {
|
|
22
|
+
transports: Array<string>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
type BuildTransportSourceManifestResponse = {
|
|
26
|
+
requestedTransports: Array<string>;
|
|
27
|
+
scopeTransports: Array<string>;
|
|
28
|
+
entries: Array<{
|
|
29
|
+
object: {
|
|
30
|
+
pgmid: string;
|
|
31
|
+
type: string;
|
|
32
|
+
name: string;
|
|
33
|
+
packageName?: string;
|
|
34
|
+
};
|
|
35
|
+
component: {
|
|
36
|
+
id: string;
|
|
37
|
+
};
|
|
38
|
+
sourceTransport: string;
|
|
39
|
+
changeKind: 'added' | 'modified' | 'deleted' | 'unchanged' | 'ambiguous' | 'unsupported' | 'failed';
|
|
40
|
+
exact: boolean;
|
|
41
|
+
base?: {
|
|
42
|
+
id: string;
|
|
43
|
+
ordinal: number;
|
|
44
|
+
title?: string;
|
|
45
|
+
contentType?: string;
|
|
46
|
+
etag?: string;
|
|
47
|
+
updatedAt?: string;
|
|
48
|
+
author?: string;
|
|
49
|
+
transports: Array<string>;
|
|
50
|
+
sourceCapability: string;
|
|
51
|
+
};
|
|
52
|
+
head?: {
|
|
53
|
+
id: string;
|
|
54
|
+
ordinal: number;
|
|
55
|
+
title?: string;
|
|
56
|
+
contentType?: string;
|
|
57
|
+
etag?: string;
|
|
58
|
+
updatedAt?: string;
|
|
59
|
+
author?: string;
|
|
60
|
+
transports: Array<string>;
|
|
61
|
+
sourceCapability: string;
|
|
62
|
+
};
|
|
63
|
+
diagnostic?: {
|
|
64
|
+
code: string;
|
|
65
|
+
message: string;
|
|
66
|
+
};
|
|
67
|
+
}>;
|
|
68
|
+
};
|
|
69
|
+
type GetBadiParams = {
|
|
70
|
+
destination: string;
|
|
71
|
+
name: string;
|
|
72
|
+
implementations?: boolean;
|
|
73
|
+
};
|
|
74
|
+
type GetBadiResponse = {
|
|
75
|
+
kind: 'definition' | 'implementation' | 'enhancement';
|
|
76
|
+
name: string;
|
|
77
|
+
type: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
language?: string;
|
|
80
|
+
version?: string;
|
|
81
|
+
packageName?: string;
|
|
82
|
+
packageUri?: string;
|
|
83
|
+
responsible?: string;
|
|
84
|
+
masterLanguage?: string;
|
|
85
|
+
masterSystem?: string;
|
|
86
|
+
implementations?: Array<{
|
|
87
|
+
kind: 'implementation';
|
|
88
|
+
name: string;
|
|
89
|
+
type: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
language?: string;
|
|
92
|
+
version?: string;
|
|
93
|
+
packageName?: string;
|
|
94
|
+
packageUri?: string;
|
|
95
|
+
responsible?: string;
|
|
96
|
+
masterLanguage?: string;
|
|
97
|
+
masterSystem?: string;
|
|
98
|
+
}>;
|
|
99
|
+
};
|
|
100
|
+
type GetObjectMetadataParams = {
|
|
101
|
+
destination: string;
|
|
102
|
+
type: string;
|
|
103
|
+
name: string;
|
|
104
|
+
};
|
|
105
|
+
type GetObjectMetadataResponse = {
|
|
106
|
+
object: {
|
|
107
|
+
canonicalKey: string;
|
|
108
|
+
objectType: string;
|
|
109
|
+
objectName: string;
|
|
110
|
+
pgmid?: string;
|
|
111
|
+
objInfo?: string;
|
|
112
|
+
objDesc?: string;
|
|
113
|
+
lockStatus?: string;
|
|
114
|
+
packageName?: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
};
|
|
117
|
+
metadata: {
|
|
118
|
+
adtObjectType?: string;
|
|
119
|
+
description?: string;
|
|
120
|
+
packageName?: string;
|
|
121
|
+
};
|
|
122
|
+
facets: Array<{
|
|
123
|
+
facet?: string;
|
|
124
|
+
name?: string;
|
|
125
|
+
displayName?: string;
|
|
126
|
+
text?: string;
|
|
127
|
+
version?: string;
|
|
128
|
+
hasChildrenOfSameFacet?: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
capabilities: Array<{
|
|
131
|
+
relation: string;
|
|
132
|
+
capability: 'source' | 'versions' | 'structure' | 'text_elements' | 'enhancement_implementations' | 'enhancement_options' | 'syntax';
|
|
133
|
+
title?: string;
|
|
134
|
+
mediaType?: string;
|
|
135
|
+
etag?: string;
|
|
136
|
+
}>;
|
|
137
|
+
};
|
|
138
|
+
type GetObjectSourceHistoryParams = {
|
|
139
|
+
destination: string;
|
|
140
|
+
type: string;
|
|
141
|
+
name: string;
|
|
142
|
+
};
|
|
143
|
+
type GetObjectSourceHistoryResponse = {
|
|
144
|
+
available: boolean;
|
|
145
|
+
versions: Array<{
|
|
146
|
+
id: string;
|
|
147
|
+
ordinal: number;
|
|
148
|
+
title?: string;
|
|
149
|
+
contentType?: string;
|
|
150
|
+
etag?: string;
|
|
151
|
+
updatedAt?: string;
|
|
152
|
+
author?: string;
|
|
153
|
+
transports: Array<string>;
|
|
154
|
+
}>;
|
|
155
|
+
};
|
|
156
|
+
type GetPackageTreeParams = {
|
|
157
|
+
destination: string;
|
|
158
|
+
root: string;
|
|
159
|
+
limit?: number;
|
|
160
|
+
cursor?: string;
|
|
161
|
+
};
|
|
162
|
+
type GetPackageTreeResponse = {
|
|
163
|
+
data: Array<{
|
|
164
|
+
name: string;
|
|
165
|
+
parent?: string;
|
|
166
|
+
description?: string;
|
|
167
|
+
}>;
|
|
168
|
+
nextCursor: string | null;
|
|
169
|
+
truncated: boolean;
|
|
170
|
+
observedAt: string;
|
|
171
|
+
};
|
|
172
|
+
type GetTransportDetailParams = {
|
|
173
|
+
destination: string;
|
|
174
|
+
transport: string;
|
|
175
|
+
};
|
|
176
|
+
type GetTransportDetailResponse = {
|
|
177
|
+
trkorr: string;
|
|
178
|
+
owner: string;
|
|
179
|
+
description: string;
|
|
180
|
+
status: string;
|
|
181
|
+
statusRaw?: string;
|
|
182
|
+
trFunction?: string;
|
|
183
|
+
target?: string;
|
|
184
|
+
client?: string;
|
|
185
|
+
changedAt?: string;
|
|
186
|
+
tasks: Array<{
|
|
187
|
+
trkorr: string;
|
|
188
|
+
owner: string;
|
|
189
|
+
description: string;
|
|
190
|
+
status: string;
|
|
191
|
+
statusRaw?: string;
|
|
192
|
+
trFunction?: string;
|
|
193
|
+
target?: string;
|
|
194
|
+
client?: string;
|
|
195
|
+
changedAt?: string;
|
|
196
|
+
parentTrkorr: string;
|
|
197
|
+
objects: Array<{
|
|
198
|
+
canonicalKey: string;
|
|
199
|
+
objectType: string;
|
|
200
|
+
objectName: string;
|
|
201
|
+
pgmid?: string;
|
|
202
|
+
objInfo?: string;
|
|
203
|
+
objDesc?: string;
|
|
204
|
+
lockStatus?: string;
|
|
205
|
+
}>;
|
|
206
|
+
}>;
|
|
207
|
+
objects: Array<{
|
|
208
|
+
canonicalKey: string;
|
|
209
|
+
objectType: string;
|
|
210
|
+
objectName: string;
|
|
211
|
+
pgmid?: string;
|
|
212
|
+
objInfo?: string;
|
|
213
|
+
objDesc?: string;
|
|
214
|
+
lockStatus?: string;
|
|
215
|
+
}>;
|
|
216
|
+
};
|
|
217
|
+
type ListDestinationsParams = Record<string, never>;
|
|
218
|
+
type ListDestinationsResponse = {
|
|
219
|
+
data: Array<{
|
|
220
|
+
key: string;
|
|
221
|
+
displayName: string;
|
|
222
|
+
systemSids: Array<string>;
|
|
223
|
+
authConfigured: boolean;
|
|
224
|
+
version: number;
|
|
225
|
+
}>;
|
|
226
|
+
};
|
|
227
|
+
type ListPackageObjectsParams = {
|
|
228
|
+
destination: string;
|
|
229
|
+
package: string;
|
|
230
|
+
limit?: number;
|
|
231
|
+
cursor?: string;
|
|
232
|
+
};
|
|
233
|
+
type ListPackageObjectsResponse = {
|
|
234
|
+
data: Array<{
|
|
235
|
+
canonicalKey: string;
|
|
236
|
+
objectType: string;
|
|
237
|
+
objectName: string;
|
|
238
|
+
pgmid?: string;
|
|
239
|
+
objInfo?: string;
|
|
240
|
+
objDesc?: string;
|
|
241
|
+
lockStatus?: string;
|
|
242
|
+
packageName?: string;
|
|
243
|
+
description?: string;
|
|
244
|
+
}>;
|
|
245
|
+
nextCursor: string | null;
|
|
246
|
+
truncated: boolean;
|
|
247
|
+
observedAt: string;
|
|
248
|
+
};
|
|
249
|
+
type ListTransportObjectsParams = {
|
|
250
|
+
destination: string;
|
|
251
|
+
transport: string;
|
|
252
|
+
};
|
|
253
|
+
type ListTransportObjectsResponse = Array<{
|
|
254
|
+
canonicalKey: string;
|
|
255
|
+
objectType: string;
|
|
256
|
+
objectName: string;
|
|
257
|
+
pgmid?: string;
|
|
258
|
+
objInfo?: string;
|
|
259
|
+
objDesc?: string;
|
|
260
|
+
lockStatus?: string;
|
|
261
|
+
}>;
|
|
262
|
+
type ListTransportsParams = {
|
|
263
|
+
destination: string;
|
|
264
|
+
owner?: string;
|
|
265
|
+
type?: string;
|
|
266
|
+
status?: string;
|
|
267
|
+
target?: string;
|
|
268
|
+
dateFrom?: string;
|
|
269
|
+
dateTo?: string;
|
|
270
|
+
text?: string;
|
|
271
|
+
includeTasks?: 'true' | 'false';
|
|
272
|
+
};
|
|
273
|
+
type ListTransportsResponse = Array<{
|
|
274
|
+
trkorr: string;
|
|
275
|
+
owner: string;
|
|
276
|
+
description: string;
|
|
277
|
+
status: string;
|
|
278
|
+
statusRaw?: string;
|
|
279
|
+
trFunction?: string;
|
|
280
|
+
target?: string;
|
|
281
|
+
client?: string;
|
|
282
|
+
changedAt?: string;
|
|
283
|
+
}>;
|
|
284
|
+
type ReadAtcFindingDocumentationParams = {
|
|
285
|
+
destination: string;
|
|
286
|
+
body: {
|
|
287
|
+
documentationCapability: string;
|
|
288
|
+
maxBytes?: number;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
type ReadAtcFindingDocumentationResponse = {
|
|
292
|
+
bytes: number;
|
|
293
|
+
html: string;
|
|
294
|
+
};
|
|
295
|
+
type ReadObjectSourceParams = {
|
|
296
|
+
destination: string;
|
|
297
|
+
type: string;
|
|
298
|
+
name: string;
|
|
299
|
+
body: {
|
|
300
|
+
version?: string;
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
type ReadObjectSourceResponse = {
|
|
304
|
+
bytes: number;
|
|
305
|
+
source: string;
|
|
306
|
+
};
|
|
307
|
+
type ReadSourceVersionParams = {
|
|
308
|
+
destination: string;
|
|
309
|
+
body: {
|
|
310
|
+
sourceCapability: string;
|
|
311
|
+
maxBytes: number;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
type ReadSourceVersionResponse = {
|
|
315
|
+
bytes: number;
|
|
316
|
+
source: string;
|
|
317
|
+
};
|
|
318
|
+
type RunAtcParams = {
|
|
319
|
+
destination: string;
|
|
320
|
+
body: {
|
|
321
|
+
scope: {
|
|
322
|
+
kind: 'package';
|
|
323
|
+
packageName: string;
|
|
324
|
+
} | {
|
|
325
|
+
kind: 'transport_request';
|
|
326
|
+
trkorr: string;
|
|
327
|
+
} | {
|
|
328
|
+
kind: 'objects';
|
|
329
|
+
objects: Array<{
|
|
330
|
+
objectType: string;
|
|
331
|
+
objectName: string;
|
|
332
|
+
}>;
|
|
333
|
+
};
|
|
334
|
+
variant?: string;
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
type RunAtcResponse = {
|
|
338
|
+
checkVariant: string;
|
|
339
|
+
findings: Array<{
|
|
340
|
+
checkId: string;
|
|
341
|
+
checkTitle: string;
|
|
342
|
+
messageText: string;
|
|
343
|
+
priority: number;
|
|
344
|
+
objectType: string;
|
|
345
|
+
objectName: string;
|
|
346
|
+
lineStart?: number;
|
|
347
|
+
lineEnd?: number;
|
|
348
|
+
messageId?: string;
|
|
349
|
+
packageName?: string;
|
|
350
|
+
objectDescription?: string;
|
|
351
|
+
contactPerson?: string;
|
|
352
|
+
processor?: string;
|
|
353
|
+
lastChangedBy?: string;
|
|
354
|
+
exemptionKind?: string;
|
|
355
|
+
exemptionApproval?: string;
|
|
356
|
+
noExemption?: boolean;
|
|
357
|
+
quickfixInfo?: string;
|
|
358
|
+
quickfixes?: {
|
|
359
|
+
manual?: boolean;
|
|
360
|
+
automatic?: boolean;
|
|
361
|
+
pseudo?: boolean;
|
|
362
|
+
};
|
|
363
|
+
checksum?: string;
|
|
364
|
+
documentationCapability?: string;
|
|
365
|
+
}>;
|
|
366
|
+
};
|
|
367
|
+
type SearchObjectsParams = {
|
|
368
|
+
destination: string;
|
|
369
|
+
query?: string;
|
|
370
|
+
packageName?: string;
|
|
371
|
+
objectType?: string;
|
|
372
|
+
maxResults?: number;
|
|
373
|
+
limit?: number;
|
|
374
|
+
cursor?: string;
|
|
375
|
+
};
|
|
376
|
+
type SearchObjectsResponse = {
|
|
377
|
+
data: Array<{
|
|
378
|
+
canonicalKey: string;
|
|
379
|
+
objectType: string;
|
|
380
|
+
objectName: string;
|
|
381
|
+
pgmid?: string;
|
|
382
|
+
objInfo?: string;
|
|
383
|
+
objDesc?: string;
|
|
384
|
+
lockStatus?: string;
|
|
385
|
+
packageName?: string;
|
|
386
|
+
description?: string;
|
|
387
|
+
}>;
|
|
388
|
+
nextCursor: string | null;
|
|
389
|
+
truncated: boolean;
|
|
390
|
+
observedAt: string;
|
|
391
|
+
};
|
|
392
|
+
type SearchPackagesParams = {
|
|
393
|
+
destination: string;
|
|
394
|
+
q?: string;
|
|
395
|
+
maxResults?: number;
|
|
396
|
+
limit?: number;
|
|
397
|
+
cursor?: string;
|
|
398
|
+
};
|
|
399
|
+
type SearchPackagesResponse = {
|
|
400
|
+
data: Array<{
|
|
401
|
+
name: string;
|
|
402
|
+
parent?: string;
|
|
403
|
+
description?: string;
|
|
404
|
+
}>;
|
|
405
|
+
nextCursor: string | null;
|
|
406
|
+
truncated: boolean;
|
|
407
|
+
observedAt: string;
|
|
408
|
+
};
|
|
409
|
+
declare function createAdtServerClient(options: AdtServerClientOptions): {
|
|
410
|
+
buildTransportSourceManifest: (params: BuildTransportSourceManifestParams, requestOptions?: AdtServerRequestOptions) => Promise<BuildTransportSourceManifestResponse>;
|
|
411
|
+
getBadi: (params: GetBadiParams, requestOptions?: AdtServerRequestOptions) => Promise<GetBadiResponse>;
|
|
412
|
+
getObjectMetadata: (params: GetObjectMetadataParams, requestOptions?: AdtServerRequestOptions) => Promise<GetObjectMetadataResponse>;
|
|
413
|
+
getObjectSourceHistory: (params: GetObjectSourceHistoryParams, requestOptions?: AdtServerRequestOptions) => Promise<GetObjectSourceHistoryResponse>;
|
|
414
|
+
getPackageTree: (params: GetPackageTreeParams, requestOptions?: AdtServerRequestOptions) => Promise<GetPackageTreeResponse>;
|
|
415
|
+
getTransportDetail: (params: GetTransportDetailParams, requestOptions?: AdtServerRequestOptions) => Promise<GetTransportDetailResponse>;
|
|
416
|
+
listDestinations: (requestOptions?: AdtServerRequestOptions) => Promise<ListDestinationsResponse>;
|
|
417
|
+
listPackageObjects: (params: ListPackageObjectsParams, requestOptions?: AdtServerRequestOptions) => Promise<ListPackageObjectsResponse>;
|
|
418
|
+
listTransportObjects: (params: ListTransportObjectsParams, requestOptions?: AdtServerRequestOptions) => Promise<ListTransportObjectsResponse>;
|
|
419
|
+
listTransports: (params: ListTransportsParams, requestOptions?: AdtServerRequestOptions) => Promise<ListTransportsResponse>;
|
|
420
|
+
readAtcFindingDocumentation: (params: ReadAtcFindingDocumentationParams, requestOptions?: AdtServerRequestOptions) => Promise<ReadAtcFindingDocumentationResponse>;
|
|
421
|
+
readObjectSource: (params: ReadObjectSourceParams, requestOptions?: AdtServerRequestOptions) => Promise<ReadObjectSourceResponse>;
|
|
422
|
+
readSourceVersion: (params: ReadSourceVersionParams, requestOptions?: AdtServerRequestOptions) => Promise<ReadSourceVersionResponse>;
|
|
423
|
+
runAtc: (params: RunAtcParams, requestOptions?: AdtServerRequestOptions) => Promise<RunAtcResponse>;
|
|
424
|
+
searchObjects: (params: SearchObjectsParams, requestOptions?: AdtServerRequestOptions) => Promise<SearchObjectsResponse>;
|
|
425
|
+
searchPackages: (params: SearchPackagesParams, requestOptions?: AdtServerRequestOptions) => Promise<SearchPackagesResponse>;
|
|
426
|
+
};
|
|
427
|
+
type AdtServerClient = ReturnType<typeof createAdtServerClient>;
|
|
428
|
+
//#endregion
|
|
429
|
+
export { AdtServerClient, AdtServerClientOptions, AdtServerHttpError, AdtServerRequestOptions, BuildTransportSourceManifestParams, BuildTransportSourceManifestResponse, GetBadiParams, GetBadiResponse, GetObjectMetadataParams, GetObjectMetadataResponse, GetObjectSourceHistoryParams, GetObjectSourceHistoryResponse, GetPackageTreeParams, GetPackageTreeResponse, GetTransportDetailParams, GetTransportDetailResponse, ListDestinationsParams, ListDestinationsResponse, ListPackageObjectsParams, ListPackageObjectsResponse, ListTransportObjectsParams, ListTransportObjectsResponse, ListTransportsParams, ListTransportsResponse, ReadAtcFindingDocumentationParams, ReadAtcFindingDocumentationResponse, ReadObjectSourceParams, ReadObjectSourceResponse, ReadSourceVersionParams, ReadSourceVersionResponse, RunAtcParams, RunAtcResponse, SearchObjectsParams, SearchObjectsResponse, SearchPackagesParams, SearchPackagesResponse, createAdtServerClient };
|
|
430
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/generated.ts"],"mappings":";;;;;UAKiB;EACf;EACA,eAAe,WAAW;EAC1B,UAAU;;UAGK;EACf,SAAS;;cAGE,2BAA2B;WAE3B;WACA;EADA,YAAA,gBACA;;KAiJD;EACV;EACA;IAAQ,YAAY;;;KAEV;EACV,qBAAqB;EACrB,iBAAiB;EACjB,SAAS;IACP;MAAU;MAAe;MAAc;MAAc;;IACrD;MAAa;;IACb;IACA;IAQA;IACA;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA,YAAY;MACZ;;IAEF;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA,YAAY;MACZ;;IAEF;MAAe;MAAc;;;;KAGrB;EACV;EACA;EACA;;KAEU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAkB;IAChB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;KAGQ;EACV;EACA;EACA;;KAEU;EACV;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;;EAEF,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;;EAEF,cAAc;IACZ;IACA;IAQA;IACA;IACA;;;KAGQ;EACV;EACA;EACA;;KAEU;EACV;EACA,UAAU;IACR;IACA;IACA;IACA;IACA;IACA;IACA;IACA,YAAY;;;KAGJ;EACV;EACA;EACA;EACA;;KAEU;EACV,MAAM;IAAQ;IAAc;IAAiB;;EAC7C;EACA;EACA;;KAEU;EACV;EACA;;KAEU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAAS;MACP;MACA;MACA;MACA;MACA;MACA;MACA;;;EAGJ,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;;;KAGQ,yBAAyB;KACzB;EACV,MAAM;IACJ;IACA;IACA,YAAY;IACZ;IACA;;;KAGQ;EACV;EACA;EACA;EACA;;KAEU;EACV,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;EACA;EACA;;KAEU;EACV;EACA;;KAEU,+BAA+B;EACzC;EACA;EACA;EACA;EACA;EACA;EACA;;KAEU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAEU,yBAAyB;EACnC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAEU;EACV;EACA;IAAQ;IAAiC;;;KAE/B;EACV;EACA;;KAEU;EACV;EACA;EACA;EACA;IAAQ;;;KAEE;EAA6B;EAAe;;KAC5C;EACV;EACA;IAAQ;IAA0B;;;KAExB;EAA8B;EAAe;;KAC7C;EACV;EACA;IACE;MACM;MAAiB;;MACjB;MAA2B;;MAE3B;MACA,SAAS;QAAQ;QAAoB;;;IAE3C;;;KAGQ;EACV;EACA,UAAU;IACR;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MAAe;MAAkB;MAAqB;;IACtD;IACA;;;KAGQ;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;KAEU;EACV,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;EACA;EACA;;KAEU;EACV;EACA;EACA;EACA;EACA;;KAEU;EACV,MAAM;IAAQ;IAAc;IAAiB;;EAC7C;EACA;EACA;;iBAOc,sBAAsB,SAAS;EA2CjC,+BAAA,QAAA,oCAAkC,iBACzB,4BAAuB,QAAA;EAQhC,UAAA,QAAA,eAAa,iBACJ,4BAAuB,QAAA;EAQhC,oBAAA,QAAA,yBAAuB,iBACd,4BAAuB,QAAA;EAQhC,yBAAA,QAAA,8BAA4B,iBACnB,4BAAuB,QAAA;EAQhC,iBAAA,QAAA,sBAAoB,iBACX,4BAAuB,QAAA;EAQhC,qBAAA,QAAA,0BAAwB,iBACf,4BAAuB,QAAA;EAON,mBAAA,iBAAA,4BAAuB,QAAA;EAOjD,qBAAA,QAAA,0BAAwB,iBACf,4BAAuB,QAAA;EAQhC,uBAAA,QAAA,4BAA0B,iBACjB,4BAAuB,QAAA;EAQhC,iBAAA,QAAA,sBAAoB,iBACX,4BAAuB,QAAA;EAQhC,8BAAA,QAAA,mCAAiC,iBACxB,4BAAuB,QAAA;EAQhC,mBAAA,QAAA,wBAAsB,iBACb,4BAAuB,QAAA;EAQhC,oBAAA,QAAA,yBAAuB,iBACd,4BAAuB,QAAA;EAOzB,SAAA,QAAA,cAAY,iBAAmB,4BAAuB,QAAA;EAO7D,gBAAA,QAAA,qBAAmB,iBACV,4BAAuB,QAAA;EAQhC,iBAAA,QAAA,sBAAoB,iBACX,4BAAuB,QAAA;;KAUlC,kBAAkB,kBAAkB"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
//#region src/generated.ts
|
|
2
|
+
var AdtServerHttpError = class extends Error {
|
|
3
|
+
status;
|
|
4
|
+
body;
|
|
5
|
+
constructor(status, body) {
|
|
6
|
+
super(`ADT Server request failed (${status})`);
|
|
7
|
+
this.status = status;
|
|
8
|
+
this.body = body;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const operationDefinitions = {
|
|
12
|
+
buildTransportSourceManifest: {
|
|
13
|
+
method: "POST",
|
|
14
|
+
path: "/v1/destinations/{destination}/transport-source-manifests",
|
|
15
|
+
pathParameters: ["destination"],
|
|
16
|
+
queryParameters: [],
|
|
17
|
+
hasBody: true
|
|
18
|
+
},
|
|
19
|
+
getBadi: {
|
|
20
|
+
method: "GET",
|
|
21
|
+
path: "/v1/destinations/{destination}/badi/{name}",
|
|
22
|
+
pathParameters: ["destination", "name"],
|
|
23
|
+
queryParameters: ["implementations"],
|
|
24
|
+
hasBody: false
|
|
25
|
+
},
|
|
26
|
+
getObjectMetadata: {
|
|
27
|
+
method: "GET",
|
|
28
|
+
path: "/v1/destinations/{destination}/objects/{type}/{name}",
|
|
29
|
+
pathParameters: [
|
|
30
|
+
"destination",
|
|
31
|
+
"type",
|
|
32
|
+
"name"
|
|
33
|
+
],
|
|
34
|
+
queryParameters: [],
|
|
35
|
+
hasBody: false
|
|
36
|
+
},
|
|
37
|
+
getObjectSourceHistory: {
|
|
38
|
+
method: "GET",
|
|
39
|
+
path: "/v1/destinations/{destination}/objects/{type}/{name}/source-history",
|
|
40
|
+
pathParameters: [
|
|
41
|
+
"destination",
|
|
42
|
+
"type",
|
|
43
|
+
"name"
|
|
44
|
+
],
|
|
45
|
+
queryParameters: [],
|
|
46
|
+
hasBody: false
|
|
47
|
+
},
|
|
48
|
+
getPackageTree: {
|
|
49
|
+
method: "GET",
|
|
50
|
+
path: "/v1/destinations/{destination}/packages/tree",
|
|
51
|
+
pathParameters: ["destination"],
|
|
52
|
+
queryParameters: [
|
|
53
|
+
"root",
|
|
54
|
+
"limit",
|
|
55
|
+
"cursor"
|
|
56
|
+
],
|
|
57
|
+
hasBody: false
|
|
58
|
+
},
|
|
59
|
+
getTransportDetail: {
|
|
60
|
+
method: "GET",
|
|
61
|
+
path: "/v1/destinations/{destination}/transports/{transport}",
|
|
62
|
+
pathParameters: ["destination", "transport"],
|
|
63
|
+
queryParameters: [],
|
|
64
|
+
hasBody: false
|
|
65
|
+
},
|
|
66
|
+
listDestinations: {
|
|
67
|
+
method: "GET",
|
|
68
|
+
path: "/v1/destinations",
|
|
69
|
+
pathParameters: [],
|
|
70
|
+
queryParameters: [],
|
|
71
|
+
hasBody: false
|
|
72
|
+
},
|
|
73
|
+
listPackageObjects: {
|
|
74
|
+
method: "GET",
|
|
75
|
+
path: "/v1/destinations/{destination}/packages/{package}/objects",
|
|
76
|
+
pathParameters: ["destination", "package"],
|
|
77
|
+
queryParameters: ["limit", "cursor"],
|
|
78
|
+
hasBody: false
|
|
79
|
+
},
|
|
80
|
+
listTransportObjects: {
|
|
81
|
+
method: "GET",
|
|
82
|
+
path: "/v1/destinations/{destination}/transports/{transport}/objects",
|
|
83
|
+
pathParameters: ["destination", "transport"],
|
|
84
|
+
queryParameters: [],
|
|
85
|
+
hasBody: false
|
|
86
|
+
},
|
|
87
|
+
listTransports: {
|
|
88
|
+
method: "GET",
|
|
89
|
+
path: "/v1/destinations/{destination}/transports",
|
|
90
|
+
pathParameters: ["destination"],
|
|
91
|
+
queryParameters: [
|
|
92
|
+
"owner",
|
|
93
|
+
"type",
|
|
94
|
+
"status",
|
|
95
|
+
"target",
|
|
96
|
+
"dateFrom",
|
|
97
|
+
"dateTo",
|
|
98
|
+
"text",
|
|
99
|
+
"includeTasks"
|
|
100
|
+
],
|
|
101
|
+
hasBody: false
|
|
102
|
+
},
|
|
103
|
+
readAtcFindingDocumentation: {
|
|
104
|
+
method: "POST",
|
|
105
|
+
path: "/v1/destinations/{destination}/atc-finding-documentation:read",
|
|
106
|
+
pathParameters: ["destination"],
|
|
107
|
+
queryParameters: [],
|
|
108
|
+
hasBody: true
|
|
109
|
+
},
|
|
110
|
+
readObjectSource: {
|
|
111
|
+
method: "POST",
|
|
112
|
+
path: "/v1/destinations/{destination}/objects/{type}/{name}/source:read",
|
|
113
|
+
pathParameters: [
|
|
114
|
+
"destination",
|
|
115
|
+
"type",
|
|
116
|
+
"name"
|
|
117
|
+
],
|
|
118
|
+
queryParameters: [],
|
|
119
|
+
hasBody: true
|
|
120
|
+
},
|
|
121
|
+
readSourceVersion: {
|
|
122
|
+
method: "POST",
|
|
123
|
+
path: "/v1/destinations/{destination}/source-versions:read",
|
|
124
|
+
pathParameters: ["destination"],
|
|
125
|
+
queryParameters: [],
|
|
126
|
+
hasBody: true
|
|
127
|
+
},
|
|
128
|
+
runAtc: {
|
|
129
|
+
method: "POST",
|
|
130
|
+
path: "/v1/destinations/{destination}/atc-runs",
|
|
131
|
+
pathParameters: ["destination"],
|
|
132
|
+
queryParameters: [],
|
|
133
|
+
hasBody: true
|
|
134
|
+
},
|
|
135
|
+
searchObjects: {
|
|
136
|
+
method: "GET",
|
|
137
|
+
path: "/v1/destinations/{destination}/objects",
|
|
138
|
+
pathParameters: ["destination"],
|
|
139
|
+
queryParameters: [
|
|
140
|
+
"query",
|
|
141
|
+
"packageName",
|
|
142
|
+
"objectType",
|
|
143
|
+
"maxResults",
|
|
144
|
+
"limit",
|
|
145
|
+
"cursor"
|
|
146
|
+
],
|
|
147
|
+
hasBody: false
|
|
148
|
+
},
|
|
149
|
+
searchPackages: {
|
|
150
|
+
method: "GET",
|
|
151
|
+
path: "/v1/destinations/{destination}/packages",
|
|
152
|
+
pathParameters: ["destination"],
|
|
153
|
+
queryParameters: [
|
|
154
|
+
"q",
|
|
155
|
+
"maxResults",
|
|
156
|
+
"limit",
|
|
157
|
+
"cursor"
|
|
158
|
+
],
|
|
159
|
+
hasBody: false
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
function inputValue(input, name) {
|
|
163
|
+
return input?.[name];
|
|
164
|
+
}
|
|
165
|
+
function createAdtServerClient(options) {
|
|
166
|
+
const fetcher = options.fetch ?? globalThis.fetch;
|
|
167
|
+
const request = async (definition, input, requestOptions) => {
|
|
168
|
+
const path = definition.path.replace(/\{([A-Za-z_$][A-Za-z0-9_$]*)\}/gu, (_match, name) => {
|
|
169
|
+
const value = inputValue(input, name);
|
|
170
|
+
if (value === void 0 || value === null) throw new Error(`Missing required path parameter: ${name}`);
|
|
171
|
+
return encodeURIComponent(String(value));
|
|
172
|
+
});
|
|
173
|
+
const url = new URL(path, options.baseUrl);
|
|
174
|
+
for (const name of definition.queryParameters) {
|
|
175
|
+
const value = inputValue(input, name);
|
|
176
|
+
if (value !== void 0 && value !== null) url.searchParams.set(name, String(value));
|
|
177
|
+
}
|
|
178
|
+
const body = inputValue(input, "body");
|
|
179
|
+
const response = await fetcher(url, {
|
|
180
|
+
method: definition.method,
|
|
181
|
+
headers: {
|
|
182
|
+
accept: "application/json",
|
|
183
|
+
...definition.hasBody ? { "content-type": "application/json" } : {},
|
|
184
|
+
...options.headers
|
|
185
|
+
},
|
|
186
|
+
...definition.hasBody ? { body: JSON.stringify(body) } : {},
|
|
187
|
+
signal: requestOptions?.signal
|
|
188
|
+
});
|
|
189
|
+
const responseBody = await response.json().catch(() => void 0);
|
|
190
|
+
if (!response.ok) throw new AdtServerHttpError(response.status, responseBody);
|
|
191
|
+
return responseBody;
|
|
192
|
+
};
|
|
193
|
+
return {
|
|
194
|
+
buildTransportSourceManifest: (params, requestOptions) => request(operationDefinitions.buildTransportSourceManifest, params, requestOptions),
|
|
195
|
+
getBadi: (params, requestOptions) => request(operationDefinitions.getBadi, params, requestOptions),
|
|
196
|
+
getObjectMetadata: (params, requestOptions) => request(operationDefinitions.getObjectMetadata, params, requestOptions),
|
|
197
|
+
getObjectSourceHistory: (params, requestOptions) => request(operationDefinitions.getObjectSourceHistory, params, requestOptions),
|
|
198
|
+
getPackageTree: (params, requestOptions) => request(operationDefinitions.getPackageTree, params, requestOptions),
|
|
199
|
+
getTransportDetail: (params, requestOptions) => request(operationDefinitions.getTransportDetail, params, requestOptions),
|
|
200
|
+
listDestinations: (requestOptions) => request(operationDefinitions.listDestinations, void 0, requestOptions),
|
|
201
|
+
listPackageObjects: (params, requestOptions) => request(operationDefinitions.listPackageObjects, params, requestOptions),
|
|
202
|
+
listTransportObjects: (params, requestOptions) => request(operationDefinitions.listTransportObjects, params, requestOptions),
|
|
203
|
+
listTransports: (params, requestOptions) => request(operationDefinitions.listTransports, params, requestOptions),
|
|
204
|
+
readAtcFindingDocumentation: (params, requestOptions) => request(operationDefinitions.readAtcFindingDocumentation, params, requestOptions),
|
|
205
|
+
readObjectSource: (params, requestOptions) => request(operationDefinitions.readObjectSource, params, requestOptions),
|
|
206
|
+
readSourceVersion: (params, requestOptions) => request(operationDefinitions.readSourceVersion, params, requestOptions),
|
|
207
|
+
runAtc: (params, requestOptions) => request(operationDefinitions.runAtc, params, requestOptions),
|
|
208
|
+
searchObjects: (params, requestOptions) => request(operationDefinitions.searchObjects, params, requestOptions),
|
|
209
|
+
searchPackages: (params, requestOptions) => request(operationDefinitions.searchPackages, params, requestOptions)
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
//#endregion
|
|
214
|
+
export { AdtServerHttpError, createAdtServerClient };
|
|
215
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/generated.ts"],"sourcesContent":["/**\n * GENERATED FROM @abapify/adt-server's OpenAPI document.\n * Run `bun run --filter @abapify/adt-server-client generate`; do not edit manually.\n */\n\nexport interface AdtServerClientOptions {\n baseUrl: string;\n fetch?: typeof globalThis.fetch;\n headers?: Record<string, string>;\n}\n\nexport interface AdtServerRequestOptions {\n signal?: AbortSignal;\n}\n\nexport class AdtServerHttpError extends Error {\n constructor(\n readonly status: number,\n readonly body: unknown,\n ) {\n super(`ADT Server request failed (${status})`);\n }\n}\n\ntype OperationDefinition = {\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n path: string;\n pathParameters: readonly string[];\n queryParameters: readonly string[];\n hasBody: boolean;\n};\n\nconst operationDefinitions = {\n buildTransportSourceManifest: {\n method: 'POST',\n path: '/v1/destinations/{destination}/transport-source-manifests',\n pathParameters: ['destination'],\n queryParameters: [],\n hasBody: true,\n },\n getBadi: {\n method: 'GET',\n path: '/v1/destinations/{destination}/badi/{name}',\n pathParameters: ['destination', 'name'],\n queryParameters: ['implementations'],\n hasBody: false,\n },\n getObjectMetadata: {\n method: 'GET',\n path: '/v1/destinations/{destination}/objects/{type}/{name}',\n pathParameters: ['destination', 'type', 'name'],\n queryParameters: [],\n hasBody: false,\n },\n getObjectSourceHistory: {\n method: 'GET',\n path: '/v1/destinations/{destination}/objects/{type}/{name}/source-history',\n pathParameters: ['destination', 'type', 'name'],\n queryParameters: [],\n hasBody: false,\n },\n getPackageTree: {\n method: 'GET',\n path: '/v1/destinations/{destination}/packages/tree',\n pathParameters: ['destination'],\n queryParameters: ['root', 'limit', 'cursor'],\n hasBody: false,\n },\n getTransportDetail: {\n method: 'GET',\n path: '/v1/destinations/{destination}/transports/{transport}',\n pathParameters: ['destination', 'transport'],\n queryParameters: [],\n hasBody: false,\n },\n listDestinations: {\n method: 'GET',\n path: '/v1/destinations',\n pathParameters: [],\n queryParameters: [],\n hasBody: false,\n },\n listPackageObjects: {\n method: 'GET',\n path: '/v1/destinations/{destination}/packages/{package}/objects',\n pathParameters: ['destination', 'package'],\n queryParameters: ['limit', 'cursor'],\n hasBody: false,\n },\n listTransportObjects: {\n method: 'GET',\n path: '/v1/destinations/{destination}/transports/{transport}/objects',\n pathParameters: ['destination', 'transport'],\n queryParameters: [],\n hasBody: false,\n },\n listTransports: {\n method: 'GET',\n path: '/v1/destinations/{destination}/transports',\n pathParameters: ['destination'],\n queryParameters: [\n 'owner',\n 'type',\n 'status',\n 'target',\n 'dateFrom',\n 'dateTo',\n 'text',\n 'includeTasks',\n ],\n hasBody: false,\n },\n readAtcFindingDocumentation: {\n method: 'POST',\n path: '/v1/destinations/{destination}/atc-finding-documentation:read',\n pathParameters: ['destination'],\n queryParameters: [],\n hasBody: true,\n },\n readObjectSource: {\n method: 'POST',\n path: '/v1/destinations/{destination}/objects/{type}/{name}/source:read',\n pathParameters: ['destination', 'type', 'name'],\n queryParameters: [],\n hasBody: true,\n },\n readSourceVersion: {\n method: 'POST',\n path: '/v1/destinations/{destination}/source-versions:read',\n pathParameters: ['destination'],\n queryParameters: [],\n hasBody: true,\n },\n runAtc: {\n method: 'POST',\n path: '/v1/destinations/{destination}/atc-runs',\n pathParameters: ['destination'],\n queryParameters: [],\n hasBody: true,\n },\n searchObjects: {\n method: 'GET',\n path: '/v1/destinations/{destination}/objects',\n pathParameters: ['destination'],\n queryParameters: [\n 'query',\n 'packageName',\n 'objectType',\n 'maxResults',\n 'limit',\n 'cursor',\n ],\n hasBody: false,\n },\n searchPackages: {\n method: 'GET',\n path: '/v1/destinations/{destination}/packages',\n pathParameters: ['destination'],\n queryParameters: ['q', 'maxResults', 'limit', 'cursor'],\n hasBody: false,\n },\n} as const satisfies Record<string, OperationDefinition>;\n\nexport type BuildTransportSourceManifestParams = {\n destination: string;\n body: { transports: Array<string> };\n};\nexport type BuildTransportSourceManifestResponse = {\n requestedTransports: Array<string>;\n scopeTransports: Array<string>;\n entries: Array<{\n object: { pgmid: string; type: string; name: string; packageName?: string };\n component: { id: string };\n sourceTransport: string;\n changeKind:\n | 'added'\n | 'modified'\n | 'deleted'\n | 'unchanged'\n | 'ambiguous'\n | 'unsupported'\n | 'failed';\n exact: boolean;\n base?: {\n id: string;\n ordinal: number;\n title?: string;\n contentType?: string;\n etag?: string;\n updatedAt?: string;\n author?: string;\n transports: Array<string>;\n sourceCapability: string;\n };\n head?: {\n id: string;\n ordinal: number;\n title?: string;\n contentType?: string;\n etag?: string;\n updatedAt?: string;\n author?: string;\n transports: Array<string>;\n sourceCapability: string;\n };\n diagnostic?: { code: string; message: string };\n }>;\n};\nexport type GetBadiParams = {\n destination: string;\n name: string;\n implementations?: boolean;\n};\nexport type GetBadiResponse = {\n kind: 'definition' | 'implementation' | 'enhancement';\n name: string;\n type: string;\n description?: string;\n language?: string;\n version?: string;\n packageName?: string;\n packageUri?: string;\n responsible?: string;\n masterLanguage?: string;\n masterSystem?: string;\n implementations?: Array<{\n kind: 'implementation';\n name: string;\n type: string;\n description?: string;\n language?: string;\n version?: string;\n packageName?: string;\n packageUri?: string;\n responsible?: string;\n masterLanguage?: string;\n masterSystem?: string;\n }>;\n};\nexport type GetObjectMetadataParams = {\n destination: string;\n type: string;\n name: string;\n};\nexport type GetObjectMetadataResponse = {\n object: {\n canonicalKey: string;\n objectType: string;\n objectName: string;\n pgmid?: string;\n objInfo?: string;\n objDesc?: string;\n lockStatus?: string;\n packageName?: string;\n description?: string;\n };\n metadata: {\n adtObjectType?: string;\n description?: string;\n packageName?: string;\n };\n facets: Array<{\n facet?: string;\n name?: string;\n displayName?: string;\n text?: string;\n version?: string;\n hasChildrenOfSameFacet?: boolean;\n }>;\n capabilities: Array<{\n relation: string;\n capability:\n | 'source'\n | 'versions'\n | 'structure'\n | 'text_elements'\n | 'enhancement_implementations'\n | 'enhancement_options'\n | 'syntax';\n title?: string;\n mediaType?: string;\n etag?: string;\n }>;\n};\nexport type GetObjectSourceHistoryParams = {\n destination: string;\n type: string;\n name: string;\n};\nexport type GetObjectSourceHistoryResponse = {\n available: boolean;\n versions: Array<{\n id: string;\n ordinal: number;\n title?: string;\n contentType?: string;\n etag?: string;\n updatedAt?: string;\n author?: string;\n transports: Array<string>;\n }>;\n};\nexport type GetPackageTreeParams = {\n destination: string;\n root: string;\n limit?: number;\n cursor?: string;\n};\nexport type GetPackageTreeResponse = {\n data: Array<{ name: string; parent?: string; description?: string }>;\n nextCursor: string | null;\n truncated: boolean;\n observedAt: string;\n};\nexport type GetTransportDetailParams = {\n destination: string;\n transport: string;\n};\nexport type GetTransportDetailResponse = {\n trkorr: string;\n owner: string;\n description: string;\n status: string;\n statusRaw?: string;\n trFunction?: string;\n target?: string;\n client?: string;\n changedAt?: string;\n tasks: Array<{\n trkorr: string;\n owner: string;\n description: string;\n status: string;\n statusRaw?: string;\n trFunction?: string;\n target?: string;\n client?: string;\n changedAt?: string;\n parentTrkorr: string;\n objects: Array<{\n canonicalKey: string;\n objectType: string;\n objectName: string;\n pgmid?: string;\n objInfo?: string;\n objDesc?: string;\n lockStatus?: string;\n }>;\n }>;\n objects: Array<{\n canonicalKey: string;\n objectType: string;\n objectName: string;\n pgmid?: string;\n objInfo?: string;\n objDesc?: string;\n lockStatus?: string;\n }>;\n};\nexport type ListDestinationsParams = Record<string, never>;\nexport type ListDestinationsResponse = {\n data: Array<{\n key: string;\n displayName: string;\n systemSids: Array<string>;\n authConfigured: boolean;\n version: number;\n }>;\n};\nexport type ListPackageObjectsParams = {\n destination: string;\n package: string;\n limit?: number;\n cursor?: string;\n};\nexport type ListPackageObjectsResponse = {\n data: Array<{\n canonicalKey: string;\n objectType: string;\n objectName: string;\n pgmid?: string;\n objInfo?: string;\n objDesc?: string;\n lockStatus?: string;\n packageName?: string;\n description?: string;\n }>;\n nextCursor: string | null;\n truncated: boolean;\n observedAt: string;\n};\nexport type ListTransportObjectsParams = {\n destination: string;\n transport: string;\n};\nexport type ListTransportObjectsResponse = Array<{\n canonicalKey: string;\n objectType: string;\n objectName: string;\n pgmid?: string;\n objInfo?: string;\n objDesc?: string;\n lockStatus?: string;\n}>;\nexport type ListTransportsParams = {\n destination: string;\n owner?: string;\n type?: string;\n status?: string;\n target?: string;\n dateFrom?: string;\n dateTo?: string;\n text?: string;\n includeTasks?: 'true' | 'false';\n};\nexport type ListTransportsResponse = Array<{\n trkorr: string;\n owner: string;\n description: string;\n status: string;\n statusRaw?: string;\n trFunction?: string;\n target?: string;\n client?: string;\n changedAt?: string;\n}>;\nexport type ReadAtcFindingDocumentationParams = {\n destination: string;\n body: { documentationCapability: string; maxBytes?: number };\n};\nexport type ReadAtcFindingDocumentationResponse = {\n bytes: number;\n html: string;\n};\nexport type ReadObjectSourceParams = {\n destination: string;\n type: string;\n name: string;\n body: { version?: string };\n};\nexport type ReadObjectSourceResponse = { bytes: number; source: string };\nexport type ReadSourceVersionParams = {\n destination: string;\n body: { sourceCapability: string; maxBytes: number };\n};\nexport type ReadSourceVersionResponse = { bytes: number; source: string };\nexport type RunAtcParams = {\n destination: string;\n body: {\n scope:\n | { kind: 'package'; packageName: string }\n | { kind: 'transport_request'; trkorr: string }\n | {\n kind: 'objects';\n objects: Array<{ objectType: string; objectName: string }>;\n };\n variant?: string;\n };\n};\nexport type RunAtcResponse = {\n checkVariant: string;\n findings: Array<{\n checkId: string;\n checkTitle: string;\n messageText: string;\n priority: number;\n objectType: string;\n objectName: string;\n lineStart?: number;\n lineEnd?: number;\n messageId?: string;\n packageName?: string;\n objectDescription?: string;\n contactPerson?: string;\n processor?: string;\n lastChangedBy?: string;\n exemptionKind?: string;\n exemptionApproval?: string;\n noExemption?: boolean;\n quickfixInfo?: string;\n quickfixes?: { manual?: boolean; automatic?: boolean; pseudo?: boolean };\n checksum?: string;\n documentationCapability?: string;\n }>;\n};\nexport type SearchObjectsParams = {\n destination: string;\n query?: string;\n packageName?: string;\n objectType?: string;\n maxResults?: number;\n limit?: number;\n cursor?: string;\n};\nexport type SearchObjectsResponse = {\n data: Array<{\n canonicalKey: string;\n objectType: string;\n objectName: string;\n pgmid?: string;\n objInfo?: string;\n objDesc?: string;\n lockStatus?: string;\n packageName?: string;\n description?: string;\n }>;\n nextCursor: string | null;\n truncated: boolean;\n observedAt: string;\n};\nexport type SearchPackagesParams = {\n destination: string;\n q?: string;\n maxResults?: number;\n limit?: number;\n cursor?: string;\n};\nexport type SearchPackagesResponse = {\n data: Array<{ name: string; parent?: string; description?: string }>;\n nextCursor: string | null;\n truncated: boolean;\n observedAt: string;\n};\n\nfunction inputValue(input: object | undefined, name: string): unknown {\n return (input as Record<string, unknown> | undefined)?.[name];\n}\n\nexport function createAdtServerClient(options: AdtServerClientOptions) {\n const fetcher = options.fetch ?? globalThis.fetch;\n const request = async <T>(\n definition: OperationDefinition,\n input?: object,\n requestOptions?: AdtServerRequestOptions,\n ): Promise<T> => {\n const path = definition.path.replace(\n /\\{([A-Za-z_$][A-Za-z0-9_$]*)\\}/gu,\n (_match, name: string) => {\n const value = inputValue(input, name);\n if (value === undefined || value === null) {\n throw new Error(`Missing required path parameter: ${name}`);\n }\n return encodeURIComponent(String(value)); // NOSONAR\n },\n );\n const url = new URL(path, options.baseUrl);\n for (const name of definition.queryParameters) {\n const value = inputValue(input, name);\n if (value !== undefined && value !== null)\n url.searchParams.set(name, String(value)); // NOSONAR\n }\n const body = inputValue(input, 'body');\n const response = await fetcher(url, {\n method: definition.method,\n headers: {\n accept: 'application/json',\n ...(definition.hasBody ? { 'content-type': 'application/json' } : {}),\n ...options.headers,\n },\n ...(definition.hasBody ? { body: JSON.stringify(body) } : {}),\n signal: requestOptions?.signal,\n });\n const responseBody = await response.json().catch(() => undefined);\n if (!response.ok) {\n throw new AdtServerHttpError(response.status, responseBody);\n }\n return responseBody as T;\n };\n\n return {\n buildTransportSourceManifest: (\n params: BuildTransportSourceManifestParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<BuildTransportSourceManifestResponse>(\n operationDefinitions.buildTransportSourceManifest,\n params,\n requestOptions,\n ),\n getBadi: (\n params: GetBadiParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<GetBadiResponse>(\n operationDefinitions.getBadi,\n params,\n requestOptions,\n ),\n getObjectMetadata: (\n params: GetObjectMetadataParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<GetObjectMetadataResponse>(\n operationDefinitions.getObjectMetadata,\n params,\n requestOptions,\n ),\n getObjectSourceHistory: (\n params: GetObjectSourceHistoryParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<GetObjectSourceHistoryResponse>(\n operationDefinitions.getObjectSourceHistory,\n params,\n requestOptions,\n ),\n getPackageTree: (\n params: GetPackageTreeParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<GetPackageTreeResponse>(\n operationDefinitions.getPackageTree,\n params,\n requestOptions,\n ),\n getTransportDetail: (\n params: GetTransportDetailParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<GetTransportDetailResponse>(\n operationDefinitions.getTransportDetail,\n params,\n requestOptions,\n ),\n listDestinations: (requestOptions?: AdtServerRequestOptions) =>\n request<ListDestinationsResponse>(\n operationDefinitions.listDestinations,\n undefined,\n requestOptions,\n ),\n listPackageObjects: (\n params: ListPackageObjectsParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<ListPackageObjectsResponse>(\n operationDefinitions.listPackageObjects,\n params,\n requestOptions,\n ),\n listTransportObjects: (\n params: ListTransportObjectsParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<ListTransportObjectsResponse>(\n operationDefinitions.listTransportObjects,\n params,\n requestOptions,\n ),\n listTransports: (\n params: ListTransportsParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<ListTransportsResponse>(\n operationDefinitions.listTransports,\n params,\n requestOptions,\n ),\n readAtcFindingDocumentation: (\n params: ReadAtcFindingDocumentationParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<ReadAtcFindingDocumentationResponse>(\n operationDefinitions.readAtcFindingDocumentation,\n params,\n requestOptions,\n ),\n readObjectSource: (\n params: ReadObjectSourceParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<ReadObjectSourceResponse>(\n operationDefinitions.readObjectSource,\n params,\n requestOptions,\n ),\n readSourceVersion: (\n params: ReadSourceVersionParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<ReadSourceVersionResponse>(\n operationDefinitions.readSourceVersion,\n params,\n requestOptions,\n ),\n runAtc: (params: RunAtcParams, requestOptions?: AdtServerRequestOptions) =>\n request<RunAtcResponse>(\n operationDefinitions.runAtc,\n params,\n requestOptions,\n ),\n searchObjects: (\n params: SearchObjectsParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<SearchObjectsResponse>(\n operationDefinitions.searchObjects,\n params,\n requestOptions,\n ),\n searchPackages: (\n params: SearchPackagesParams,\n requestOptions?: AdtServerRequestOptions,\n ) =>\n request<SearchPackagesResponse>(\n operationDefinitions.searchPackages,\n params,\n requestOptions,\n ),\n };\n}\n\nexport type AdtServerClient = ReturnType<typeof createAdtServerClient>;\n"],"mappings":"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W,UAAU,EAAE,MAAM,KAAK,UAAU,IAAI,EAAE,IAAI,CAAC;GAC3D,QAAQ,gBAAgB;EAC1B,CAAC;EACD,MAAM,eAAe,MAAM,SAAS,KAAK,CAAC,CAAC,YAAY,MAAS;EAChE,IAAI,CAAC,SAAS,IACZ,MAAM,IAAI,mBAAmB,SAAS,QAAQ,YAAY;EAE5D,OAAO;CACT;CAEA,OAAO;EACL,+BACE,QACA,mBAEA,QACE,qBAAqB,8BACrB,QACA,cACF;EACF,UACE,QACA,mBAEA,QACE,qBAAqB,SACrB,QACA,cACF;EACF,oBACE,QACA,mBAEA,QACE,qBAAqB,mBACrB,QACA,cACF;EACF,yBACE,QACA,mBAEA,QACE,qBAAqB,wBACrB,QACA,cACF;EACF,iBACE,QACA,mBAEA,QACE,qBAAqB,gBACrB,QACA,cACF;EACF,qBACE,QACA,mBAEA,QACE,qBAAqB,oBACrB,QACA,cACF;EACF,mBAAmB,mBACjB,QACE,qBAAqB,kBACrB,QACA,cACF;EACF,qBACE,QACA,mBAEA,QACE,qBAAqB,oBACrB,QACA,cACF;EACF,uBACE,QACA,mBAEA,QACE,qBAAqB,sBACrB,QACA,cACF;EACF,iBACE,QACA,mBAEA,QACE,qBAAqB,gBACrB,QACA,cACF;EACF,8BACE,QACA,mBAEA,QACE,qBAAqB,6BACrB,QACA,cACF;EACF,mBACE,QACA,mBAEA,QACE,qBAAqB,kBACrB,QACA,cACF;EACF,oBACE,QACA,mBAEA,QACE,qBAAqB,mBACrB,QACA,cACF;EACF,SAAS,QAAsB,mBAC7B,QACE,qBAAqB,QACrB,QACA,cACF;EACF,gBACE,QACA,mBAEA,QACE,qBAAqB,eACrB,QACA,cACF;EACF,iBACE,QACA,mBAEA,QACE,qBAAqB,gBACrB,QACA,cACF;CACJ;AACF"}
|
package/package.json
CHANGED
|
@@ -1 +1,32 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@abapify/adt-server-client",
|
|
3
|
+
"version": "0.4.5",
|
|
4
|
+
"description": "Generated client for @abapify/adt-server OpenAPI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./dist/index.mjs",
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"generate": "tsx scripts/generate.ts",
|
|
21
|
+
"check:generated": "tsx scripts/generate.ts --check"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/abapify/adt-cli.git",
|
|
26
|
+
"directory": "packages/adt-server-client"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/abapify/adt-cli/tree/main/packages/adt-server-client#readme",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/abapify/adt-cli/issues"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# @abapify/adt-server-client
|