basyx-typescript-sdk 0.2.2 → 1.0.0

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 (143) hide show
  1. package/README.md +19 -12
  2. package/bundle/index.js +15444 -866
  3. package/bundle/index.js.map +1 -1
  4. package/dist/clients/AasDiscoveryClient.d.ts +68 -0
  5. package/dist/clients/AasDiscoveryClient.js +115 -0
  6. package/dist/clients/AasRegistryClient.d.ts +164 -0
  7. package/dist/clients/AasRegistryClient.js +287 -0
  8. package/dist/clients/AasRepositoryClient.d.ts +791 -103
  9. package/dist/clients/AasRepositoryClient.js +1323 -215
  10. package/dist/clients/AasxFileClient.d.ts +82 -0
  11. package/dist/clients/AasxFileClient.js +148 -0
  12. package/dist/clients/ConceptDescriptionRepositoryClient.d.ts +84 -0
  13. package/dist/clients/ConceptDescriptionRepositoryClient.js +143 -0
  14. package/dist/clients/SubmodelRegistryClient.d.ts +78 -0
  15. package/dist/clients/SubmodelRegistryClient.js +138 -0
  16. package/dist/clients/SubmodelRepositoryClient.d.ts +355 -0
  17. package/dist/clients/SubmodelRepositoryClient.js +585 -0
  18. package/dist/clients/index.d.ts +6 -0
  19. package/dist/clients/index.js +6 -0
  20. package/dist/generated/AasDiscoveryService/apis/AssetAdministrationShellBasicDiscoveryAPIApi.d.ts +80 -0
  21. package/dist/generated/AasDiscoveryService/apis/AssetAdministrationShellBasicDiscoveryAPIApi.js +156 -0
  22. package/dist/generated/AasDiscoveryService/apis/DescriptionAPIApi.d.ts +26 -0
  23. package/dist/generated/AasDiscoveryService/apis/DescriptionAPIApi.js +40 -0
  24. package/dist/generated/AasDiscoveryService/apis/index.d.ts +2 -0
  25. package/dist/generated/AasDiscoveryService/apis/index.js +4 -0
  26. package/dist/generated/AasDiscoveryService/index.d.ts +2 -0
  27. package/dist/generated/AasDiscoveryService/index.js +4 -0
  28. package/dist/generated/AasDiscoveryService/models/index.d.ts +297 -0
  29. package/dist/generated/AasDiscoveryService/models/index.js +48 -0
  30. package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.d.ts +139 -0
  31. package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.js +312 -0
  32. package/dist/generated/AasRegistryService/apis/DescriptionAPIApi.d.ts +26 -0
  33. package/dist/generated/AasRegistryService/apis/DescriptionAPIApi.js +40 -0
  34. package/dist/generated/AasRegistryService/apis/index.d.ts +2 -0
  35. package/dist/generated/AasRegistryService/apis/index.js +4 -0
  36. package/dist/generated/AasRegistryService/index.d.ts +2 -0
  37. package/dist/generated/AasRegistryService/index.js +4 -0
  38. package/dist/generated/AasRegistryService/models/index.d.ts +1070 -0
  39. package/dist/generated/AasRegistryService/models/index.js +151 -0
  40. package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.d.ts +870 -0
  41. package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.js +1842 -0
  42. package/dist/generated/AasRepositoryService/apis/DescriptionAPIApi.d.ts +26 -0
  43. package/dist/generated/AasRepositoryService/apis/DescriptionAPIApi.js +40 -0
  44. package/dist/generated/AasRepositoryService/apis/SerializationAPIApi.d.ts +30 -0
  45. package/dist/generated/AasRepositoryService/apis/SerializationAPIApi.js +49 -0
  46. package/dist/generated/AasRepositoryService/apis/index.d.ts +3 -0
  47. package/dist/generated/AasRepositoryService/apis/index.js +5 -0
  48. package/dist/generated/AasRepositoryService/index.d.ts +2 -0
  49. package/dist/generated/AasRepositoryService/index.js +4 -0
  50. package/dist/generated/AasRepositoryService/models/index.d.ts +4585 -0
  51. package/dist/generated/AasRepositoryService/models/index.js +221 -0
  52. package/dist/generated/AasxFileService/apis/AASXFileServerAPIApi.d.ts +78 -0
  53. package/dist/generated/AasxFileService/apis/AASXFileServerAPIApi.js +184 -0
  54. package/dist/generated/AasxFileService/apis/index.d.ts +1 -0
  55. package/dist/generated/AasxFileService/apis/index.js +3 -0
  56. package/dist/generated/AasxFileService/index.d.ts +2 -0
  57. package/dist/generated/AasxFileService/index.js +4 -0
  58. package/dist/generated/AasxFileService/models/index.d.ts +80 -0
  59. package/dist/generated/AasxFileService/models/index.js +10 -0
  60. package/dist/generated/ConceptDescriptionRepositoryService/apis/ConceptDescriptionRepositoryAPIApi.d.ts +78 -0
  61. package/dist/generated/ConceptDescriptionRepositoryService/apis/ConceptDescriptionRepositoryAPIApi.js +164 -0
  62. package/dist/generated/ConceptDescriptionRepositoryService/apis/DescriptionAPIApi.d.ts +26 -0
  63. package/dist/generated/ConceptDescriptionRepositoryService/apis/DescriptionAPIApi.js +40 -0
  64. package/dist/generated/ConceptDescriptionRepositoryService/apis/SerializationAPIApi.d.ts +30 -0
  65. package/dist/generated/ConceptDescriptionRepositoryService/apis/SerializationAPIApi.js +49 -0
  66. package/dist/generated/ConceptDescriptionRepositoryService/apis/index.d.ts +3 -0
  67. package/dist/generated/ConceptDescriptionRepositoryService/apis/index.js +5 -0
  68. package/dist/generated/ConceptDescriptionRepositoryService/index.d.ts +2 -0
  69. package/dist/generated/ConceptDescriptionRepositoryService/index.js +3 -0
  70. package/dist/generated/ConceptDescriptionRepositoryService/models/index.d.ts +2869 -0
  71. package/dist/generated/ConceptDescriptionRepositoryService/models/index.js +209 -0
  72. package/dist/generated/SubmodelRegistryService/apis/DescriptionAPIApi.d.ts +26 -0
  73. package/dist/generated/SubmodelRegistryService/apis/DescriptionAPIApi.js +40 -0
  74. package/dist/generated/SubmodelRegistryService/apis/SubmodelRegistryAPIApi.d.ts +75 -0
  75. package/dist/generated/SubmodelRegistryService/apis/SubmodelRegistryAPIApi.js +155 -0
  76. package/dist/generated/SubmodelRegistryService/apis/index.d.ts +2 -0
  77. package/dist/generated/SubmodelRegistryService/apis/index.js +4 -0
  78. package/dist/generated/SubmodelRegistryService/index.d.ts +2 -0
  79. package/dist/generated/SubmodelRegistryService/index.js +4 -0
  80. package/dist/generated/SubmodelRegistryService/models/index.d.ts +924 -0
  81. package/dist/generated/SubmodelRegistryService/models/index.js +141 -0
  82. package/dist/generated/SubmodelRepositoryService/apis/DescriptionAPIApi.d.ts +26 -0
  83. package/dist/generated/SubmodelRepositoryService/apis/DescriptionAPIApi.js +40 -0
  84. package/dist/generated/SubmodelRepositoryService/apis/SerializationAPIApi.d.ts +30 -0
  85. package/dist/generated/SubmodelRepositoryService/apis/SerializationAPIApi.js +49 -0
  86. package/dist/generated/SubmodelRepositoryService/apis/SubmodelRepositoryAPIApi.d.ts +802 -0
  87. package/dist/generated/SubmodelRepositoryService/apis/SubmodelRepositoryAPIApi.js +1572 -0
  88. package/dist/generated/SubmodelRepositoryService/apis/index.d.ts +3 -0
  89. package/dist/generated/SubmodelRepositoryService/apis/index.js +5 -0
  90. package/dist/generated/SubmodelRepositoryService/index.d.ts +2 -0
  91. package/dist/generated/SubmodelRepositoryService/index.js +4 -0
  92. package/dist/generated/SubmodelRepositoryService/models/index.d.ts +4623 -0
  93. package/dist/generated/SubmodelRepositoryService/models/index.js +221 -0
  94. package/dist/generated/index.d.ts +9 -2
  95. package/dist/generated/index.js +9 -3
  96. package/dist/generated/runtime.d.ts +181 -0
  97. package/dist/generated/runtime.js +326 -0
  98. package/dist/index.d.ts +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/lib/apiConfig.d.ts +2 -0
  101. package/dist/lib/apiConfig.js +23 -0
  102. package/dist/lib/base64Url.js +4 -0
  103. package/dist/lib/convertAasDescriptorTypes.d.ts +34 -0
  104. package/dist/lib/convertAasDescriptorTypes.js +76 -0
  105. package/dist/lib/convertAasDiscoveryTypes.d.ts +18 -0
  106. package/dist/lib/convertAasDiscoveryTypes.js +39 -0
  107. package/dist/lib/convertAasTypes.d.ts +7 -7
  108. package/dist/lib/convertAasTypes.js +5 -0
  109. package/dist/lib/convertConceptDescriptionTypes.d.ts +18 -0
  110. package/dist/lib/convertConceptDescriptionTypes.js +39 -0
  111. package/dist/lib/convertSubmodelTypes.d.ts +34 -0
  112. package/dist/lib/convertSubmodelTypes.js +69 -0
  113. package/dist/lib/descriptorJsonization.d.ts +12 -0
  114. package/dist/lib/descriptorJsonization.js +172 -0
  115. package/dist/lib/errorHandler.d.ts +9 -0
  116. package/dist/lib/errorHandler.js +94 -0
  117. package/dist/models/Descriptors.d.ts +51 -0
  118. package/dist/models/Descriptors.js +56 -0
  119. package/dist/models/index.d.ts +0 -1
  120. package/dist/models/index.js +0 -1
  121. package/dist/utils/DescriptorUtils.d.ts +9 -0
  122. package/dist/utils/DescriptorUtils.js +37 -0
  123. package/dist/utils/KeyTypesUtil.d.ts +24 -0
  124. package/dist/utils/KeyTypesUtil.js +55 -0
  125. package/dist/utils/MultiLanguagePropertyUtils.d.ts +24 -0
  126. package/dist/utils/MultiLanguagePropertyUtils.js +46 -0
  127. package/dist/utils/ReferableUtils.d.ts +69 -0
  128. package/dist/utils/ReferableUtils.js +220 -0
  129. package/dist/utils/ReferenceUtil.d.ts +9 -0
  130. package/dist/utils/ReferenceUtil.js +22 -0
  131. package/dist/utils/SemanticIdUtils.d.ts +119 -0
  132. package/dist/utils/SemanticIdUtils.js +363 -0
  133. package/package.json +14 -11
  134. package/dist/generated/schemas.gen.d.ts +0 -2357
  135. package/dist/generated/schemas.gen.js +0 -2789
  136. package/dist/generated/sdk.gen.d.ts +0 -822
  137. package/dist/generated/sdk.gen.js +0 -2225
  138. package/dist/generated/types.gen.d.ts +0 -10829
  139. package/dist/generated/types.gen.js +0 -2
  140. package/dist/lib/createAasRepoClient.d.ts +0 -9
  141. package/dist/lib/createAasRepoClient.js +0 -15
  142. package/dist/models/aas-repository.d.ts +0 -65
  143. package/dist/models/aas-repository.js +0 -1
@@ -0,0 +1,585 @@
1
+ import { SubmodelRepositoryService } from '../generated'; // Updated import
2
+ import { applyDefaults } from '../lib/apiConfig';
3
+ import { base64Encode } from '../lib/base64Url';
4
+ import { convertApiSubmodelElementToCoreSubmodelElement, convertApiSubmodelToCoreSubmodel, convertCoreSubmodelElementToApiSubmodelElement, convertCoreSubmodelToApiSubmodel, } from '../lib/convertSubmodelTypes';
5
+ import { handleApiError } from '../lib/errorHandler';
6
+ //import { SubmodelElement } from 'src/generated/SubmodelRepositoryService';
7
+ export class SubmodelRepositoryClient {
8
+ /**
9
+ * Returns all Submodels
10
+ *
11
+ * @param options Object containing:
12
+ * - configuration: The http request options
13
+ * - semanticId?: The value of the semantic id reference
14
+ * - idShort?: The Asset Administration Shell's IdShort
15
+ * - limit?: The maximum number of elements in the response array
16
+ * - cursor?: A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
17
+ * - level?: Determines the structural depth of the respective resource content
18
+ * - extent?: Determines to which extent the resource is being serialized
19
+ *
20
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
21
+ */
22
+ async getAllSubmodels(options) {
23
+ const { configuration, semanticId, idShort, limit, cursor, level, extent } = options;
24
+ try {
25
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
26
+ const encodedSemanticId = semanticId ? base64Encode(JSON.stringify(semanticId)) : undefined;
27
+ const result = await apiInstance.getAllSubmodels({
28
+ semanticId: encodedSemanticId,
29
+ idShort: idShort,
30
+ limit: limit,
31
+ cursor: cursor,
32
+ level: level,
33
+ extent: extent,
34
+ });
35
+ const submodels = (result.result ?? []).map(convertApiSubmodelToCoreSubmodel);
36
+ console.log('all submodels:', submodels);
37
+ return {
38
+ success: true,
39
+ data: { pagedResult: result.pagingMetadata, result: submodels },
40
+ };
41
+ }
42
+ catch (err) {
43
+ const customError = await handleApiError(err);
44
+ return { success: false, error: customError };
45
+ }
46
+ }
47
+ /**
48
+ * Creates a new Submodel
49
+ *
50
+ * @param options Object containing:
51
+ * - configuration: The http request options.
52
+ * - submodel: Submodel object
53
+ *
54
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
55
+ */
56
+ async postSubmodel(options) {
57
+ const { configuration, submodel } = options;
58
+ try {
59
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
60
+ const result = await apiInstance.postSubmodel({
61
+ submodel: convertCoreSubmodelToApiSubmodel(submodel),
62
+ });
63
+ return { success: true, data: convertApiSubmodelToCoreSubmodel(result) };
64
+ }
65
+ catch (err) {
66
+ const customError = await handleApiError(err);
67
+ return { success: false, error: customError };
68
+ }
69
+ }
70
+ /**
71
+ * Deletes a Submodel
72
+ *
73
+ * @param options Object containing:
74
+ * - configuration: The http request options
75
+ * - submodelIdentifier: The Submodel’s unique id
76
+ *
77
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
78
+ */
79
+ async deleteSubmodelById(options) {
80
+ const { configuration, submodelIdentifier } = options;
81
+ try {
82
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
83
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
84
+ const result = await apiInstance.deleteSubmodelById({
85
+ submodelIdentifier: encodedSubmodelIdentifier,
86
+ });
87
+ return { success: true, data: result };
88
+ }
89
+ catch (err) {
90
+ const customError = await handleApiError(err);
91
+ return { success: false, error: customError };
92
+ }
93
+ }
94
+ /**
95
+ * Returns a specific Submodel
96
+ *
97
+ * @param options Object containing:
98
+ * - configuration: The http request options
99
+ * - submodelIdentifier: The Submodel’s unique id
100
+ * - level?: Determines the structural depth of the respective resource content
101
+ * - extent?: Determines to which extent the resource is being serialized
102
+ *
103
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
104
+ */
105
+ async getSubmodelById(options) {
106
+ const { configuration, submodelIdentifier, level, extent } = options;
107
+ try {
108
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
109
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
110
+ const result = await apiInstance.getSubmodelById({
111
+ submodelIdentifier: encodedSubmodelIdentifier,
112
+ level: level,
113
+ extent: extent,
114
+ });
115
+ return { success: true, data: convertApiSubmodelToCoreSubmodel(result) };
116
+ }
117
+ catch (err) {
118
+ const customError = await handleApiError(err);
119
+ return { success: false, error: customError };
120
+ }
121
+ }
122
+ /**
123
+ * Updates an existing Submodel
124
+ *
125
+ * @param options Object containing:
126
+ * - configuration: The http request options
127
+ * - submodelIdentifier: The Submodel’s unique id
128
+ * - submodel: Submodel object
129
+ *
130
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
131
+ */
132
+ async putSubmodelById(options) {
133
+ const { configuration, submodelIdentifier, submodel } = options;
134
+ try {
135
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
136
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
137
+ const result = await apiInstance.putSubmodelById({
138
+ submodelIdentifier: encodedSubmodelIdentifier,
139
+ submodel: convertCoreSubmodelToApiSubmodel(submodel),
140
+ });
141
+ return { success: true, data: result ? convertApiSubmodelToCoreSubmodel(result) : undefined };
142
+ }
143
+ catch (err) {
144
+ const customError = await handleApiError(err);
145
+ return { success: false, error: customError };
146
+ }
147
+ }
148
+ /**
149
+ * Returns all submodel elements including their hierarchy
150
+ *
151
+ * @param options Object containing:
152
+ * - configuration: The http request options
153
+ * - submodelIdentifier: The Submodel’s unique id
154
+ * - limit?: The maximum number of elements in the response array
155
+ * - cursor?: A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
156
+ * - level?: Determines the structural depth of the respective resource content
157
+ * - extent?: Determines to which extent the resource is being serialized
158
+ *
159
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
160
+ */
161
+ async getAllSubmodelElements(options) {
162
+ const { configuration, submodelIdentifier, limit, cursor, level, extent } = options;
163
+ try {
164
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
165
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
166
+ const result = await apiInstance.getAllSubmodelElements({
167
+ submodelIdentifier: encodedSubmodelIdentifier,
168
+ limit: limit,
169
+ cursor: cursor,
170
+ level: level,
171
+ extent: extent,
172
+ });
173
+ const submodelElements = (result.result ?? []).map(convertApiSubmodelElementToCoreSubmodelElement);
174
+ console.log('all submodelElements:', submodelElements);
175
+ return {
176
+ success: true,
177
+ data: { pagedResult: result.pagingMetadata, result: submodelElements },
178
+ };
179
+ }
180
+ catch (err) {
181
+ const customError = await handleApiError(err);
182
+ return { success: false, error: customError };
183
+ }
184
+ }
185
+ /**
186
+ * Creates a new submodel element
187
+ *
188
+ * @param options Object containing:
189
+ * - configuration: The http request options
190
+ * - submodelIdentifier: The Submodel’s unique id
191
+ *
192
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
193
+ */
194
+ async postSubmodelElement(options) {
195
+ const { configuration, submodelIdentifier, submodelElement } = options;
196
+ try {
197
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
198
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
199
+ const result = await apiInstance.postSubmodelElementSubmodelRepo({
200
+ submodelIdentifier: encodedSubmodelIdentifier,
201
+ submodelElement: convertCoreSubmodelElementToApiSubmodelElement(submodelElement),
202
+ });
203
+ return { success: true, data: convertApiSubmodelElementToCoreSubmodelElement(result) };
204
+ }
205
+ catch (err) {
206
+ const customError = await handleApiError(err);
207
+ return { success: false, error: customError };
208
+ }
209
+ }
210
+ /**
211
+ * Returns a specific submodel element from the Submodel at a specified path
212
+ *
213
+ * @param options Object containing:
214
+ * - configuration: The http request options
215
+ * - submodelIdentifier: The Submodel’s unique id
216
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
217
+ * - level?: Determines the structural depth of the respective resource content
218
+ * - extent?: Determines to which extent the resource is being serialized
219
+ *
220
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
221
+ */
222
+ async getSubmodelElementByPath(options) {
223
+ const { configuration, submodelIdentifier, idShortPath, level, extent } = options;
224
+ try {
225
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
226
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
227
+ const result = await apiInstance.getSubmodelElementByPathSubmodelRepo({
228
+ submodelIdentifier: encodedSubmodelIdentifier,
229
+ idShortPath: idShortPath,
230
+ level: level,
231
+ extent: extent,
232
+ });
233
+ console.log('data:', result);
234
+ return { success: true, data: convertApiSubmodelElementToCoreSubmodelElement(result) };
235
+ }
236
+ catch (err) {
237
+ const customError = await handleApiError(err);
238
+ return { success: false, error: customError };
239
+ }
240
+ }
241
+ /**
242
+ * Creates a new submodel element at a specified path within submodel elements hierarchy
243
+ *
244
+ * @param options Object containing:
245
+ * - configuration: The http request options.
246
+ * - submodelIdentifier: The Submodel’s unique id
247
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
248
+ * - submodelElement: SubmodelElement object
249
+ *
250
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
251
+ */
252
+ async postSubmodelElementByPath(options) {
253
+ const { configuration, submodelIdentifier, idShortPath, submodelElement } = options;
254
+ try {
255
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
256
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
257
+ const result = await apiInstance.postSubmodelElementByPathSubmodelRepo({
258
+ submodelIdentifier: encodedSubmodelIdentifier,
259
+ idShortPath: idShortPath,
260
+ submodelElement: convertCoreSubmodelElementToApiSubmodelElement(submodelElement),
261
+ });
262
+ console.log('created element at specified path:', result);
263
+ return { success: true, data: convertApiSubmodelElementToCoreSubmodelElement(result) };
264
+ }
265
+ catch (err) {
266
+ const customError = await handleApiError(err);
267
+ return { success: false, error: customError };
268
+ }
269
+ }
270
+ /**
271
+ * Deletes a submodel element at a specified path within the submodel elements hierarchy
272
+ *
273
+ * @param options Object containing:
274
+ * - configuration: The http request options.
275
+ * - submodelIdentifier: The Submodel’s unique id
276
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
277
+ *
278
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
279
+ */
280
+ async deleteSubmodelElementByPath(options) {
281
+ const { configuration, submodelIdentifier, idShortPath } = options;
282
+ try {
283
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
284
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
285
+ const result = await apiInstance.deleteSubmodelElementByPathSubmodelRepo({
286
+ submodelIdentifier: encodedSubmodelIdentifier,
287
+ idShortPath: idShortPath,
288
+ });
289
+ return { success: true, data: result };
290
+ }
291
+ catch (err) {
292
+ const customError = await handleApiError(err);
293
+ return { success: false, error: customError };
294
+ }
295
+ }
296
+ /**
297
+ * Updates an existing submodel element at a specified path within submodel elements hierarchy
298
+ *
299
+ * @param options Object containing:
300
+ * - configuration: The http request options
301
+ * - submodelIdentifier: The Submodel’s unique id
302
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
303
+ * - submodelElement: SubmodelElement object
304
+ * - level?: Determines the structural depth of the respective resource content
305
+ *
306
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
307
+ */
308
+ async putSubmodelElementByPath(options) {
309
+ const { configuration, submodelIdentifier, idShortPath, submodelElement, level } = options;
310
+ try {
311
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
312
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
313
+ const result = await apiInstance.putSubmodelElementByPathSubmodelRepo({
314
+ submodelIdentifier: encodedSubmodelIdentifier,
315
+ idShortPath: idShortPath,
316
+ submodelElement: convertCoreSubmodelElementToApiSubmodelElement(submodelElement),
317
+ level: level,
318
+ });
319
+ return { success: true, data: result ? convertApiSubmodelElementToCoreSubmodelElement(result) : undefined };
320
+ }
321
+ catch (err) {
322
+ const customError = await handleApiError(err);
323
+ return { success: false, error: customError };
324
+ }
325
+ }
326
+ /**
327
+ * Returns the metadata attributes of a specific Submodel
328
+ *
329
+ * @param options Object containing:
330
+ * - configuration: The http request options
331
+ * - submodelIdentifier: The Submodel’s unique id
332
+ *
333
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
334
+ */
335
+ async getSubmodelByIdMetadata(options) {
336
+ const { configuration, submodelIdentifier } = options;
337
+ try {
338
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
339
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
340
+ const result = await apiInstance.getSubmodelByIdMetadata({
341
+ submodelIdentifier: encodedSubmodelIdentifier,
342
+ });
343
+ return { success: true, data: result };
344
+ }
345
+ catch (err) {
346
+ const customError = await handleApiError(err);
347
+ return { success: false, error: customError };
348
+ }
349
+ }
350
+ /**
351
+ * Returns a specific Submodel in the ValueOnly representation
352
+ *
353
+ * @param options Object containing:
354
+ * - configuration: The http request options
355
+ * - submodelIdentifier: The Submodel’s unique id
356
+ * - level?: Determines the structural depth of the respective resource content
357
+ * - extent?: Determines to which extent the resource is being serialized
358
+ *
359
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
360
+ */
361
+ async getSubmodelByIdValueOnly(options) {
362
+ const { configuration, submodelIdentifier, level, extent } = options;
363
+ try {
364
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
365
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
366
+ const result = await apiInstance.getSubmodelByIdValueOnly({
367
+ submodelIdentifier: encodedSubmodelIdentifier,
368
+ level: level,
369
+ extent: extent,
370
+ });
371
+ return { success: true, data: result };
372
+ }
373
+ catch (err) {
374
+ const customError = await handleApiError(err);
375
+ return { success: false, error: customError };
376
+ }
377
+ }
378
+ /**
379
+ // * Updates the values of an existing Submodel
380
+ // *
381
+ // * @param options Object containing:
382
+ // * - configuration: The http request options
383
+ // * - submodelIdentifier: The Submodel’s unique id
384
+ // * - level?: Determines the structural depth of the respective resource content
385
+ // *
386
+ // * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
387
+ // */
388
+ async patchSubmodelByIdValueOnly(options) {
389
+ const { configuration, submodelIdentifier, body, level } = options;
390
+ try {
391
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
392
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
393
+ const result = await apiInstance.patchSubmodelByIdValueOnly({
394
+ submodelIdentifier: encodedSubmodelIdentifier,
395
+ body: body,
396
+ level: level,
397
+ });
398
+ return { success: true, data: result };
399
+ }
400
+ catch (err) {
401
+ const customError = await handleApiError(err);
402
+ return { success: false, error: customError };
403
+ }
404
+ }
405
+ /**
406
+ * Returns a specific submodel element from the Submodel at a specified path in the ValueOnly representation
407
+ *
408
+ * @param options Object containing:
409
+ * - configuration: The http request options
410
+ * - submodelIdentifier: The Submodel’s unique id
411
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
412
+ * - level?: Determines the structural depth of the respective resource content
413
+ * - extent?: Determines to which extent the resource is being serialized
414
+ *
415
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
416
+ */
417
+ async getSubmodelElementByPathValueOnly(options) {
418
+ const { configuration, submodelIdentifier, idShortPath, level, extent } = options;
419
+ try {
420
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
421
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
422
+ const result = await apiInstance.getSubmodelElementByPathValueOnlySubmodelRepo({
423
+ submodelIdentifier: encodedSubmodelIdentifier,
424
+ idShortPath: idShortPath,
425
+ level: level,
426
+ extent: extent,
427
+ });
428
+ return { success: true, data: result };
429
+ }
430
+ catch (err) {
431
+ const customError = await handleApiError(err);
432
+ return { success: false, error: customError };
433
+ }
434
+ }
435
+ /**
436
+ // * Updates the value of an existing SubmodelElement
437
+ // *
438
+ // * @param options Object containing:
439
+ // * - configuration: The http request options
440
+ // * - submodelIdentifier: The Submodel’s unique id
441
+ // * - idShortPath: IdShort path to the submodel element (dot-separated)
442
+ // * - submodelElementValue: SubmodelElementValue object
443
+ // * - level?: Determines the structural depth of the respective resource content
444
+ // *
445
+ // * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
446
+ // */
447
+ async patchSubmodelElementByPathValueOnly(options) {
448
+ const { configuration, submodelIdentifier, idShortPath, submodelElementValue, level } = options;
449
+ try {
450
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
451
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
452
+ const result = await apiInstance.patchSubmodelElementByPathValueOnlySubmodelRepo({
453
+ submodelIdentifier: encodedSubmodelIdentifier,
454
+ idShortPath: idShortPath,
455
+ submodelElementValue: submodelElementValue,
456
+ level: level,
457
+ });
458
+ return { success: true, data: result };
459
+ }
460
+ catch (err) {
461
+ const customError = await handleApiError(err);
462
+ return { success: false, error: customError };
463
+ }
464
+ }
465
+ /**
466
+ * Synchronously invokes an Operation at a specified path
467
+ *
468
+ * @param options Object containing:
469
+ * - configuration: The http request options.
470
+ * - submodelIdentifier: The Submodel’s unique id
471
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
472
+ * - operationRequest: Operation request object
473
+ * - async?: Determines whether an operation invocation is performed asynchronously or synchronously
474
+ *
475
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
476
+ */
477
+ async postInvokeOperationSubmodelRepo(options) {
478
+ const { configuration, submodelIdentifier, idShortPath, operationRequest } = options;
479
+ try {
480
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
481
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
482
+ const result = await apiInstance.invokeOperationSubmodelRepo({
483
+ submodelIdentifier: encodedSubmodelIdentifier,
484
+ idShortPath: idShortPath,
485
+ operationRequest: operationRequest,
486
+ //async: async,
487
+ });
488
+ return { success: true, data: result };
489
+ }
490
+ catch (err) {
491
+ const customError = await handleApiError(err);
492
+ return { success: false, error: customError };
493
+ }
494
+ }
495
+ /**
496
+ * Synchronously invokes an Operation at a specified path
497
+ *
498
+ * @param options Object containing:
499
+ * - configuration: The http request options.
500
+ * - aasIdentifier: The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
501
+ * - submodelIdentifier: The Submodel’s unique id
502
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
503
+ * - operationRequestValueOnly: Operation request object
504
+ *
505
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
506
+ */
507
+ async postInvokeOperationValueOnly(options) {
508
+ const { configuration, aasIdentifier, submodelIdentifier, idShortPath, operationRequestValueOnly } = options;
509
+ try {
510
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
511
+ const encodedAasIdentifier = base64Encode(aasIdentifier);
512
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
513
+ const result = await apiInstance.invokeOperationValueOnly({
514
+ aasIdentifier: encodedAasIdentifier,
515
+ submodelIdentifier: encodedSubmodelIdentifier,
516
+ idShortPath: idShortPath,
517
+ operationRequestValueOnly: operationRequestValueOnly,
518
+ });
519
+ return { success: true, data: result };
520
+ }
521
+ catch (err) {
522
+ const customError = await handleApiError(err);
523
+ return { success: false, error: customError };
524
+ }
525
+ }
526
+ /**
527
+ * Asynchronously invokes an Operation at a specified path
528
+ *
529
+ * @param options Object containing:
530
+ * - configuration: The http request options.
531
+ * - submodelIdentifier: The Submodel’s unique id
532
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
533
+ * - operationRequest: Operation request object
534
+ *
535
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
536
+ */
537
+ async postInvokeOperationAsync(options) {
538
+ const { configuration, submodelIdentifier, idShortPath, operationRequest } = options;
539
+ try {
540
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
541
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
542
+ const result = await apiInstance.invokeOperationAsync({
543
+ submodelIdentifier: encodedSubmodelIdentifier,
544
+ idShortPath: idShortPath,
545
+ operationRequest: operationRequest,
546
+ });
547
+ return { success: true, data: result };
548
+ }
549
+ catch (err) {
550
+ const customError = await handleApiError(err);
551
+ return { success: false, error: customError };
552
+ }
553
+ }
554
+ /**
555
+ * Asynchronously invokes an Operation at a specified path
556
+ *
557
+ * @param options Object containing:
558
+ * - configuration: The http request options.
559
+ * - aasIdentifier: The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
560
+ * - submodelIdentifier: The Submodel’s unique id
561
+ * - idShortPath: IdShort path to the submodel element (dot-separated)
562
+ * - operationRequestValueOnly: Operation request object
563
+ *
564
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
565
+ */
566
+ async postInvokeOperationAsyncValueOnly(options) {
567
+ const { configuration, aasIdentifier, submodelIdentifier, idShortPath, operationRequestValueOnly } = options;
568
+ try {
569
+ const apiInstance = new SubmodelRepositoryService.SubmodelRepositoryAPIApi(applyDefaults(configuration));
570
+ const encodedAasIdentifier = base64Encode(aasIdentifier);
571
+ const encodedSubmodelIdentifier = base64Encode(submodelIdentifier);
572
+ const result = await apiInstance.invokeOperationAsyncValueOnly({
573
+ aasIdentifier: encodedAasIdentifier,
574
+ submodelIdentifier: encodedSubmodelIdentifier,
575
+ idShortPath: idShortPath,
576
+ operationRequestValueOnly: operationRequestValueOnly,
577
+ });
578
+ return { success: true, data: result };
579
+ }
580
+ catch (err) {
581
+ const customError = await handleApiError(err);
582
+ return { success: false, error: customError };
583
+ }
584
+ }
585
+ }
@@ -1 +1,7 @@
1
+ export { AasDiscoveryClient } from './AasDiscoveryClient';
2
+ export { AasRegistryClient } from './AasRegistryClient';
1
3
  export { AasRepositoryClient } from './AasRepositoryClient';
4
+ export { AasxFileClient } from './AasxFileClient';
5
+ export { ConceptDescriptionRepositoryClient } from './ConceptDescriptionRepositoryClient';
6
+ export { SubmodelRegistryClient } from './SubmodelRegistryClient';
7
+ export { SubmodelRepositoryClient } from './SubmodelRepositoryClient';
@@ -1 +1,7 @@
1
+ export { AasDiscoveryClient } from './AasDiscoveryClient';
2
+ export { AasRegistryClient } from './AasRegistryClient';
1
3
  export { AasRepositoryClient } from './AasRepositoryClient';
4
+ export { AasxFileClient } from './AasxFileClient';
5
+ export { ConceptDescriptionRepositoryClient } from './ConceptDescriptionRepositoryClient';
6
+ export { SubmodelRegistryClient } from './SubmodelRegistryClient';
7
+ export { SubmodelRepositoryClient } from './SubmodelRepositoryClient';
@@ -0,0 +1,80 @@
1
+ /**
2
+ * DotAAS Part 2 | HTTP/REST | Discovery Service Specification
3
+ * The entire Full Profile of the Discovery Service Specification as part of the [Specification of the Asset Administration Shell - Part 2: API](https://industrialdigitaltwin.org/en/content-hub/aasspecifications). Copyright: Industrial Digital Twin Association (IDTA) 2025
4
+ *
5
+ * The version of the OpenAPI document: V3.1.0_SSP-001
6
+ * Contact: info@idtwin.org
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 { AssetLink, InlineResponse200, SpecificAssetId } from '../models/index';
14
+ export interface DeleteAllAssetLinksByIdRequest {
15
+ aasIdentifier: string;
16
+ }
17
+ export interface GetAllAssetAdministrationShellIdsByAssetLinkRequest {
18
+ assetIds?: Array<string>;
19
+ limit?: number;
20
+ cursor?: string;
21
+ }
22
+ export interface GetAllAssetLinksByIdRequest {
23
+ aasIdentifier: string;
24
+ }
25
+ export interface PostAllAssetLinksByIdRequest {
26
+ aasIdentifier: string;
27
+ specificAssetId: Array<SpecificAssetId>;
28
+ }
29
+ export interface SearchAllAssetAdministrationShellIdsByAssetLinkRequest {
30
+ limit?: number;
31
+ cursor?: string;
32
+ assetLink?: Array<AssetLink>;
33
+ }
34
+ /**
35
+ *
36
+ */
37
+ export declare class AssetAdministrationShellBasicDiscoveryAPIApi extends runtime.BaseAPI {
38
+ /**
39
+ * Deletes specified specific asset identifiers linked to an Asset Administration Shell: discovery via these specific asset IDs shall not be supported any longer
40
+ */
41
+ deleteAllAssetLinksByIdRaw(requestParameters: DeleteAllAssetLinksByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
42
+ /**
43
+ * Deletes specified specific asset identifiers linked to an Asset Administration Shell: discovery via these specific asset IDs shall not be supported any longer
44
+ */
45
+ deleteAllAssetLinksById(requestParameters: DeleteAllAssetLinksByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
46
+ /**
47
+ * Returns a list of Asset Administration Shell IDs linked to specific asset identifiers or the global asset ID
48
+ * @deprecated
49
+ */
50
+ getAllAssetAdministrationShellIdsByAssetLinkRaw(requestParameters: GetAllAssetAdministrationShellIdsByAssetLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InlineResponse200>>;
51
+ /**
52
+ * Returns a list of Asset Administration Shell IDs linked to specific asset identifiers or the global asset ID
53
+ * @deprecated
54
+ */
55
+ getAllAssetAdministrationShellIdsByAssetLink(requestParameters?: GetAllAssetAdministrationShellIdsByAssetLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InlineResponse200>;
56
+ /**
57
+ * Returns a list of specific asset identifiers based on an Asset Administration Shell ID to edit discoverable content. The global asset ID is returned as specific asset ID with \"name\" equal to \"globalAssetId\" (see Constraint AASd-116).
58
+ */
59
+ getAllAssetLinksByIdRaw(requestParameters: GetAllAssetLinksByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SpecificAssetId>>>;
60
+ /**
61
+ * Returns a list of specific asset identifiers based on an Asset Administration Shell ID to edit discoverable content. The global asset ID is returned as specific asset ID with \"name\" equal to \"globalAssetId\" (see Constraint AASd-116).
62
+ */
63
+ getAllAssetLinksById(requestParameters: GetAllAssetLinksByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SpecificAssetId>>;
64
+ /**
65
+ * Creates specific asset identifiers linked to an Asset Administration Shell to edit discoverable content
66
+ */
67
+ postAllAssetLinksByIdRaw(requestParameters: PostAllAssetLinksByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SpecificAssetId>>>;
68
+ /**
69
+ * Creates specific asset identifiers linked to an Asset Administration Shell to edit discoverable content
70
+ */
71
+ postAllAssetLinksById(requestParameters: PostAllAssetLinksByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SpecificAssetId>>;
72
+ /**
73
+ * Returns a list of Asset Administration Shell IDs linked to specific asset identifiers or the global asset ID
74
+ */
75
+ searchAllAssetAdministrationShellIdsByAssetLinkRaw(requestParameters: SearchAllAssetAdministrationShellIdsByAssetLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InlineResponse200>>;
76
+ /**
77
+ * Returns a list of Asset Administration Shell IDs linked to specific asset identifiers or the global asset ID
78
+ */
79
+ searchAllAssetAdministrationShellIdsByAssetLink(requestParameters?: SearchAllAssetAdministrationShellIdsByAssetLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InlineResponse200>;
80
+ }