basyx-typescript-sdk 2.2.4 → 2.2.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/README.md +115 -0
- package/bundle/index.cjs +2479 -1814
- package/bundle/index.cjs.map +1 -1
- package/bundle/index.mjs +2479 -1814
- package/bundle/index.mjs.map +1 -1
- package/dist/clients/AasDiscoveryClient.d.ts +3 -2
- package/dist/clients/AasDiscoveryClient.js +78 -20
- package/dist/clients/AasRegistryClient.d.ts +4 -2
- package/dist/clients/AasRegistryClient.js +153 -45
- package/dist/clients/AasRepositoryClient.d.ts +73 -16
- package/dist/clients/AasRepositoryClient.js +682 -263
- package/dist/clients/AasxFileClient.d.ts +18 -0
- package/dist/clients/AasxFileClient.js +100 -25
- package/dist/clients/ConceptDescriptionRepositoryClient.d.ts +3 -1
- package/dist/clients/ConceptDescriptionRepositoryClient.js +93 -29
- package/dist/clients/SubmodelRegistryClient.d.ts +3 -1
- package/dist/clients/SubmodelRegistryClient.js +91 -21
- package/dist/clients/SubmodelRepositoryClient.d.ts +229 -22
- package/dist/clients/SubmodelRepositoryClient.js +689 -201
- package/dist/generated/AasDiscoveryService/models/index.d.ts +2 -2
- package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.d.ts +1 -1
- package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.js +1 -1
- package/dist/generated/AasRegistryService/apis/DescriptionAPIApi.d.ts +1 -1
- package/dist/generated/AasRegistryService/apis/DescriptionAPIApi.js +1 -1
- package/dist/generated/AasRegistryService/index.d.ts +1 -1
- package/dist/generated/AasRegistryService/index.js +1 -1
- package/dist/generated/AasRegistryService/models/index.d.ts +3 -3
- package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.d.ts +3 -3
- package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.js +1 -1
- package/dist/generated/AasRepositoryService/apis/DescriptionAPIApi.d.ts +1 -1
- package/dist/generated/AasRepositoryService/apis/DescriptionAPIApi.js +1 -1
- package/dist/generated/AasRepositoryService/apis/SerializationAPIApi.d.ts +1 -1
- package/dist/generated/AasRepositoryService/apis/SerializationAPIApi.js +1 -1
- package/dist/generated/AasRepositoryService/index.d.ts +1 -1
- package/dist/generated/AasRepositoryService/index.js +1 -1
- package/dist/generated/AasRepositoryService/models/index.d.ts +7 -7
- package/dist/generated/AasxFileService/apis/AASXFileServerAPIApi.d.ts +5 -3
- package/dist/generated/AasxFileService/apis/AASXFileServerAPIApi.js +6 -0
- package/dist/generated/AasxFileService/apis/DescriptionAPIApi.d.ts +26 -0
- package/dist/generated/AasxFileService/apis/DescriptionAPIApi.js +40 -0
- package/dist/generated/AasxFileService/apis/index.d.ts +1 -0
- package/dist/generated/AasxFileService/apis/index.js +1 -0
- package/dist/generated/AasxFileService/models/index.d.ts +45 -0
- package/dist/generated/ConceptDescriptionRepositoryService/models/index.d.ts +2 -2
- package/dist/generated/SubmodelRegistryService/models/index.d.ts +2 -2
- package/dist/generated/SubmodelRepositoryService/models/index.d.ts +9 -9
- package/dist/generated/runtime.js +7 -0
- package/dist/lib/errorHandler.js +13 -2
- package/dist/models/api.d.ts +4 -2
- package/dist/services/AasService.d.ts +21 -1
- package/dist/services/AasService.js +114 -26
- package/dist/services/SubmodelService.d.ts +21 -1
- package/dist/services/SubmodelService.js +119 -21
- package/package.json +14 -3
- package/dist/generated/AasRegistryService/runtime.d.ts +0 -181
- package/dist/generated/AasRegistryService/runtime.js +0 -326
- package/dist/generated/AasRepositoryService/runtime.d.ts +0 -181
- package/dist/generated/AasRepositoryService/runtime.js +0 -326
|
@@ -47,7 +47,7 @@ export interface InlineResponse200 {
|
|
|
47
47
|
* @type {PagedResultPagingMetadata}
|
|
48
48
|
* @memberof InlineResponse200
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
51
51
|
/**
|
|
52
52
|
*
|
|
53
53
|
* @type {Array<string>}
|
|
@@ -164,7 +164,7 @@ export interface PagedResult {
|
|
|
164
164
|
* @type {PagedResultPagingMetadata}
|
|
165
165
|
* @memberof PagedResult
|
|
166
166
|
*/
|
|
167
|
-
|
|
167
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
170
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import * as runtime from '
|
|
12
|
+
import * as runtime from '../../runtime';
|
|
13
13
|
import type { AssetAdministrationShellDescriptor, AssetKind, GetAssetAdministrationShellDescriptorsResult, GetSubmodelDescriptorsResult, SubmodelDescriptor } from '../models/index';
|
|
14
14
|
export interface DeleteAssetAdministrationShellDescriptorByIdRequest {
|
|
15
15
|
aasIdentifier: string;
|
|
@@ -442,7 +442,7 @@ export interface GetAssetAdministrationShellDescriptorsResult {
|
|
|
442
442
|
* @type {PagedResultPagingMetadata}
|
|
443
443
|
* @memberof GetAssetAdministrationShellDescriptorsResult
|
|
444
444
|
*/
|
|
445
|
-
|
|
445
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
446
446
|
/**
|
|
447
447
|
*
|
|
448
448
|
* @type {Array<AssetAdministrationShellDescriptor>}
|
|
@@ -461,7 +461,7 @@ export interface GetSubmodelDescriptorsResult {
|
|
|
461
461
|
* @type {PagedResultPagingMetadata}
|
|
462
462
|
* @memberof GetSubmodelDescriptorsResult
|
|
463
463
|
*/
|
|
464
|
-
|
|
464
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
465
465
|
/**
|
|
466
466
|
*
|
|
467
467
|
* @type {Array<SubmodelDescriptor>}
|
|
@@ -761,7 +761,7 @@ export interface PagedResult {
|
|
|
761
761
|
* @type {PagedResultPagingMetadata}
|
|
762
762
|
* @memberof PagedResult
|
|
763
763
|
*/
|
|
764
|
-
|
|
764
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
765
765
|
}
|
|
766
766
|
/**
|
|
767
767
|
*
|
package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import * as runtime from '
|
|
12
|
+
import * as runtime from '../../runtime';
|
|
13
13
|
import type { AssetAdministrationShell, AssetInformation, BaseOperationResult, GetAssetAdministrationShellsResult, GetPathItemsResult, GetReferencesResult, GetSubmodelElementsMetadataResult, GetSubmodelElementsResult, GetSubmodelElementsValueResult, OperationRequest, OperationRequestValueOnly, OperationResult, OperationResultValueOnly, Reference, Submodel, SubmodelElement, SubmodelElementMetadata, SubmodelElementValue, SubmodelMetadata } from '../models/index';
|
|
14
14
|
export interface DeleteAssetAdministrationShellByIdRequest {
|
|
15
15
|
aasIdentifier: string;
|
|
@@ -684,11 +684,11 @@ export declare class AssetAdministrationShellRepositoryAPIApi extends runtime.Ba
|
|
|
684
684
|
/**
|
|
685
685
|
* Creates or updates the Submodel
|
|
686
686
|
*/
|
|
687
|
-
putSubmodelByIdAasRepositoryRaw(requestParameters: PutSubmodelByIdAasRepositoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
687
|
+
putSubmodelByIdAasRepositoryRaw(requestParameters: PutSubmodelByIdAasRepositoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Submodel>>;
|
|
688
688
|
/**
|
|
689
689
|
* Creates or updates the Submodel
|
|
690
690
|
*/
|
|
691
|
-
putSubmodelByIdAasRepository(requestParameters: PutSubmodelByIdAasRepositoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
691
|
+
putSubmodelByIdAasRepository(requestParameters: PutSubmodelByIdAasRepositoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Submodel | null | undefined>;
|
|
692
692
|
/**
|
|
693
693
|
* Creates or updates an existing submodel element at a specified path within submodel elements hierarchy
|
|
694
694
|
*/
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import * as runtime from '
|
|
12
|
+
import * as runtime from '../../runtime';
|
|
13
13
|
export interface GenerateSerializationByIdsRequest {
|
|
14
14
|
aasIds?: Array<string>;
|
|
15
15
|
submodelIds?: Array<string>;
|
|
@@ -1792,7 +1792,7 @@ export interface GetAssetAdministrationShellsResult {
|
|
|
1792
1792
|
* @type {PagedResultPagingMetadata}
|
|
1793
1793
|
* @memberof GetAssetAdministrationShellsResult
|
|
1794
1794
|
*/
|
|
1795
|
-
|
|
1795
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1796
1796
|
/**
|
|
1797
1797
|
*
|
|
1798
1798
|
* @type {Array<AssetAdministrationShell>}
|
|
@@ -1811,7 +1811,7 @@ export interface GetPathItemsResult {
|
|
|
1811
1811
|
* @type {PagedResultPagingMetadata}
|
|
1812
1812
|
* @memberof GetPathItemsResult
|
|
1813
1813
|
*/
|
|
1814
|
-
|
|
1814
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1815
1815
|
/**
|
|
1816
1816
|
*
|
|
1817
1817
|
* @type {Array<string>}
|
|
@@ -1830,7 +1830,7 @@ export interface GetReferencesResult {
|
|
|
1830
1830
|
* @type {PagedResultPagingMetadata}
|
|
1831
1831
|
* @memberof GetReferencesResult
|
|
1832
1832
|
*/
|
|
1833
|
-
|
|
1833
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1834
1834
|
/**
|
|
1835
1835
|
*
|
|
1836
1836
|
* @type {Array<Reference>}
|
|
@@ -1849,7 +1849,7 @@ export interface GetSubmodelElementsMetadataResult {
|
|
|
1849
1849
|
* @type {PagedResultPagingMetadata}
|
|
1850
1850
|
* @memberof GetSubmodelElementsMetadataResult
|
|
1851
1851
|
*/
|
|
1852
|
-
|
|
1852
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1853
1853
|
/**
|
|
1854
1854
|
*
|
|
1855
1855
|
* @type {Array<SubmodelElementMetadata>}
|
|
@@ -1868,7 +1868,7 @@ export interface GetSubmodelElementsResult {
|
|
|
1868
1868
|
* @type {PagedResultPagingMetadata}
|
|
1869
1869
|
* @memberof GetSubmodelElementsResult
|
|
1870
1870
|
*/
|
|
1871
|
-
|
|
1871
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1872
1872
|
/**
|
|
1873
1873
|
*
|
|
1874
1874
|
* @type {Array<SubmodelElement>}
|
|
@@ -1887,7 +1887,7 @@ export interface GetSubmodelElementsValueResult {
|
|
|
1887
1887
|
* @type {PagedResultPagingMetadata}
|
|
1888
1888
|
* @memberof GetSubmodelElementsValueResult
|
|
1889
1889
|
*/
|
|
1890
|
-
|
|
1890
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1891
1891
|
/**
|
|
1892
1892
|
* Since patternProperties and propertyNames are not supported by OpenApi yet, the ValueOnly serialization for this elements works with the key-attribute as the JSON-property name and the value-attribute as the corresponding value.
|
|
1893
1893
|
* @type {object}
|
|
@@ -2803,7 +2803,7 @@ export interface PagedResult {
|
|
|
2803
2803
|
* @type {PagedResultPagingMetadata}
|
|
2804
2804
|
* @memberof PagedResult
|
|
2805
2805
|
*/
|
|
2806
|
-
|
|
2806
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
2807
2807
|
}
|
|
2808
2808
|
/**
|
|
2809
2809
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../../runtime';
|
|
13
|
-
import type { PackageDescription } from '../models/index';
|
|
13
|
+
import type { GetPackageDescriptionsResult, PackageDescription } from '../models/index';
|
|
14
14
|
export interface DeleteAASXByPackageIdRequest {
|
|
15
15
|
packageId: string;
|
|
16
16
|
}
|
|
@@ -19,6 +19,8 @@ export interface GetAASXByPackageIdRequest {
|
|
|
19
19
|
}
|
|
20
20
|
export interface GetAllAASXPackageIdsRequest {
|
|
21
21
|
aasId?: string;
|
|
22
|
+
limit?: number;
|
|
23
|
+
cursor?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface PostAASXPackageRequest {
|
|
24
26
|
aasIds?: Array<string>;
|
|
@@ -54,11 +56,11 @@ export declare class AASXFileServerAPIApi extends runtime.BaseAPI {
|
|
|
54
56
|
/**
|
|
55
57
|
* Returns a list of available AASX packages at the server
|
|
56
58
|
*/
|
|
57
|
-
getAllAASXPackageIdsRaw(requestParameters: GetAllAASXPackageIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
59
|
+
getAllAASXPackageIdsRaw(requestParameters: GetAllAASXPackageIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPackageDescriptionsResult>>;
|
|
58
60
|
/**
|
|
59
61
|
* Returns a list of available AASX packages at the server
|
|
60
62
|
*/
|
|
61
|
-
getAllAASXPackageIds(requestParameters?: GetAllAASXPackageIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
63
|
+
getAllAASXPackageIds(requestParameters?: GetAllAASXPackageIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPackageDescriptionsResult>;
|
|
62
64
|
/**
|
|
63
65
|
* Stores the AASX package at the server
|
|
64
66
|
*/
|
|
@@ -71,6 +71,12 @@ export class AASXFileServerAPIApi extends runtime.BaseAPI {
|
|
|
71
71
|
if (requestParameters['aasId'] != null) {
|
|
72
72
|
queryParameters['aasId'] = requestParameters['aasId'];
|
|
73
73
|
}
|
|
74
|
+
if (requestParameters['limit'] != null) {
|
|
75
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
76
|
+
}
|
|
77
|
+
if (requestParameters['cursor'] != null) {
|
|
78
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
79
|
+
}
|
|
74
80
|
const headerParameters = {};
|
|
75
81
|
const response = await this.request({
|
|
76
82
|
path: `/packages`,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DotAAS Part 2 | HTTP/REST | AASX File Server API
|
|
3
|
+
* The AASX file server API as part of Details of the Asset Administration Shell Part 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: V1.0RC03
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../../runtime';
|
|
13
|
+
import type { ServiceDescription } from '../models/index';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare class DescriptionAPIApi extends runtime.BaseAPI {
|
|
18
|
+
/**
|
|
19
|
+
* Returns the self-describing information of a network resource (ServiceDescription)
|
|
20
|
+
*/
|
|
21
|
+
getSelfDescriptionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServiceDescription>>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the self-describing information of a network resource (ServiceDescription)
|
|
24
|
+
*/
|
|
25
|
+
getSelfDescription(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServiceDescription>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* DotAAS Part 2 | HTTP/REST | AASX File Server API
|
|
5
|
+
* The AASX file server API as part of Details of the Asset Administration Shell Part 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: V1.0RC03
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import * as runtime from '../../runtime';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export class DescriptionAPIApi extends runtime.BaseAPI {
|
|
19
|
+
/**
|
|
20
|
+
* Returns the self-describing information of a network resource (ServiceDescription)
|
|
21
|
+
*/
|
|
22
|
+
async getSelfDescriptionRaw(initOverrides) {
|
|
23
|
+
const queryParameters = {};
|
|
24
|
+
const headerParameters = {};
|
|
25
|
+
const response = await this.request({
|
|
26
|
+
path: `/description`,
|
|
27
|
+
method: 'GET',
|
|
28
|
+
headers: headerParameters,
|
|
29
|
+
query: queryParameters,
|
|
30
|
+
}, initOverrides);
|
|
31
|
+
return new runtime.JSONApiResponse(response);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns the self-describing information of a network resource (ServiceDescription)
|
|
35
|
+
*/
|
|
36
|
+
async getSelfDescription(initOverrides) {
|
|
37
|
+
const response = await this.getSelfDescriptionRaw(initOverrides);
|
|
38
|
+
return await response.value();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -40,6 +40,25 @@ export declare const MessageMessageTypeEnum: {
|
|
|
40
40
|
readonly Exception: "Exception";
|
|
41
41
|
};
|
|
42
42
|
export type MessageMessageTypeEnum = typeof MessageMessageTypeEnum[keyof typeof MessageMessageTypeEnum];
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @export
|
|
46
|
+
* @interface GetPackageDescriptionsResult
|
|
47
|
+
*/
|
|
48
|
+
export interface GetPackageDescriptionsResult {
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {PagedResultPagingMetadata}
|
|
52
|
+
* @memberof GetPackageDescriptionsResult
|
|
53
|
+
*/
|
|
54
|
+
paging_metadata?: PagedResultPagingMetadata;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Array<PackageDescription>}
|
|
58
|
+
* @memberof GetPackageDescriptionsResult
|
|
59
|
+
*/
|
|
60
|
+
result?: Array<PackageDescription>;
|
|
61
|
+
}
|
|
43
62
|
/**
|
|
44
63
|
*
|
|
45
64
|
* @export
|
|
@@ -59,6 +78,19 @@ export interface PackageDescription {
|
|
|
59
78
|
*/
|
|
60
79
|
packageId?: string;
|
|
61
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @export
|
|
84
|
+
* @interface PagedResultPagingMetadata
|
|
85
|
+
*/
|
|
86
|
+
export interface PagedResultPagingMetadata {
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {string}
|
|
90
|
+
* @memberof PagedResultPagingMetadata
|
|
91
|
+
*/
|
|
92
|
+
cursor?: string;
|
|
93
|
+
}
|
|
62
94
|
/**
|
|
63
95
|
*
|
|
64
96
|
* @export
|
|
@@ -78,3 +110,16 @@ export interface Result {
|
|
|
78
110
|
*/
|
|
79
111
|
success?: boolean;
|
|
80
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* The Description object enables servers to present their capabilities to the clients, in particular which profiles they implement. At least one defined profile is required. Additional, proprietary attributes might be included. Nevertheless, the server must not expect that a regular client understands them.
|
|
115
|
+
* @export
|
|
116
|
+
* @interface ServiceDescription
|
|
117
|
+
*/
|
|
118
|
+
export interface ServiceDescription {
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @type {Array<string>}
|
|
122
|
+
* @memberof ServiceDescription
|
|
123
|
+
*/
|
|
124
|
+
profiles?: Array<string>;
|
|
125
|
+
}
|
|
@@ -1167,7 +1167,7 @@ export interface GetConceptDescriptionsResult {
|
|
|
1167
1167
|
* @type {PagedResultPagingMetadata}
|
|
1168
1168
|
* @memberof GetConceptDescriptionsResult
|
|
1169
1169
|
*/
|
|
1170
|
-
|
|
1170
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1171
1171
|
/**
|
|
1172
1172
|
*
|
|
1173
1173
|
* @type {Array<ConceptDescription>}
|
|
@@ -1813,7 +1813,7 @@ export interface PagedResult {
|
|
|
1813
1813
|
* @type {PagedResultPagingMetadata}
|
|
1814
1814
|
* @memberof PagedResult
|
|
1815
1815
|
*/
|
|
1816
|
-
|
|
1816
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1817
1817
|
}
|
|
1818
1818
|
/**
|
|
1819
1819
|
*
|
|
@@ -352,7 +352,7 @@ export interface GetSubmodelDescriptorsResult {
|
|
|
352
352
|
* @type {PagedResultPagingMetadata}
|
|
353
353
|
* @memberof GetSubmodelDescriptorsResult
|
|
354
354
|
*/
|
|
355
|
-
|
|
355
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
356
356
|
/**
|
|
357
357
|
*
|
|
358
358
|
* @type {Array<SubmodelDescriptor>}
|
|
@@ -652,7 +652,7 @@ export interface PagedResult {
|
|
|
652
652
|
* @type {PagedResultPagingMetadata}
|
|
653
653
|
* @memberof PagedResult
|
|
654
654
|
*/
|
|
655
|
-
|
|
655
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
656
656
|
}
|
|
657
657
|
/**
|
|
658
658
|
*
|
|
@@ -1792,7 +1792,7 @@ export interface GetPathItemsResult {
|
|
|
1792
1792
|
* @type {PagedResultPagingMetadata}
|
|
1793
1793
|
* @memberof GetPathItemsResult
|
|
1794
1794
|
*/
|
|
1795
|
-
|
|
1795
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1796
1796
|
/**
|
|
1797
1797
|
*
|
|
1798
1798
|
* @type {Array<string>}
|
|
@@ -1811,7 +1811,7 @@ export interface GetReferencesResult {
|
|
|
1811
1811
|
* @type {PagedResultPagingMetadata}
|
|
1812
1812
|
* @memberof GetReferencesResult
|
|
1813
1813
|
*/
|
|
1814
|
-
|
|
1814
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1815
1815
|
/**
|
|
1816
1816
|
*
|
|
1817
1817
|
* @type {Array<Reference>}
|
|
@@ -1830,7 +1830,7 @@ export interface GetSubmodelElementsMetadataResult {
|
|
|
1830
1830
|
* @type {PagedResultPagingMetadata}
|
|
1831
1831
|
* @memberof GetSubmodelElementsMetadataResult
|
|
1832
1832
|
*/
|
|
1833
|
-
|
|
1833
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1834
1834
|
/**
|
|
1835
1835
|
*
|
|
1836
1836
|
* @type {Array<SubmodelElementMetadata>}
|
|
@@ -1849,7 +1849,7 @@ export interface GetSubmodelElementsResult {
|
|
|
1849
1849
|
* @type {PagedResultPagingMetadata}
|
|
1850
1850
|
* @memberof GetSubmodelElementsResult
|
|
1851
1851
|
*/
|
|
1852
|
-
|
|
1852
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1853
1853
|
/**
|
|
1854
1854
|
*
|
|
1855
1855
|
* @type {Array<SubmodelElement>}
|
|
@@ -1868,7 +1868,7 @@ export interface GetSubmodelElementsValueResult {
|
|
|
1868
1868
|
* @type {PagedResultPagingMetadata}
|
|
1869
1869
|
* @memberof GetSubmodelElementsValueResult
|
|
1870
1870
|
*/
|
|
1871
|
-
|
|
1871
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1872
1872
|
/**
|
|
1873
1873
|
* Since patternProperties and propertyNames are not supported by OpenApi yet, the ValueOnly serialization for this elements works with the key-attribute as the JSON-property name and the value-attribute as the corresponding value.
|
|
1874
1874
|
* @type {object}
|
|
@@ -1887,7 +1887,7 @@ export interface GetSubmodelsMetadataResult {
|
|
|
1887
1887
|
* @type {PagedResultPagingMetadata}
|
|
1888
1888
|
* @memberof GetSubmodelsMetadataResult
|
|
1889
1889
|
*/
|
|
1890
|
-
|
|
1890
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1891
1891
|
/**
|
|
1892
1892
|
*
|
|
1893
1893
|
* @type {Array<SubmodelMetadata>}
|
|
@@ -1906,7 +1906,7 @@ export interface GetSubmodelsResult {
|
|
|
1906
1906
|
* @type {PagedResultPagingMetadata}
|
|
1907
1907
|
* @memberof GetSubmodelsResult
|
|
1908
1908
|
*/
|
|
1909
|
-
|
|
1909
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1910
1910
|
/**
|
|
1911
1911
|
*
|
|
1912
1912
|
* @type {Array<Submodel>}
|
|
@@ -1925,7 +1925,7 @@ export interface GetSubmodelsValueResult {
|
|
|
1925
1925
|
* @type {PagedResultPagingMetadata}
|
|
1926
1926
|
* @memberof GetSubmodelsValueResult
|
|
1927
1927
|
*/
|
|
1928
|
-
|
|
1928
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
1929
1929
|
/**
|
|
1930
1930
|
* The ValueOnly serialization (patternProperties and propertyNames will probably be supported with OpenApi 3.1). For the full description of the generic JSON validation schema see the ValueOnly-Serialization as defined in the 'Specification of the Asset Administration Shell - Part 2'.
|
|
1931
1931
|
* @type {object}
|
|
@@ -2841,7 +2841,7 @@ export interface PagedResult {
|
|
|
2841
2841
|
* @type {PagedResultPagingMetadata}
|
|
2842
2842
|
* @memberof PagedResult
|
|
2843
2843
|
*/
|
|
2844
|
-
|
|
2844
|
+
paging_metadata: PagedResultPagingMetadata;
|
|
2845
2845
|
}
|
|
2846
2846
|
/**
|
|
2847
2847
|
*
|
|
@@ -118,6 +118,13 @@ export class BaseAPI {
|
|
|
118
118
|
}
|
|
119
119
|
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
120
120
|
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
|
121
|
+
const hasAuthorizationHeader = Object.keys(headers).some((key) => key.toLowerCase() === 'authorization');
|
|
122
|
+
if (!hasAuthorizationHeader && this.configuration.accessToken) {
|
|
123
|
+
const token = await this.configuration.accessToken();
|
|
124
|
+
if (token) {
|
|
125
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
121
128
|
const initOverrideFn = typeof initOverrides === "function"
|
|
122
129
|
? initOverrides
|
|
123
130
|
: async () => initOverrides;
|
package/dist/lib/errorHandler.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { FetchError, RequiredError, ResponseError } from '../generated/runtime';
|
|
2
|
+
function getResponseStatus(err) {
|
|
3
|
+
const response = err?.response;
|
|
4
|
+
return typeof response?.status === 'number' ? response.status : undefined;
|
|
5
|
+
}
|
|
6
|
+
function isResponseErrorLike(err) {
|
|
7
|
+
return (getResponseStatus(err) !== undefined &&
|
|
8
|
+
typeof err.response?.json === 'function');
|
|
9
|
+
}
|
|
10
|
+
function isRequiredErrorLike(err) {
|
|
11
|
+
return err instanceof RequiredError || err?.name === 'RequiredError';
|
|
12
|
+
}
|
|
2
13
|
/**
|
|
3
14
|
* Processes errors from API calls and standardizes them to a Result object
|
|
4
15
|
* with a consistent messages array following the API spec guidelines.
|
|
@@ -22,7 +33,7 @@ export async function handleApiError(err) {
|
|
|
22
33
|
text: 'Unknown error',
|
|
23
34
|
};
|
|
24
35
|
// Handle different error types
|
|
25
|
-
if (err
|
|
36
|
+
if (isRequiredErrorLike(err)) {
|
|
26
37
|
message = {
|
|
27
38
|
code: '400',
|
|
28
39
|
messageType: 'Exception',
|
|
@@ -30,7 +41,7 @@ export async function handleApiError(err) {
|
|
|
30
41
|
timestamp: timestamp,
|
|
31
42
|
};
|
|
32
43
|
}
|
|
33
|
-
else if (err instanceof ResponseError) {
|
|
44
|
+
else if (err instanceof ResponseError || isResponseErrorLike(err)) {
|
|
34
45
|
// Try to parse response body for messages
|
|
35
46
|
const responseBody = err.response;
|
|
36
47
|
try {
|
package/dist/models/api.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A union for "no-throw" style responses:
|
|
3
|
-
* Success => { success: true; data: T }
|
|
4
|
-
* Failure => { success: false; error: E }
|
|
3
|
+
* Success => { success: true; data: T; statusCode?: number }
|
|
4
|
+
* Failure => { success: false; error: E; statusCode?: number }
|
|
5
5
|
*/
|
|
6
6
|
export type ApiResult<T, E> = {
|
|
7
7
|
success: true;
|
|
8
8
|
data: T;
|
|
9
|
+
statusCode?: number;
|
|
9
10
|
} | {
|
|
10
11
|
success: false;
|
|
11
12
|
error: E;
|
|
13
|
+
statusCode?: number;
|
|
12
14
|
};
|