basyx-typescript-sdk 2.1.2 → 2.2.1

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.
Files changed (43) hide show
  1. package/bundle/index.cjs +7037 -2076
  2. package/bundle/index.cjs.map +1 -1
  3. package/bundle/index.mjs +7020 -2062
  4. package/bundle/index.mjs.map +1 -1
  5. package/dist/clients/AasDiscoveryClient.d.ts +31 -0
  6. package/dist/clients/AasDiscoveryClient.js +51 -0
  7. package/dist/clients/AasRegistryClient.d.ts +11 -0
  8. package/dist/clients/AasRegistryClient.js +20 -0
  9. package/dist/clients/AasRepositoryClient.d.ts +50 -0
  10. package/dist/clients/AasRepositoryClient.js +81 -0
  11. package/dist/clients/ConceptDescriptionRepositoryClient.d.ts +28 -0
  12. package/dist/clients/ConceptDescriptionRepositoryClient.js +47 -0
  13. package/dist/clients/SubmodelRegistryClient.d.ts +11 -0
  14. package/dist/clients/SubmodelRegistryClient.js +20 -0
  15. package/dist/clients/SubmodelRepositoryClient.d.ts +229 -0
  16. package/dist/clients/SubmodelRepositoryClient.js +501 -0
  17. package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.d.ts +2 -2
  18. package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.js +2 -2
  19. package/dist/generated/AasRegistryService/apis/DescriptionAPIApi.d.ts +2 -2
  20. package/dist/generated/AasRegistryService/apis/DescriptionAPIApi.js +2 -2
  21. package/dist/generated/AasRegistryService/index.d.ts +1 -0
  22. package/dist/generated/AasRegistryService/index.js +1 -0
  23. package/dist/generated/AasRegistryService/models/index.d.ts +10 -10
  24. package/dist/generated/AasRegistryService/models/index.js +1 -1
  25. package/dist/generated/AasRegistryService/runtime.d.ts +181 -0
  26. package/dist/generated/AasRegistryService/runtime.js +326 -0
  27. package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.d.ts +2 -2
  28. package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.js +2 -2
  29. package/dist/generated/AasRepositoryService/apis/DescriptionAPIApi.d.ts +2 -2
  30. package/dist/generated/AasRepositoryService/apis/DescriptionAPIApi.js +2 -2
  31. package/dist/generated/AasRepositoryService/apis/SerializationAPIApi.d.ts +2 -2
  32. package/dist/generated/AasRepositoryService/apis/SerializationAPIApi.js +2 -2
  33. package/dist/generated/AasRepositoryService/index.d.ts +1 -0
  34. package/dist/generated/AasRepositoryService/index.js +1 -0
  35. package/dist/generated/AasRepositoryService/runtime.d.ts +181 -0
  36. package/dist/generated/AasRepositoryService/runtime.js +326 -0
  37. package/dist/lib/apiConfig.d.ts +1 -2
  38. package/dist/lib/apiConfig.js +2 -3
  39. package/dist/lib/index.d.ts +1 -0
  40. package/dist/lib/index.js +2 -0
  41. package/dist/models/index.d.ts +1 -0
  42. package/dist/models/index.js +1 -0
  43. package/package.json +2 -2
@@ -65,4 +65,35 @@ export declare class AasDiscoveryClient {
65
65
  configuration: Configuration;
66
66
  aasIdentifier: string;
67
67
  }): Promise<ApiResult<Array<SpecificAssetId>, AasDiscoveryService.Result>>;
68
+ /**
69
+ * Returns a list of Asset Administration Shell IDs linked to specific asset identifiers or the global asset ID
70
+ *
71
+ * @param options Object containing:
72
+ * - configuration: The http request options
73
+ * - assetLink?: A list of specific Asset identifiers
74
+ * - limit?: The maximum number of elements in the response array
75
+ * - cursor?: A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
76
+ *
77
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
78
+ */
79
+ searchAllAssetAdministrationShellIdsByAssetLink(options: {
80
+ configuration: Configuration;
81
+ assetLink?: AssetId[];
82
+ limit?: number;
83
+ cursor?: string;
84
+ }): Promise<ApiResult<{
85
+ pagedResult: AasDiscoveryService.PagedResultPagingMetadata | undefined;
86
+ result: string[];
87
+ }, AasDiscoveryService.Result>>;
88
+ /**
89
+ * Returns the self-describing information of a network resource (ServiceDescription)
90
+ *
91
+ * @param options Object containing:
92
+ * - configuration: The http request options
93
+ *
94
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
95
+ */
96
+ getSelfDescription(options: {
97
+ configuration: Configuration;
98
+ }): Promise<ApiResult<AasDiscoveryService.ServiceDescription, AasDiscoveryService.Result>>;
68
99
  }
@@ -110,4 +110,55 @@ export class AasDiscoveryClient {
110
110
  return { success: false, error: customError };
111
111
  }
112
112
  }
113
+ /**
114
+ * Returns a list of Asset Administration Shell IDs linked to specific asset identifiers or the global asset ID
115
+ *
116
+ * @param options Object containing:
117
+ * - configuration: The http request options
118
+ * - assetLink?: A list of specific Asset identifiers
119
+ * - limit?: The maximum number of elements in the response array
120
+ * - cursor?: A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
121
+ *
122
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
123
+ */
124
+ async searchAllAssetAdministrationShellIdsByAssetLink(options) {
125
+ const { configuration, assetLink, limit, cursor } = options;
126
+ try {
127
+ const apiInstance = new AasDiscoveryService.AssetAdministrationShellBasicDiscoveryAPIApi(applyDefaults(configuration));
128
+ const result = await apiInstance.searchAllAssetAdministrationShellIdsByAssetLink({
129
+ assetLink: assetLink?.map((id) => ({ name: id.name, value: id.value })),
130
+ limit: limit,
131
+ cursor: cursor,
132
+ });
133
+ const shellIds = result.result ?? [];
134
+ return {
135
+ success: true,
136
+ data: { pagedResult: result.pagingMetadata, result: shellIds },
137
+ };
138
+ }
139
+ catch (err) {
140
+ const customError = await handleApiError(err);
141
+ return { success: false, error: customError };
142
+ }
143
+ }
144
+ /**
145
+ * Returns the self-describing information of a network resource (ServiceDescription)
146
+ *
147
+ * @param options Object containing:
148
+ * - configuration: The http request options
149
+ *
150
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
151
+ */
152
+ async getSelfDescription(options) {
153
+ const { configuration } = options;
154
+ try {
155
+ const apiInstance = new AasDiscoveryService.DescriptionAPIApi(applyDefaults(configuration));
156
+ const result = await apiInstance.getSelfDescription();
157
+ return { success: true, data: result };
158
+ }
159
+ catch (err) {
160
+ const customError = await handleApiError(err);
161
+ return { success: false, error: customError };
162
+ }
163
+ }
113
164
  }
@@ -161,4 +161,15 @@ export declare class AasRegistryClient {
161
161
  submodelIdentifier: string;
162
162
  submodelDescriptor: SubmodelDescriptor;
163
163
  }): Promise<ApiResult<SubmodelDescriptor | void, AasRegistryService.Result>>;
164
+ /**
165
+ * Returns the self-describing information of a network resource (ServiceDescription)
166
+ *
167
+ * @param options Object containing:
168
+ * - configuration: The http request options
169
+ *
170
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
171
+ */
172
+ getSelfDescription(options: {
173
+ configuration: Configuration;
174
+ }): Promise<ApiResult<AasRegistryService.ServiceDescription, AasRegistryService.Result>>;
164
175
  }
@@ -279,4 +279,24 @@ export class AasRegistryClient {
279
279
  return { success: false, error: customError };
280
280
  }
281
281
  }
282
+ /**
283
+ * Returns the self-describing information of a network resource (ServiceDescription)
284
+ *
285
+ * @param options Object containing:
286
+ * - configuration: The http request options
287
+ *
288
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
289
+ */
290
+ async getSelfDescription(options) {
291
+ const { configuration } = options;
292
+ try {
293
+ const apiInstance = new AasRegistryService.DescriptionAPIApi(applyDefaults(configuration));
294
+ const result = await apiInstance.getSelfDescription();
295
+ return { success: true, data: result };
296
+ }
297
+ catch (err) {
298
+ const customError = await handleApiError(err);
299
+ return { success: false, error: customError };
300
+ }
301
+ }
282
302
  }
@@ -26,6 +26,28 @@ export declare class AasRepositoryClient {
26
26
  pagedResult: AasRepositoryService.PagedResultPagingMetadata | undefined;
27
27
  result: AssetAdministrationShell[];
28
28
  }, AasRepositoryService.Result>>;
29
+ /**
30
+ * Returns References to all Asset Administration Shells
31
+ *
32
+ * @param options Object containing:
33
+ * - configuration: The http request options
34
+ * - assetIds?: A list of specific Asset identifiers
35
+ * - idShort?: The Asset Administration Shell’s IdShort
36
+ * - limit?: The maximum number of elements in the response array
37
+ * - cursor?: A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
38
+ *
39
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
40
+ */
41
+ getAllAssetAdministrationShellsReference(options: {
42
+ configuration: Configuration;
43
+ assetIds?: AssetId[];
44
+ idShort?: string;
45
+ limit?: number;
46
+ cursor?: string;
47
+ }): Promise<ApiResult<{
48
+ pagedResult: AasRepositoryService.PagedResultPagingMetadata | undefined;
49
+ result: Reference[];
50
+ }, AasRepositoryService.Result>>;
29
51
  /**
30
52
  * Creates a new Asset Administration Shell
31
53
  *
@@ -912,4 +934,32 @@ export declare class AasRepositoryClient {
912
934
  idShortPath: string;
913
935
  handleId: string;
914
936
  }): Promise<ApiResult<AasRepositoryService.OperationResultValueOnly, AasRepositoryService.Result>>;
937
+ /**
938
+ * Returns an appropriate serialization based on the specified format
939
+ *
940
+ * @param options Object containing:
941
+ * - configuration: The http request options
942
+ * - aasIds?: The Asset Administration Shell IDs
943
+ * - submodelIds?: The Submodel IDs
944
+ * - includeConceptDescriptions?: Include concept descriptions in the environment
945
+ *
946
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
947
+ */
948
+ generateSerializationByIds(options: {
949
+ configuration: Configuration;
950
+ aasIds?: string[];
951
+ submodelIds?: string[];
952
+ includeConceptDescriptions?: boolean;
953
+ }): Promise<ApiResult<Blob, AasRepositoryService.Result>>;
954
+ /**
955
+ * Returns the self-describing information of a network resource (ServiceDescription)
956
+ *
957
+ * @param options Object containing:
958
+ * - configuration: The http request options
959
+ *
960
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
961
+ */
962
+ getSelfDescription(options: {
963
+ configuration: Configuration;
964
+ }): Promise<ApiResult<AasRepositoryService.ServiceDescription, AasRepositoryService.Result>>;
915
965
  }
@@ -39,6 +39,40 @@ export class AasRepositoryClient {
39
39
  return { success: false, error: customError };
40
40
  }
41
41
  }
42
+ /**
43
+ * Returns References to all Asset Administration Shells
44
+ *
45
+ * @param options Object containing:
46
+ * - configuration: The http request options
47
+ * - assetIds?: A list of specific Asset identifiers
48
+ * - idShort?: The Asset Administration Shell’s IdShort
49
+ * - limit?: The maximum number of elements in the response array
50
+ * - cursor?: A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
51
+ *
52
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
53
+ */
54
+ async getAllAssetAdministrationShellsReference(options) {
55
+ const { configuration, assetIds, idShort, limit, cursor } = options;
56
+ try {
57
+ const apiInstance = new AasRepositoryService.AssetAdministrationShellRepositoryAPIApi(applyDefaults(configuration));
58
+ const encodedAssetIds = assetIds?.map((id) => base64Encode(JSON.stringify(id)));
59
+ const result = await apiInstance.getAllAssetAdministrationShellsReference({
60
+ assetIds: encodedAssetIds,
61
+ idShort: idShort,
62
+ limit: limit,
63
+ cursor: cursor,
64
+ });
65
+ const shellReferences = (result.result ?? []).map(convertApiReferenceToCoreReference);
66
+ return {
67
+ success: true,
68
+ data: { pagedResult: result.pagingMetadata, result: shellReferences },
69
+ };
70
+ }
71
+ catch (err) {
72
+ const customError = await handleApiError(err);
73
+ return { success: false, error: customError };
74
+ }
75
+ }
42
76
  /**
43
77
  * Creates a new Asset Administration Shell
44
78
  *
@@ -1519,4 +1553,51 @@ export class AasRepositoryClient {
1519
1553
  return { success: false, error: customError };
1520
1554
  }
1521
1555
  }
1556
+ /**
1557
+ * Returns an appropriate serialization based on the specified format
1558
+ *
1559
+ * @param options Object containing:
1560
+ * - configuration: The http request options
1561
+ * - aasIds?: The Asset Administration Shell IDs
1562
+ * - submodelIds?: The Submodel IDs
1563
+ * - includeConceptDescriptions?: Include concept descriptions in the environment
1564
+ *
1565
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
1566
+ */
1567
+ async generateSerializationByIds(options) {
1568
+ const { configuration, aasIds, submodelIds, includeConceptDescriptions } = options;
1569
+ try {
1570
+ const apiInstance = new AasRepositoryService.SerializationAPIApi(applyDefaults(configuration));
1571
+ const result = await apiInstance.generateSerializationByIds({
1572
+ aasIds: aasIds,
1573
+ submodelIds: submodelIds,
1574
+ includeConceptDescriptions: includeConceptDescriptions,
1575
+ });
1576
+ return { success: true, data: result };
1577
+ }
1578
+ catch (err) {
1579
+ const customError = await handleApiError(err);
1580
+ return { success: false, error: customError };
1581
+ }
1582
+ }
1583
+ /**
1584
+ * Returns the self-describing information of a network resource (ServiceDescription)
1585
+ *
1586
+ * @param options Object containing:
1587
+ * - configuration: The http request options
1588
+ *
1589
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
1590
+ */
1591
+ async getSelfDescription(options) {
1592
+ const { configuration } = options;
1593
+ try {
1594
+ const apiInstance = new AasRepositoryService.DescriptionAPIApi(applyDefaults(configuration));
1595
+ const result = await apiInstance.getSelfDescription();
1596
+ return { success: true, data: result };
1597
+ }
1598
+ catch (err) {
1599
+ const customError = await handleApiError(err);
1600
+ return { success: false, error: customError };
1601
+ }
1602
+ }
1522
1603
  }
@@ -81,4 +81,32 @@ export declare class ConceptDescriptionRepositoryClient {
81
81
  configuration: Configuration;
82
82
  conceptDescription: ConceptDescription;
83
83
  }): Promise<ApiResult<ConceptDescription, ConceptDescriptionRepositoryService.Result>>;
84
+ /**
85
+ * Returns an appropriate serialization based on the specified format
86
+ *
87
+ * @param options Object containing:
88
+ * - configuration: The http request options
89
+ * - aasIds?: The Asset Administration Shell IDs
90
+ * - submodelIds?: The Submodel IDs
91
+ * - includeConceptDescriptions?: Include concept descriptions in the environment
92
+ *
93
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
94
+ */
95
+ generateSerializationByIds(options: {
96
+ configuration: Configuration;
97
+ aasIds?: string[];
98
+ submodelIds?: string[];
99
+ includeConceptDescriptions?: boolean;
100
+ }): Promise<ApiResult<Blob, ConceptDescriptionRepositoryService.Result>>;
101
+ /**
102
+ * Returns the self-describing information of a network resource (ServiceDescription)
103
+ *
104
+ * @param options Object containing:
105
+ * - configuration: The http request options
106
+ *
107
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
108
+ */
109
+ getSelfDescription(options: {
110
+ configuration: Configuration;
111
+ }): Promise<ApiResult<ConceptDescriptionRepositoryService.ServiceDescription, ConceptDescriptionRepositoryService.Result>>;
84
112
  }
@@ -140,4 +140,51 @@ export class ConceptDescriptionRepositoryClient {
140
140
  return { success: false, error: customError };
141
141
  }
142
142
  }
143
+ /**
144
+ * Returns an appropriate serialization based on the specified format
145
+ *
146
+ * @param options Object containing:
147
+ * - configuration: The http request options
148
+ * - aasIds?: The Asset Administration Shell IDs
149
+ * - submodelIds?: The Submodel IDs
150
+ * - includeConceptDescriptions?: Include concept descriptions in the environment
151
+ *
152
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
153
+ */
154
+ async generateSerializationByIds(options) {
155
+ const { configuration, aasIds, submodelIds, includeConceptDescriptions } = options;
156
+ try {
157
+ const apiInstance = new ConceptDescriptionRepositoryService.SerializationAPIApi(applyDefaults(configuration));
158
+ const result = await apiInstance.generateSerializationByIds({
159
+ aasIds: aasIds,
160
+ submodelIds: submodelIds,
161
+ includeConceptDescriptions: includeConceptDescriptions,
162
+ });
163
+ return { success: true, data: result };
164
+ }
165
+ catch (err) {
166
+ const customError = await handleApiError(err);
167
+ return { success: false, error: customError };
168
+ }
169
+ }
170
+ /**
171
+ * Returns the self-describing information of a network resource (ServiceDescription)
172
+ *
173
+ * @param options Object containing:
174
+ * - configuration: The http request options
175
+ *
176
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
177
+ */
178
+ async getSelfDescription(options) {
179
+ const { configuration } = options;
180
+ try {
181
+ const apiInstance = new ConceptDescriptionRepositoryService.DescriptionAPIApi(applyDefaults(configuration));
182
+ const result = await apiInstance.getSelfDescription();
183
+ return { success: true, data: result };
184
+ }
185
+ catch (err) {
186
+ const customError = await handleApiError(err);
187
+ return { success: false, error: customError };
188
+ }
189
+ }
143
190
  }
@@ -75,4 +75,15 @@ export declare class SubmodelRegistryClient {
75
75
  submodelIdentifier: string;
76
76
  submodelDescriptor: SubmodelDescriptor;
77
77
  }): Promise<ApiResult<SubmodelDescriptor | void, SubmodelRegistryService.Result>>;
78
+ /**
79
+ * Returns the self-describing information of a network resource (ServiceDescription)
80
+ *
81
+ * @param options Object containing:
82
+ * - configuration: The http request options
83
+ *
84
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
85
+ */
86
+ getSelfDescription(options: {
87
+ configuration: Configuration;
88
+ }): Promise<ApiResult<SubmodelRegistryService.ServiceDescription, SubmodelRegistryService.Result>>;
78
89
  }
@@ -133,4 +133,24 @@ export class SubmodelRegistryClient {
133
133
  return { success: false, error: customError };
134
134
  }
135
135
  }
136
+ /**
137
+ * Returns the self-describing information of a network resource (ServiceDescription)
138
+ *
139
+ * @param options Object containing:
140
+ * - configuration: The http request options
141
+ *
142
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
143
+ */
144
+ async getSelfDescription(options) {
145
+ const { configuration } = options;
146
+ try {
147
+ const apiInstance = new SubmodelRegistryService.DescriptionAPIApi(applyDefaults(configuration));
148
+ const result = await apiInstance.getSelfDescription();
149
+ return { success: true, data: result };
150
+ }
151
+ catch (err) {
152
+ const customError = await handleApiError(err);
153
+ return { success: false, error: customError };
154
+ }
155
+ }
136
156
  }