@@ -5,12 +5,13 @@ import type {
5
5
} from '@aas-core-works/aas-core3.0-typescript/types' ;
6
6
import type { ApiResult } from '../models/api' ;
7
7
import type { AssetId } from '../models/AssetId' ;
8
- import {
9
- AssetAdministrationShellRepositoryAPIApi as AasRepository ,
10
- Configuration ,
11
- PagedResultPagingMetadata ,
12
- Result ,
13
- } from '../generated' ;
8
+ import { AasRepositoryService } from '../generated' ; // Updated import
9
+ //import {
10
+ // AssetAdministrationShellRepositoryAPIApi as AasRepository,
11
+ //Configuration,
12
+ //PagedResultPagingMetadata,
13
+ //Result,
14
+ //} from '../generated';
14
15
import { applyDefaults } from '../lib/apiConfig' ;
15
16
import { base64Encode } from '../lib/base64Url' ;
16
17
import {
@@ -37,24 +38,26 @@ export class AasRepositoryClient {
37
38
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
38
39
*/
39
40
async getAllAssetAdministrationShells ( options : {
40
- configuration : Configuration ;
41
+ configuration : AasRepositoryService . Configuration ;
41
42
assetIds ?: AssetId [ ] ;
42
43
idShort ?: string ;
43
44
limit ?: number ;
44
45
cursor ?: string ;
45
46
} ) : Promise <
46
47
ApiResult <
47
48
{
48
- pagedResult : PagedResultPagingMetadata | undefined ;
49
+ pagedResult : AasRepositoryService . PagedResultPagingMetadata | undefined ;
49
50
result : AssetAdministrationShell [ ] ;
50
51
} ,
51
- Result
52
+ AasRepositoryService . Result
52
53
>
53
54
> {
54
55
const { configuration, assetIds, idShort, limit, cursor } = options ;
55
56
56
57
try {
57
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
58
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
59
+ applyDefaults ( configuration )
60
+ ) ;
58
61
const encodedAssetIds = assetIds ?. map ( ( id ) => base64Encode ( JSON . stringify ( id ) ) ) ;
59
62
60
63
const result = await apiInstance . getAllAssetAdministrationShells ( {
@@ -85,13 +88,15 @@ export class AasRepositoryClient {
85
88
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
86
89
*/
87
90
async postAssetAdministrationShell ( options : {
88
- configuration : Configuration ;
91
+ configuration : AasRepositoryService . Configuration ;
89
92
assetAdministrationShell : AssetAdministrationShell ;
90
- } ) : Promise < ApiResult < AssetAdministrationShell , Result > > {
93
+ } ) : Promise < ApiResult < AssetAdministrationShell , AasRepositoryService . Result > > {
91
94
const { configuration, assetAdministrationShell } = options ;
92
95
93
96
try {
94
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
97
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
98
+ applyDefaults ( configuration )
99
+ ) ;
95
100
96
101
const result = await apiInstance . postAssetAdministrationShell ( {
97
102
assetAdministrationShell : convertCoreAasToApiAas ( assetAdministrationShell ) ,
@@ -114,13 +119,15 @@ export class AasRepositoryClient {
114
119
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
115
120
*/
116
121
async deleteAssetAdministrationShellById ( options : {
117
- configuration : Configuration ;
122
+ configuration : AasRepositoryService . Configuration ;
118
123
aasIdentifier : string ;
119
- } ) : Promise < ApiResult < void , Result > > {
124
+ } ) : Promise < ApiResult < void , AasRepositoryService . Result > > {
120
125
const { configuration, aasIdentifier } = options ;
121
126
122
127
try {
123
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
128
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
129
+ applyDefaults ( configuration )
130
+ ) ;
124
131
125
132
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
126
133
@@ -145,13 +152,15 @@ export class AasRepositoryClient {
145
152
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
146
153
*/
147
154
async getAssetAdministrationShellById ( options : {
148
- configuration : Configuration ;
155
+ configuration : AasRepositoryService . Configuration ;
149
156
aasIdentifier : string ;
150
- } ) : Promise < ApiResult < AssetAdministrationShell , Result > > {
157
+ } ) : Promise < ApiResult < AssetAdministrationShell , AasRepositoryService . Result > > {
151
158
const { configuration, aasIdentifier } = options ;
152
159
153
160
try {
154
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
161
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
162
+ applyDefaults ( configuration )
163
+ ) ;
155
164
156
165
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
157
166
@@ -177,14 +186,16 @@ export class AasRepositoryClient {
177
186
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
178
187
*/
179
188
async putAssetAdministrationShellById ( options : {
180
- configuration : Configuration ;
189
+ configuration : AasRepositoryService . Configuration ;
181
190
aasIdentifier : string ;
182
191
assetAdministrationShell : AssetAdministrationShell ;
183
- } ) : Promise < ApiResult < void , Result > > {
192
+ } ) : Promise < ApiResult < void , AasRepositoryService . Result > > {
184
193
const { configuration, aasIdentifier, assetAdministrationShell } = options ;
185
194
186
195
try {
187
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
196
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
197
+ applyDefaults ( configuration )
198
+ ) ;
188
199
189
200
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
190
201
@@ -210,13 +221,15 @@ export class AasRepositoryClient {
210
221
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
211
222
*/
212
223
async getAssetInformation ( options : {
213
- configuration : Configuration ;
224
+ configuration : AasRepositoryService . Configuration ;
214
225
aasIdentifier : string ;
215
- } ) : Promise < ApiResult < AssetInformation , Result > > {
226
+ } ) : Promise < ApiResult < AssetInformation , AasRepositoryService . Result > > {
216
227
const { configuration, aasIdentifier } = options ;
217
228
218
229
try {
219
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
230
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
231
+ applyDefaults ( configuration )
232
+ ) ;
220
233
221
234
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
222
235
@@ -245,14 +258,16 @@ export class AasRepositoryClient {
245
258
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
246
259
*/
247
260
async putAssetInformation ( options : {
248
- configuration : Configuration ;
261
+ configuration : AasRepositoryService . Configuration ;
249
262
aasIdentifier : string ;
250
263
assetInformation : AssetInformation ;
251
- } ) : Promise < ApiResult < void , Result > > {
264
+ } ) : Promise < ApiResult < void , AasRepositoryService . Result > > {
252
265
const { configuration, aasIdentifier, assetInformation } = options ;
253
266
254
267
try {
255
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
268
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
269
+ applyDefaults ( configuration )
270
+ ) ;
256
271
257
272
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
258
273
@@ -278,12 +293,14 @@ export class AasRepositoryClient {
278
293
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
279
294
*/
280
295
async deleteThumbnail ( options : {
281
- configuration : Configuration ;
296
+ configuration : AasRepositoryService . Configuration ;
282
297
aasIdentifier : string ;
283
- } ) : Promise < ApiResult < void , Result > > {
298
+ } ) : Promise < ApiResult < void , AasRepositoryService . Result > > {
284
299
const { configuration, aasIdentifier } = options ;
285
300
try {
286
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
301
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
302
+ applyDefaults ( configuration )
303
+ ) ;
287
304
288
305
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
289
306
@@ -308,13 +325,15 @@ export class AasRepositoryClient {
308
325
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
309
326
*/
310
327
async getThumbnail ( options : {
311
- configuration : Configuration ;
328
+ configuration : AasRepositoryService . Configuration ;
312
329
aasIdentifier : string ;
313
- } ) : Promise < ApiResult < Blob , Result > > {
330
+ } ) : Promise < ApiResult < Blob , AasRepositoryService . Result > > {
314
331
const { configuration, aasIdentifier } = options ;
315
332
316
333
try {
317
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
334
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
335
+ applyDefaults ( configuration )
336
+ ) ;
318
337
319
338
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
320
339
@@ -341,15 +360,17 @@ export class AasRepositoryClient {
341
360
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
342
361
*/
343
362
async putThumbnail ( options : {
344
- configuration : Configuration ;
363
+ configuration : AasRepositoryService . Configuration ;
345
364
aasIdentifier : string ;
346
365
fileName : string ;
347
366
file : Blob ;
348
- } ) : Promise < ApiResult < void , Result > > {
367
+ } ) : Promise < ApiResult < void , AasRepositoryService . Result > > {
349
368
const { configuration, aasIdentifier, fileName, file } = options ;
350
369
351
370
try {
352
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
371
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
372
+ applyDefaults ( configuration )
373
+ ) ;
353
374
354
375
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
355
376
@@ -378,15 +399,22 @@ export class AasRepositoryClient {
378
399
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
379
400
*/
380
401
async getAllSubmodelReferences ( options : {
381
- configuration : Configuration ;
402
+ configuration : AasRepositoryService . Configuration ;
382
403
aasIdentifier : string ;
383
404
limit ?: number ;
384
405
cursor ?: string ;
385
- } ) : Promise < ApiResult < { pagedResult : PagedResultPagingMetadata | undefined ; result : Reference [ ] } , Result > > {
406
+ } ) : Promise <
407
+ ApiResult <
408
+ { pagedResult : AasRepositoryService . PagedResultPagingMetadata | undefined ; result : Reference [ ] } ,
409
+ AasRepositoryService . Result
410
+ >
411
+ > {
386
412
const { configuration, aasIdentifier, limit, cursor } = options ;
387
413
388
414
try {
389
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
415
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
416
+ applyDefaults ( configuration )
417
+ ) ;
390
418
391
419
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
392
420
@@ -421,14 +449,16 @@ export class AasRepositoryClient {
421
449
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
422
450
*/
423
451
async postSubmodelReference ( options : {
424
- configuration : Configuration ;
452
+ configuration : AasRepositoryService . Configuration ;
425
453
aasIdentifier : string ;
426
454
submodelReference : Reference ;
427
- } ) : Promise < ApiResult < Reference , Result > > {
455
+ } ) : Promise < ApiResult < Reference , AasRepositoryService . Result > > {
428
456
const { configuration, aasIdentifier, submodelReference } = options ;
429
457
430
458
try {
431
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
459
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
460
+ applyDefaults ( configuration )
461
+ ) ;
432
462
433
463
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
434
464
@@ -455,14 +485,16 @@ export class AasRepositoryClient {
455
485
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
456
486
*/
457
487
async deleteSubmodelReferenceById ( options : {
458
- configuration : Configuration ;
488
+ configuration : AasRepositoryService . Configuration ;
459
489
aasIdentifier : string ;
460
490
submodelIdentifier : string ;
461
- } ) : Promise < ApiResult < void , Result > > {
491
+ } ) : Promise < ApiResult < void , AasRepositoryService . Result > > {
462
492
const { configuration, aasIdentifier, submodelIdentifier } = options ;
463
493
464
494
try {
465
- const apiInstance = new AasRepository ( applyDefaults ( configuration ) ) ;
495
+ const apiInstance = new AasRepositoryService . AssetAdministrationShellRepositoryAPIApi (
496
+ applyDefaults ( configuration )
497
+ ) ;
466
498
467
499
const encodedAasIdentifier = base64Encode ( aasIdentifier ) ;
468
500
const encodedSubmodelIdentifier = base64Encode ( submodelIdentifier ) ;
0 commit comments