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
@@ -1464,6 +1464,182 @@ export interface LevelType {
1464
1464
  */
1465
1465
  max: boolean;
1466
1466
  }
1467
+ /**
1468
+ *
1469
+ * @export
1470
+ * @interface LogicalExpression
1471
+ */
1472
+ export interface LogicalExpression {
1473
+ /**
1474
+ *
1475
+ * @type {Array<LogicalExpression>}
1476
+ * @memberof LogicalExpression
1477
+ */
1478
+ $and?: Array<LogicalExpression>;
1479
+ /**
1480
+ *
1481
+ * @type {Array<MatchExpression>}
1482
+ * @memberof LogicalExpression
1483
+ */
1484
+ $match?: Array<MatchExpression>;
1485
+ /**
1486
+ *
1487
+ * @type {Array<LogicalExpression>}
1488
+ * @memberof LogicalExpression
1489
+ */
1490
+ $or?: Array<LogicalExpression>;
1491
+ /**
1492
+ *
1493
+ * @type {LogicalExpression}
1494
+ * @memberof LogicalExpression
1495
+ */
1496
+ $not?: LogicalExpression | null;
1497
+ /**
1498
+ *
1499
+ * @type {Array<Value>}
1500
+ * @memberof LogicalExpression
1501
+ */
1502
+ $eq?: Array<Value>;
1503
+ /**
1504
+ *
1505
+ * @type {Array<Value>}
1506
+ * @memberof LogicalExpression
1507
+ */
1508
+ $ne?: Array<Value>;
1509
+ /**
1510
+ *
1511
+ * @type {Array<Value>}
1512
+ * @memberof LogicalExpression
1513
+ */
1514
+ $gt?: Array<Value>;
1515
+ /**
1516
+ *
1517
+ * @type {Array<Value>}
1518
+ * @memberof LogicalExpression
1519
+ */
1520
+ $ge?: Array<Value>;
1521
+ /**
1522
+ *
1523
+ * @type {Array<Value>}
1524
+ * @memberof LogicalExpression
1525
+ */
1526
+ $lt?: Array<Value>;
1527
+ /**
1528
+ *
1529
+ * @type {Array<Value>}
1530
+ * @memberof LogicalExpression
1531
+ */
1532
+ $le?: Array<Value>;
1533
+ /**
1534
+ *
1535
+ * @type {Array<StringValue>}
1536
+ * @memberof LogicalExpression
1537
+ */
1538
+ $contains?: Array<StringValue>;
1539
+ /**
1540
+ *
1541
+ * @type {Array<StringValue>}
1542
+ * @memberof LogicalExpression
1543
+ */
1544
+ '$starts-with'?: Array<StringValue>;
1545
+ /**
1546
+ *
1547
+ * @type {Array<StringValue>}
1548
+ * @memberof LogicalExpression
1549
+ */
1550
+ '$ends-with'?: Array<StringValue>;
1551
+ /**
1552
+ *
1553
+ * @type {Array<StringValue>}
1554
+ * @memberof LogicalExpression
1555
+ */
1556
+ $regex?: Array<StringValue>;
1557
+ /**
1558
+ *
1559
+ * @type {boolean}
1560
+ * @memberof LogicalExpression
1561
+ */
1562
+ $boolean?: boolean;
1563
+ }
1564
+ /**
1565
+ *
1566
+ * @export
1567
+ * @interface MatchExpression
1568
+ */
1569
+ export interface MatchExpression {
1570
+ /**
1571
+ *
1572
+ * @type {Array<MatchExpression>}
1573
+ * @memberof MatchExpression
1574
+ */
1575
+ $match?: Array<MatchExpression>;
1576
+ /**
1577
+ *
1578
+ * @type {Array<Value>}
1579
+ * @memberof MatchExpression
1580
+ */
1581
+ $eq?: Array<Value>;
1582
+ /**
1583
+ *
1584
+ * @type {Array<Value>}
1585
+ * @memberof MatchExpression
1586
+ */
1587
+ $ne?: Array<Value>;
1588
+ /**
1589
+ *
1590
+ * @type {Array<Value>}
1591
+ * @memberof MatchExpression
1592
+ */
1593
+ $gt?: Array<Value>;
1594
+ /**
1595
+ *
1596
+ * @type {Array<Value>}
1597
+ * @memberof MatchExpression
1598
+ */
1599
+ $ge?: Array<Value>;
1600
+ /**
1601
+ *
1602
+ * @type {Array<Value>}
1603
+ * @memberof MatchExpression
1604
+ */
1605
+ $lt?: Array<Value>;
1606
+ /**
1607
+ *
1608
+ * @type {Array<Value>}
1609
+ * @memberof MatchExpression
1610
+ */
1611
+ $le?: Array<Value>;
1612
+ /**
1613
+ *
1614
+ * @type {Array<StringValue>}
1615
+ * @memberof MatchExpression
1616
+ */
1617
+ $contains?: Array<StringValue>;
1618
+ /**
1619
+ *
1620
+ * @type {Array<StringValue>}
1621
+ * @memberof MatchExpression
1622
+ */
1623
+ '$starts-with'?: Array<StringValue>;
1624
+ /**
1625
+ *
1626
+ * @type {Array<StringValue>}
1627
+ * @memberof MatchExpression
1628
+ */
1629
+ '$ends-with'?: Array<StringValue>;
1630
+ /**
1631
+ *
1632
+ * @type {Array<StringValue>}
1633
+ * @memberof MatchExpression
1634
+ */
1635
+ $regex?: Array<StringValue>;
1636
+ /**
1637
+ *
1638
+ * @type {boolean}
1639
+ * @memberof MatchExpression
1640
+ */
1641
+ $boolean?: boolean;
1642
+ }
1467
1643
  /**
1468
1644
  *
1469
1645
  * @export
@@ -1991,6 +2167,77 @@ export declare const QualifierKind: {
1991
2167
  readonly ValueQualifier: "ValueQualifier";
1992
2168
  };
1993
2169
  export type QualifierKind = typeof QualifierKind[keyof typeof QualifierKind];
2170
+ /**
2171
+ *
2172
+ * @export
2173
+ * @interface Query
2174
+ */
2175
+ export interface Query {
2176
+ /**
2177
+ *
2178
+ * @type {string}
2179
+ * @memberof Query
2180
+ */
2181
+ $select?: string;
2182
+ /**
2183
+ *
2184
+ * @type {LogicalExpression}
2185
+ * @memberof Query
2186
+ */
2187
+ $condition: LogicalExpression | null;
2188
+ }
2189
+ /**
2190
+ *
2191
+ * @export
2192
+ * @interface QueryResultConceptDescription
2193
+ */
2194
+ export interface QueryResultConceptDescription {
2195
+ /**
2196
+ *
2197
+ * @type {QueryResultConceptDescriptionPagingMetadata}
2198
+ * @memberof QueryResultConceptDescription
2199
+ */
2200
+ paging_metadata: QueryResultConceptDescriptionPagingMetadata;
2201
+ /**
2202
+ *
2203
+ * @type {Array<QueryResultConceptDescriptionResultInner>}
2204
+ * @memberof QueryResultConceptDescription
2205
+ */
2206
+ result?: Array<QueryResultConceptDescriptionResultInner>;
2207
+ }
2208
+ /**
2209
+ *
2210
+ * @export
2211
+ * @interface QueryResultConceptDescriptionPagingMetadata
2212
+ */
2213
+ export interface QueryResultConceptDescriptionPagingMetadata {
2214
+ /**
2215
+ *
2216
+ * @type {string}
2217
+ * @memberof QueryResultConceptDescriptionPagingMetadata
2218
+ */
2219
+ cursor?: string;
2220
+ /**
2221
+ *
2222
+ * @type {string}
2223
+ * @memberof QueryResultConceptDescriptionPagingMetadata
2224
+ */
2225
+ resultType?: QueryResultConceptDescriptionPagingMetadataResultTypeEnum;
2226
+ }
2227
+ /**
2228
+ * @export
2229
+ */
2230
+ export declare const QueryResultConceptDescriptionPagingMetadataResultTypeEnum: {
2231
+ readonly ConceptDescription: "ConceptDescription";
2232
+ readonly Identifier: "Identifier";
2233
+ };
2234
+ export type QueryResultConceptDescriptionPagingMetadataResultTypeEnum = typeof QueryResultConceptDescriptionPagingMetadataResultTypeEnum[keyof typeof QueryResultConceptDescriptionPagingMetadataResultTypeEnum];
2235
+ /**
2236
+ * @type QueryResultConceptDescriptionResultInner
2237
+ *
2238
+ * @export
2239
+ */
2240
+ export type QueryResultConceptDescriptionResultInner = ConceptDescription | string;
1994
2241
  /**
1995
2242
  *
1996
2243
  * @export
@@ -2501,6 +2748,31 @@ export declare const StateOfEvent: {
2501
2748
  readonly On: "on";
2502
2749
  };
2503
2750
  export type StateOfEvent = typeof StateOfEvent[keyof typeof StateOfEvent];
2751
+ /**
2752
+ *
2753
+ * @export
2754
+ * @interface StringValue
2755
+ */
2756
+ export interface StringValue {
2757
+ /**
2758
+ *
2759
+ * @type {string}
2760
+ * @memberof StringValue
2761
+ */
2762
+ $field?: string;
2763
+ /**
2764
+ *
2765
+ * @type {string}
2766
+ * @memberof StringValue
2767
+ */
2768
+ $strVal?: string;
2769
+ /**
2770
+ *
2771
+ * @type {Value}
2772
+ * @memberof StringValue
2773
+ */
2774
+ $strCast?: Value | null;
2775
+ }
2504
2776
  /**
2505
2777
  *
2506
2778
  * @export
@@ -2835,6 +3107,115 @@ export interface SubmodelElementList {
2835
3107
  */
2836
3108
  value?: Array<SubmodelElementChoice>;
2837
3109
  }
3110
+ /**
3111
+ *
3112
+ * @export
3113
+ * @interface Value
3114
+ */
3115
+ export interface Value {
3116
+ /**
3117
+ *
3118
+ * @type {string}
3119
+ * @memberof Value
3120
+ */
3121
+ $field?: string;
3122
+ /**
3123
+ *
3124
+ * @type {string}
3125
+ * @memberof Value
3126
+ */
3127
+ $strVal?: string;
3128
+ /**
3129
+ *
3130
+ * @type {number}
3131
+ * @memberof Value
3132
+ */
3133
+ $numVal?: number;
3134
+ /**
3135
+ *
3136
+ * @type {string}
3137
+ * @memberof Value
3138
+ */
3139
+ $hexVal?: string;
3140
+ /**
3141
+ *
3142
+ * @type {string}
3143
+ * @memberof Value
3144
+ */
3145
+ $dateTimeVal?: string;
3146
+ /**
3147
+ *
3148
+ * @type {string}
3149
+ * @memberof Value
3150
+ */
3151
+ $timeVal?: string;
3152
+ /**
3153
+ *
3154
+ * @type {boolean}
3155
+ * @memberof Value
3156
+ */
3157
+ $boolean?: boolean;
3158
+ /**
3159
+ *
3160
+ * @type {Value}
3161
+ * @memberof Value
3162
+ */
3163
+ $strCast?: Value | null;
3164
+ /**
3165
+ *
3166
+ * @type {Value}
3167
+ * @memberof Value
3168
+ */
3169
+ $numCast?: Value | null;
3170
+ /**
3171
+ *
3172
+ * @type {Value}
3173
+ * @memberof Value
3174
+ */
3175
+ $hexCast?: Value | null;
3176
+ /**
3177
+ *
3178
+ * @type {Value}
3179
+ * @memberof Value
3180
+ */
3181
+ $boolCast?: Value | null;
3182
+ /**
3183
+ *
3184
+ * @type {Value}
3185
+ * @memberof Value
3186
+ */
3187
+ $dateTimeCast?: Value | null;
3188
+ /**
3189
+ *
3190
+ * @type {Value}
3191
+ * @memberof Value
3192
+ */
3193
+ $timeCast?: Value | null;
3194
+ /**
3195
+ *
3196
+ * @type {string}
3197
+ * @memberof Value
3198
+ */
3199
+ $dayOfWeek?: string;
3200
+ /**
3201
+ *
3202
+ * @type {string}
3203
+ * @memberof Value
3204
+ */
3205
+ $dayOfMonth?: string;
3206
+ /**
3207
+ *
3208
+ * @type {string}
3209
+ * @memberof Value
3210
+ */
3211
+ $month?: string;
3212
+ /**
3213
+ *
3214
+ * @type {string}
3215
+ * @memberof Value
3216
+ */
3217
+ $year?: string;
3218
+ }
2838
3219
  /**
2839
3220
  *
2840
3221
  * @export
@@ -191,6 +191,13 @@ export const QualifierKind = {
191
191
  TemplateQualifier: 'TemplateQualifier',
192
192
  ValueQualifier: 'ValueQualifier'
193
193
  };
194
+ /**
195
+ * @export
196
+ */
197
+ export const QueryResultConceptDescriptionPagingMetadataResultTypeEnum = {
198
+ ConceptDescription: 'ConceptDescription',
199
+ Identifier: 'Identifier'
200
+ };
194
201
  /**
195
202
  *
196
203
  * @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 { GetSubmodelDescriptorsResult, SubmodelDescriptor } from '../models/index';
13
+ import type { GetSubmodelDescriptorsResult, Query, QueryResultSubmodelDescriptor, SubmodelDescriptor } from '../models/index';
14
14
  export interface DeleteSubmodelDescriptorByIdRequest {
15
15
  submodelIdentifier: string;
16
16
  }
@@ -28,6 +28,11 @@ export interface PutSubmodelDescriptorByIdRequest {
28
28
  submodelIdentifier: string;
29
29
  submodelDescriptor: SubmodelDescriptor;
30
30
  }
31
+ export interface QuerySubmodelDescriptorsRequest {
32
+ limit?: number;
33
+ cursor?: string;
34
+ query?: Query;
35
+ }
31
36
  /**
32
37
  *
33
38
  */
@@ -72,4 +77,12 @@ export declare class SubmodelRegistryAPIApi extends runtime.BaseAPI {
72
77
  * Creates or updates an existing Submodel Descriptor
73
78
  */
74
79
  putSubmodelDescriptorById(requestParameters: PutSubmodelDescriptorByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubmodelDescriptor | null | undefined>;
80
+ /**
81
+ * Returns all Submodel Descriptors that confirm to the input query
82
+ */
83
+ querySubmodelDescriptorsRaw(requestParameters: QuerySubmodelDescriptorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QueryResultSubmodelDescriptor>>;
84
+ /**
85
+ * Returns all Submodel Descriptors that confirm to the input query
86
+ */
87
+ querySubmodelDescriptors(requestParameters?: QuerySubmodelDescriptorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QueryResultSubmodelDescriptor>;
75
88
  }
@@ -152,4 +152,33 @@ export class SubmodelRegistryAPIApi extends runtime.BaseAPI {
152
152
  return await response.value();
153
153
  }
154
154
  }
155
+ /**
156
+ * Returns all Submodel Descriptors that confirm to the input query
157
+ */
158
+ async querySubmodelDescriptorsRaw(requestParameters, initOverrides) {
159
+ const queryParameters = {};
160
+ if (requestParameters['limit'] != null) {
161
+ queryParameters['limit'] = requestParameters['limit'];
162
+ }
163
+ if (requestParameters['cursor'] != null) {
164
+ queryParameters['cursor'] = requestParameters['cursor'];
165
+ }
166
+ const headerParameters = {};
167
+ headerParameters['Content-Type'] = 'application/json';
168
+ const response = await this.request({
169
+ path: `/query/submodel-descriptors`,
170
+ method: 'POST',
171
+ headers: headerParameters,
172
+ query: queryParameters,
173
+ body: requestParameters['query'],
174
+ }, initOverrides);
175
+ return new runtime.JSONApiResponse(response);
176
+ }
177
+ /**
178
+ * Returns all Submodel Descriptors that confirm to the input query
179
+ */
180
+ async querySubmodelDescriptors(requestParameters = {}, initOverrides) {
181
+ const response = await this.querySubmodelDescriptorsRaw(requestParameters, initOverrides);
182
+ return await response.value();
183
+ }
155
184
  }