basyx-typescript-sdk 2.3.0 → 2.4.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 (62) hide show
  1. package/README.md +68 -1
  2. package/bundle/index.cjs +1421 -91
  3. package/bundle/index.cjs.map +1 -1
  4. package/bundle/index.mjs +1353 -92
  5. package/bundle/index.mjs.map +1 -1
  6. package/dist/clients/AasRegistryClient.d.ts +20 -0
  7. package/dist/clients/AasRegistryClient.js +40 -0
  8. package/dist/clients/AasRepositoryClient.d.ts +20 -0
  9. package/dist/clients/AasRepositoryClient.js +40 -0
  10. package/dist/clients/ConceptDescriptionRepositoryClient.d.ts +20 -0
  11. package/dist/clients/ConceptDescriptionRepositoryClient.js +40 -0
  12. package/dist/clients/SubmodelRegistryClient.d.ts +20 -0
  13. package/dist/clients/SubmodelRegistryClient.js +40 -0
  14. package/dist/clients/SubmodelRepositoryClient.d.ts +20 -0
  15. package/dist/clients/SubmodelRepositoryClient.js +40 -0
  16. package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.d.ts +14 -1
  17. package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.js +29 -0
  18. package/dist/generated/AasRegistryService/models/index.d.ts +374 -0
  19. package/dist/generated/AasRegistryService/models/index.js +6 -0
  20. package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.d.ts +14 -1
  21. package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.js +29 -0
  22. package/dist/generated/AasRepositoryService/models/index.d.ts +381 -0
  23. package/dist/generated/AasRepositoryService/models/index.js +7 -0
  24. package/dist/generated/ConceptDescriptionRepositoryService/apis/ConceptDescriptionRepositoryAPIApi.d.ts +14 -1
  25. package/dist/generated/ConceptDescriptionRepositoryService/apis/ConceptDescriptionRepositoryAPIApi.js +29 -0
  26. package/dist/generated/ConceptDescriptionRepositoryService/models/index.d.ts +381 -0
  27. package/dist/generated/ConceptDescriptionRepositoryService/models/index.js +7 -0
  28. package/dist/generated/SubmodelRegistryService/apis/SubmodelRegistryAPIApi.d.ts +14 -1
  29. package/dist/generated/SubmodelRegistryService/apis/SubmodelRegistryAPIApi.js +29 -0
  30. package/dist/generated/SubmodelRegistryService/models/index.d.ts +381 -0
  31. package/dist/generated/SubmodelRegistryService/models/index.js +7 -0
  32. package/dist/generated/SubmodelRepositoryService/apis/SubmodelRepositoryAPIApi.d.ts +14 -1
  33. package/dist/generated/SubmodelRepositoryService/apis/SubmodelRepositoryAPIApi.js +29 -0
  34. package/dist/generated/SubmodelRepositoryService/models/index.d.ts +381 -0
  35. package/dist/generated/SubmodelRepositoryService/models/index.js +7 -0
  36. package/dist/lib/endpointConfiguration.d.ts +71 -0
  37. package/dist/lib/endpointConfiguration.js +101 -0
  38. package/dist/lib/errorHandler.js +9 -4
  39. package/dist/lib/index.d.ts +1 -0
  40. package/dist/lib/index.js +2 -0
  41. package/dist/lib/queryJsonization.d.ts +17 -0
  42. package/dist/lib/queryJsonization.js +309 -0
  43. package/dist/lib/queryRequests.d.ts +24 -0
  44. package/dist/lib/queryRequests.js +44 -0
  45. package/dist/models/Query.d.ts +378 -0
  46. package/dist/models/Query.js +430 -0
  47. package/dist/models/QueryResult.d.ts +22 -0
  48. package/dist/models/QueryResult.js +1 -0
  49. package/dist/models/index.d.ts +2 -0
  50. package/dist/models/index.js +2 -0
  51. package/dist/services/AasService.d.ts +15 -4
  52. package/dist/services/AasService.js +38 -40
  53. package/dist/services/SubmodelService.d.ts +9 -8
  54. package/dist/services/SubmodelService.js +17 -34
  55. package/dist/services/index.d.ts +1 -0
  56. package/dist/utils/DescriptorUtils.d.ts +27 -1
  57. package/dist/utils/DescriptorUtils.js +65 -27
  58. package/dist/utils/ServiceDescriptionUtils.d.ts +30 -0
  59. package/dist/utils/ServiceDescriptionUtils.js +43 -0
  60. package/dist/utils/index.d.ts +2 -0
  61. package/dist/utils/index.js +2 -0
  62. package/package.json +1 -1
@@ -2184,6 +2184,182 @@ export interface LevelType {
2184
2184
  */
2185
2185
  max: boolean;
2186
2186
  }
2187
+ /**
2188
+ *
2189
+ * @export
2190
+ * @interface LogicalExpression
2191
+ */
2192
+ export interface LogicalExpression {
2193
+ /**
2194
+ *
2195
+ * @type {Array<LogicalExpression>}
2196
+ * @memberof LogicalExpression
2197
+ */
2198
+ $and?: Array<LogicalExpression>;
2199
+ /**
2200
+ *
2201
+ * @type {Array<MatchExpression>}
2202
+ * @memberof LogicalExpression
2203
+ */
2204
+ $match?: Array<MatchExpression>;
2205
+ /**
2206
+ *
2207
+ * @type {Array<LogicalExpression>}
2208
+ * @memberof LogicalExpression
2209
+ */
2210
+ $or?: Array<LogicalExpression>;
2211
+ /**
2212
+ *
2213
+ * @type {LogicalExpression}
2214
+ * @memberof LogicalExpression
2215
+ */
2216
+ $not?: LogicalExpression | null;
2217
+ /**
2218
+ *
2219
+ * @type {Array<Value>}
2220
+ * @memberof LogicalExpression
2221
+ */
2222
+ $eq?: Array<Value>;
2223
+ /**
2224
+ *
2225
+ * @type {Array<Value>}
2226
+ * @memberof LogicalExpression
2227
+ */
2228
+ $ne?: Array<Value>;
2229
+ /**
2230
+ *
2231
+ * @type {Array<Value>}
2232
+ * @memberof LogicalExpression
2233
+ */
2234
+ $gt?: Array<Value>;
2235
+ /**
2236
+ *
2237
+ * @type {Array<Value>}
2238
+ * @memberof LogicalExpression
2239
+ */
2240
+ $ge?: Array<Value>;
2241
+ /**
2242
+ *
2243
+ * @type {Array<Value>}
2244
+ * @memberof LogicalExpression
2245
+ */
2246
+ $lt?: Array<Value>;
2247
+ /**
2248
+ *
2249
+ * @type {Array<Value>}
2250
+ * @memberof LogicalExpression
2251
+ */
2252
+ $le?: Array<Value>;
2253
+ /**
2254
+ *
2255
+ * @type {Array<StringValue>}
2256
+ * @memberof LogicalExpression
2257
+ */
2258
+ $contains?: Array<StringValue>;
2259
+ /**
2260
+ *
2261
+ * @type {Array<StringValue>}
2262
+ * @memberof LogicalExpression
2263
+ */
2264
+ '$starts-with'?: Array<StringValue>;
2265
+ /**
2266
+ *
2267
+ * @type {Array<StringValue>}
2268
+ * @memberof LogicalExpression
2269
+ */
2270
+ '$ends-with'?: Array<StringValue>;
2271
+ /**
2272
+ *
2273
+ * @type {Array<StringValue>}
2274
+ * @memberof LogicalExpression
2275
+ */
2276
+ $regex?: Array<StringValue>;
2277
+ /**
2278
+ *
2279
+ * @type {boolean}
2280
+ * @memberof LogicalExpression
2281
+ */
2282
+ $boolean?: boolean;
2283
+ }
2284
+ /**
2285
+ *
2286
+ * @export
2287
+ * @interface MatchExpression
2288
+ */
2289
+ export interface MatchExpression {
2290
+ /**
2291
+ *
2292
+ * @type {Array<MatchExpression>}
2293
+ * @memberof MatchExpression
2294
+ */
2295
+ $match?: Array<MatchExpression>;
2296
+ /**
2297
+ *
2298
+ * @type {Array<Value>}
2299
+ * @memberof MatchExpression
2300
+ */
2301
+ $eq?: Array<Value>;
2302
+ /**
2303
+ *
2304
+ * @type {Array<Value>}
2305
+ * @memberof MatchExpression
2306
+ */
2307
+ $ne?: Array<Value>;
2308
+ /**
2309
+ *
2310
+ * @type {Array<Value>}
2311
+ * @memberof MatchExpression
2312
+ */
2313
+ $gt?: Array<Value>;
2314
+ /**
2315
+ *
2316
+ * @type {Array<Value>}
2317
+ * @memberof MatchExpression
2318
+ */
2319
+ $ge?: Array<Value>;
2320
+ /**
2321
+ *
2322
+ * @type {Array<Value>}
2323
+ * @memberof MatchExpression
2324
+ */
2325
+ $lt?: Array<Value>;
2326
+ /**
2327
+ *
2328
+ * @type {Array<Value>}
2329
+ * @memberof MatchExpression
2330
+ */
2331
+ $le?: Array<Value>;
2332
+ /**
2333
+ *
2334
+ * @type {Array<StringValue>}
2335
+ * @memberof MatchExpression
2336
+ */
2337
+ $contains?: Array<StringValue>;
2338
+ /**
2339
+ *
2340
+ * @type {Array<StringValue>}
2341
+ * @memberof MatchExpression
2342
+ */
2343
+ '$starts-with'?: Array<StringValue>;
2344
+ /**
2345
+ *
2346
+ * @type {Array<StringValue>}
2347
+ * @memberof MatchExpression
2348
+ */
2349
+ '$ends-with'?: Array<StringValue>;
2350
+ /**
2351
+ *
2352
+ * @type {Array<StringValue>}
2353
+ * @memberof MatchExpression
2354
+ */
2355
+ $regex?: Array<StringValue>;
2356
+ /**
2357
+ *
2358
+ * @type {boolean}
2359
+ * @memberof MatchExpression
2360
+ */
2361
+ $boolean?: boolean;
2362
+ }
2187
2363
  /**
2188
2364
  *
2189
2365
  * @export
@@ -3066,6 +3242,77 @@ export declare const QualifierKind: {
3066
3242
  readonly ValueQualifier: "ValueQualifier";
3067
3243
  };
3068
3244
  export type QualifierKind = typeof QualifierKind[keyof typeof QualifierKind];
3245
+ /**
3246
+ *
3247
+ * @export
3248
+ * @interface Query
3249
+ */
3250
+ export interface Query {
3251
+ /**
3252
+ *
3253
+ * @type {string}
3254
+ * @memberof Query
3255
+ */
3256
+ $select?: string;
3257
+ /**
3258
+ *
3259
+ * @type {LogicalExpression}
3260
+ * @memberof Query
3261
+ */
3262
+ $condition: LogicalExpression | null;
3263
+ }
3264
+ /**
3265
+ *
3266
+ * @export
3267
+ * @interface QueryResultAssetAdministrationShell
3268
+ */
3269
+ export interface QueryResultAssetAdministrationShell {
3270
+ /**
3271
+ *
3272
+ * @type {QueryResultAssetAdministrationShellPagingMetadata}
3273
+ * @memberof QueryResultAssetAdministrationShell
3274
+ */
3275
+ paging_metadata?: QueryResultAssetAdministrationShellPagingMetadata;
3276
+ /**
3277
+ *
3278
+ * @type {Array<QueryResultAssetAdministrationShellResultInner>}
3279
+ * @memberof QueryResultAssetAdministrationShell
3280
+ */
3281
+ result?: Array<QueryResultAssetAdministrationShellResultInner>;
3282
+ }
3283
+ /**
3284
+ *
3285
+ * @export
3286
+ * @interface QueryResultAssetAdministrationShellPagingMetadata
3287
+ */
3288
+ export interface QueryResultAssetAdministrationShellPagingMetadata {
3289
+ /**
3290
+ *
3291
+ * @type {string}
3292
+ * @memberof QueryResultAssetAdministrationShellPagingMetadata
3293
+ */
3294
+ cursor?: string;
3295
+ /**
3296
+ *
3297
+ * @type {string}
3298
+ * @memberof QueryResultAssetAdministrationShellPagingMetadata
3299
+ */
3300
+ resultType?: QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum;
3301
+ }
3302
+ /**
3303
+ * @export
3304
+ */
3305
+ export declare const QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum: {
3306
+ readonly AssetAdministrationShell: "AssetAdministrationShell";
3307
+ readonly Identifier: "Identifier";
3308
+ };
3309
+ export type QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum = typeof QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum[keyof typeof QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum];
3310
+ /**
3311
+ * @type QueryResultAssetAdministrationShellResultInner
3312
+ *
3313
+ * @export
3314
+ */
3315
+ export type QueryResultAssetAdministrationShellResultInner = AssetAdministrationShell | string;
3069
3316
  /**
3070
3317
  *
3071
3318
  * @export
@@ -3877,6 +4124,31 @@ export declare const StateOfEvent: {
3877
4124
  readonly On: "on";
3878
4125
  };
3879
4126
  export type StateOfEvent = typeof StateOfEvent[keyof typeof StateOfEvent];
4127
+ /**
4128
+ *
4129
+ * @export
4130
+ * @interface StringValue
4131
+ */
4132
+ export interface StringValue {
4133
+ /**
4134
+ *
4135
+ * @type {string}
4136
+ * @memberof StringValue
4137
+ */
4138
+ $field?: string;
4139
+ /**
4140
+ *
4141
+ * @type {string}
4142
+ * @memberof StringValue
4143
+ */
4144
+ $strVal?: string;
4145
+ /**
4146
+ *
4147
+ * @type {Value}
4148
+ * @memberof StringValue
4149
+ */
4150
+ $strCast?: Value | null;
4151
+ }
3880
4152
  /**
3881
4153
  *
3882
4154
  * @export
@@ -4551,6 +4823,115 @@ export interface SubmodelMetadata {
4551
4823
  */
4552
4824
  kind?: ModellingKind;
4553
4825
  }
4826
+ /**
4827
+ *
4828
+ * @export
4829
+ * @interface Value
4830
+ */
4831
+ export interface Value {
4832
+ /**
4833
+ *
4834
+ * @type {string}
4835
+ * @memberof Value
4836
+ */
4837
+ $field?: string;
4838
+ /**
4839
+ *
4840
+ * @type {string}
4841
+ * @memberof Value
4842
+ */
4843
+ $strVal?: string;
4844
+ /**
4845
+ *
4846
+ * @type {number}
4847
+ * @memberof Value
4848
+ */
4849
+ $numVal?: number;
4850
+ /**
4851
+ *
4852
+ * @type {string}
4853
+ * @memberof Value
4854
+ */
4855
+ $hexVal?: string;
4856
+ /**
4857
+ *
4858
+ * @type {string}
4859
+ * @memberof Value
4860
+ */
4861
+ $dateTimeVal?: string;
4862
+ /**
4863
+ *
4864
+ * @type {string}
4865
+ * @memberof Value
4866
+ */
4867
+ $timeVal?: string;
4868
+ /**
4869
+ *
4870
+ * @type {boolean}
4871
+ * @memberof Value
4872
+ */
4873
+ $boolean?: boolean;
4874
+ /**
4875
+ *
4876
+ * @type {Value}
4877
+ * @memberof Value
4878
+ */
4879
+ $strCast?: Value | null;
4880
+ /**
4881
+ *
4882
+ * @type {Value}
4883
+ * @memberof Value
4884
+ */
4885
+ $numCast?: Value | null;
4886
+ /**
4887
+ *
4888
+ * @type {Value}
4889
+ * @memberof Value
4890
+ */
4891
+ $hexCast?: Value | null;
4892
+ /**
4893
+ *
4894
+ * @type {Value}
4895
+ * @memberof Value
4896
+ */
4897
+ $boolCast?: Value | null;
4898
+ /**
4899
+ *
4900
+ * @type {Value}
4901
+ * @memberof Value
4902
+ */
4903
+ $dateTimeCast?: Value | null;
4904
+ /**
4905
+ *
4906
+ * @type {Value}
4907
+ * @memberof Value
4908
+ */
4909
+ $timeCast?: Value | null;
4910
+ /**
4911
+ *
4912
+ * @type {string}
4913
+ * @memberof Value
4914
+ */
4915
+ $dayOfWeek?: string;
4916
+ /**
4917
+ *
4918
+ * @type {string}
4919
+ * @memberof Value
4920
+ */
4921
+ $dayOfMonth?: string;
4922
+ /**
4923
+ *
4924
+ * @type {string}
4925
+ * @memberof Value
4926
+ */
4927
+ $month?: string;
4928
+ /**
4929
+ *
4930
+ * @type {string}
4931
+ * @memberof Value
4932
+ */
4933
+ $year?: string;
4934
+ }
4554
4935
  /**
4555
4936
  *
4556
4937
  * @export
@@ -203,6 +203,13 @@ export const QualifierKind = {
203
203
  TemplateQualifier: 'TemplateQualifier',
204
204
  ValueQualifier: 'ValueQualifier'
205
205
  };
206
+ /**
207
+ * @export
208
+ */
209
+ export const QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum = {
210
+ AssetAdministrationShell: 'AssetAdministrationShell',
211
+ Identifier: 'Identifier'
212
+ };
206
213
  /**
207
214
  *
208
215
  * @export
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../../runtime';
13
- import type { ConceptDescription, GetConceptDescriptionsResult } from '../models/index';
13
+ import type { ConceptDescription, GetConceptDescriptionsResult, Query, QueryResultConceptDescription } from '../models/index';
14
14
  export interface DeleteConceptDescriptionByIdRequest {
15
15
  cdIdentifier: string;
16
16
  }
@@ -31,6 +31,11 @@ export interface PutConceptDescriptionByIdRequest {
31
31
  cdIdentifier: string;
32
32
  conceptDescription: ConceptDescription;
33
33
  }
34
+ export interface QueryConceptDescriptionsRequest {
35
+ limit?: number;
36
+ cursor?: string;
37
+ query?: Query;
38
+ }
34
39
  /**
35
40
  *
36
41
  */
@@ -75,4 +80,12 @@ export declare class ConceptDescriptionRepositoryAPIApi extends runtime.BaseAPI
75
80
  * Creates or updates an existing Concept Description
76
81
  */
77
82
  putConceptDescriptionById(requestParameters: PutConceptDescriptionByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConceptDescription | null | undefined>;
83
+ /**
84
+ * Returns all Concept Descriptions that confirm to the input query
85
+ */
86
+ queryConceptDescriptionsRaw(requestParameters: QueryConceptDescriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QueryResultConceptDescription>>;
87
+ /**
88
+ * Returns all Concept Descriptions that confirm to the input query
89
+ */
90
+ queryConceptDescriptions(requestParameters?: QueryConceptDescriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QueryResultConceptDescription>;
78
91
  }
@@ -161,4 +161,33 @@ export class ConceptDescriptionRepositoryAPIApi extends runtime.BaseAPI {
161
161
  return await response.value();
162
162
  }
163
163
  }
164
+ /**
165
+ * Returns all Concept Descriptions that confirm to the input query
166
+ */
167
+ async queryConceptDescriptionsRaw(requestParameters, initOverrides) {
168
+ const queryParameters = {};
169
+ if (requestParameters['limit'] != null) {
170
+ queryParameters['limit'] = requestParameters['limit'];
171
+ }
172
+ if (requestParameters['cursor'] != null) {
173
+ queryParameters['cursor'] = requestParameters['cursor'];
174
+ }
175
+ const headerParameters = {};
176
+ headerParameters['Content-Type'] = 'application/json';
177
+ const response = await this.request({
178
+ path: `/query/concept-descriptions`,
179
+ method: 'POST',
180
+ headers: headerParameters,
181
+ query: queryParameters,
182
+ body: requestParameters['query'],
183
+ }, initOverrides);
184
+ return new runtime.JSONApiResponse(response);
185
+ }
186
+ /**
187
+ * Returns all Concept Descriptions that confirm to the input query
188
+ */
189
+ async queryConceptDescriptions(requestParameters = {}, initOverrides) {
190
+ const response = await this.queryConceptDescriptionsRaw(requestParameters, initOverrides);
191
+ return await response.value();
192
+ }
164
193
  }