basyx-typescript-sdk 2.3.1 → 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 (61) hide show
  1. package/README.md +68 -1
  2. package/bundle/index.cjs +1412 -89
  3. package/bundle/index.cjs.map +1 -1
  4. package/bundle/index.mjs +1344 -90
  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/index.d.ts +1 -0
  39. package/dist/lib/index.js +2 -0
  40. package/dist/lib/queryJsonization.d.ts +17 -0
  41. package/dist/lib/queryJsonization.js +309 -0
  42. package/dist/lib/queryRequests.d.ts +24 -0
  43. package/dist/lib/queryRequests.js +44 -0
  44. package/dist/models/Query.d.ts +378 -0
  45. package/dist/models/Query.js +430 -0
  46. package/dist/models/QueryResult.d.ts +22 -0
  47. package/dist/models/QueryResult.js +1 -0
  48. package/dist/models/index.d.ts +2 -0
  49. package/dist/models/index.js +2 -0
  50. package/dist/services/AasService.d.ts +15 -4
  51. package/dist/services/AasService.js +38 -40
  52. package/dist/services/SubmodelService.d.ts +9 -8
  53. package/dist/services/SubmodelService.js +17 -34
  54. package/dist/services/index.d.ts +1 -0
  55. package/dist/utils/DescriptorUtils.d.ts +27 -1
  56. package/dist/utils/DescriptorUtils.js +65 -27
  57. package/dist/utils/ServiceDescriptionUtils.d.ts +30 -0
  58. package/dist/utils/ServiceDescriptionUtils.js +43 -0
  59. package/dist/utils/index.d.ts +2 -0
  60. package/dist/utils/index.js +2 -0
  61. package/package.json +1 -1
package/bundle/index.cjs CHANGED
@@ -1471,6 +1471,29 @@ var AssetAdministrationShellRepositoryAPIApi = class extends BaseAPI {
1471
1471
  async putThumbnailAasRepository(requestParameters, initOverrides) {
1472
1472
  await this.putThumbnailAasRepositoryRaw(requestParameters, initOverrides);
1473
1473
  }
1474
+ /**
1475
+ * Returns all Asset Administration Shells that conform to the input query
1476
+ */
1477
+ async queryAssetAdministrationShellsRaw(requestParameters, initOverrides) {
1478
+ const queryParameters = {};
1479
+ if (requestParameters["limit"] != null) queryParameters["limit"] = requestParameters["limit"];
1480
+ if (requestParameters["cursor"] != null) queryParameters["cursor"] = requestParameters["cursor"];
1481
+ const headerParameters = {};
1482
+ headerParameters["Content-Type"] = "application/json";
1483
+ return new JSONApiResponse(await this.request({
1484
+ path: `/query/shells`,
1485
+ method: "POST",
1486
+ headers: headerParameters,
1487
+ query: queryParameters,
1488
+ body: requestParameters["query"]
1489
+ }, initOverrides));
1490
+ }
1491
+ /**
1492
+ * Returns all Asset Administration Shells that conform to the input query
1493
+ */
1494
+ async queryAssetAdministrationShells(requestParameters = {}, initOverrides) {
1495
+ return await (await this.queryAssetAdministrationShellsRaw(requestParameters, initOverrides)).value();
1496
+ }
1474
1497
  };
1475
1498
  /**
1476
1499
  * @export
@@ -1887,6 +1910,13 @@ const QualifierKind$3 = {
1887
1910
  ValueQualifier: "ValueQualifier"
1888
1911
  };
1889
1912
  /**
1913
+ * @export
1914
+ */
1915
+ const QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum = {
1916
+ AssetAdministrationShell: "AssetAdministrationShell",
1917
+ Identifier: "Identifier"
1918
+ };
1919
+ /**
1890
1920
  *
1891
1921
  * @export
1892
1922
  */
@@ -1948,6 +1978,7 @@ var AasRepositoryService_exports = /* @__PURE__ */ __exportAll({
1948
1978
  PatchSubmodelElementValueByPathAasRepositoryLevelEnum: () => PatchSubmodelElementValueByPathAasRepositoryLevelEnum,
1949
1979
  PatchSubmodelElementValueByPathValueOnlyLevelEnum: () => PatchSubmodelElementValueByPathValueOnlyLevelEnum,
1950
1980
  QualifierKind: () => QualifierKind$3,
1981
+ QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum: () => QueryResultAssetAdministrationShellPagingMetadataResultTypeEnum,
1951
1982
  ReferenceTypes: () => ReferenceTypes$6,
1952
1983
  RequiredError: () => RequiredError,
1953
1984
  ResponseError: () => ResponseError,
@@ -3014,6 +3045,29 @@ var SubmodelRepositoryAPIApi = class extends BaseAPI {
3014
3045
  default: return await response.value();
3015
3046
  }
3016
3047
  }
3048
+ /**
3049
+ * Returns all Submodels that confirm to the input query
3050
+ */
3051
+ async querySubmodelsRaw(requestParameters, initOverrides) {
3052
+ const queryParameters = {};
3053
+ if (requestParameters["limit"] != null) queryParameters["limit"] = requestParameters["limit"];
3054
+ if (requestParameters["cursor"] != null) queryParameters["cursor"] = requestParameters["cursor"];
3055
+ const headerParameters = {};
3056
+ headerParameters["Content-Type"] = "application/json";
3057
+ return new JSONApiResponse(await this.request({
3058
+ path: `/query/submodels`,
3059
+ method: "POST",
3060
+ headers: headerParameters,
3061
+ query: queryParameters,
3062
+ body: requestParameters["query"]
3063
+ }, initOverrides));
3064
+ }
3065
+ /**
3066
+ * Returns all Submodels that confirm to the input query
3067
+ */
3068
+ async querySubmodels(requestParameters = {}, initOverrides) {
3069
+ return await (await this.querySubmodelsRaw(requestParameters, initOverrides)).value();
3070
+ }
3017
3071
  };
3018
3072
  /**
3019
3073
  * @export
@@ -3393,6 +3447,13 @@ const QualifierKind$2 = {
3393
3447
  ValueQualifier: "ValueQualifier"
3394
3448
  };
3395
3449
  /**
3450
+ * @export
3451
+ */
3452
+ const QueryResultSubmodelPagingMetadataResultTypeEnum = {
3453
+ Submodel: "Submodel",
3454
+ Identifier: "Identifier"
3455
+ };
3456
+ /**
3396
3457
  *
3397
3458
  * @export
3398
3459
  */
@@ -3452,6 +3513,7 @@ var SubmodelRepositoryService_exports = /* @__PURE__ */ __exportAll({
3452
3513
  PatchSubmodelElementByPathValueOnlySubmodelRepoLevelEnum: () => PatchSubmodelElementByPathValueOnlySubmodelRepoLevelEnum,
3453
3514
  PutSubmodelElementByPathSubmodelRepoLevelEnum: () => PutSubmodelElementByPathSubmodelRepoLevelEnum,
3454
3515
  QualifierKind: () => QualifierKind$2,
3516
+ QueryResultSubmodelPagingMetadataResultTypeEnum: () => QueryResultSubmodelPagingMetadataResultTypeEnum,
3455
3517
  ReferenceTypes: () => ReferenceTypes$5,
3456
3518
  SerializationAPIApi: () => SerializationAPIApi$1,
3457
3519
  StateOfEvent: () => StateOfEvent$2,
@@ -3583,6 +3645,29 @@ var ConceptDescriptionRepositoryAPIApi = class extends BaseAPI {
3583
3645
  default: return await response.value();
3584
3646
  }
3585
3647
  }
3648
+ /**
3649
+ * Returns all Concept Descriptions that confirm to the input query
3650
+ */
3651
+ async queryConceptDescriptionsRaw(requestParameters, initOverrides) {
3652
+ const queryParameters = {};
3653
+ if (requestParameters["limit"] != null) queryParameters["limit"] = requestParameters["limit"];
3654
+ if (requestParameters["cursor"] != null) queryParameters["cursor"] = requestParameters["cursor"];
3655
+ const headerParameters = {};
3656
+ headerParameters["Content-Type"] = "application/json";
3657
+ return new JSONApiResponse(await this.request({
3658
+ path: `/query/concept-descriptions`,
3659
+ method: "POST",
3660
+ headers: headerParameters,
3661
+ query: queryParameters,
3662
+ body: requestParameters["query"]
3663
+ }, initOverrides));
3664
+ }
3665
+ /**
3666
+ * Returns all Concept Descriptions that confirm to the input query
3667
+ */
3668
+ async queryConceptDescriptions(requestParameters = {}, initOverrides) {
3669
+ return await (await this.queryConceptDescriptionsRaw(requestParameters, initOverrides)).value();
3670
+ }
3586
3671
  };
3587
3672
  //#endregion
3588
3673
  //#region dist/generated/ConceptDescriptionRepositoryService/apis/DescriptionAPIApi.js
@@ -3852,6 +3937,13 @@ const QualifierKind$1 = {
3852
3937
  ValueQualifier: "ValueQualifier"
3853
3938
  };
3854
3939
  /**
3940
+ * @export
3941
+ */
3942
+ const QueryResultConceptDescriptionPagingMetadataResultTypeEnum = {
3943
+ ConceptDescription: "ConceptDescription",
3944
+ Identifier: "Identifier"
3945
+ };
3946
+ /**
3855
3947
  *
3856
3948
  * @export
3857
3949
  */
@@ -3883,6 +3975,7 @@ var ConceptDescriptionRepositoryService_exports = /* @__PURE__ */ __exportAll({
3883
3975
  ModelType: () => ModelType$3,
3884
3976
  ModellingKind: () => ModellingKind$1,
3885
3977
  QualifierKind: () => QualifierKind$1,
3978
+ QueryResultConceptDescriptionPagingMetadataResultTypeEnum: () => QueryResultConceptDescriptionPagingMetadataResultTypeEnum,
3886
3979
  ReferenceTypes: () => ReferenceTypes$4,
3887
3980
  SerializationAPIApi: () => SerializationAPIApi,
3888
3981
  StateOfEvent: () => StateOfEvent$1
@@ -4123,6 +4216,29 @@ var AssetAdministrationShellRegistryAPIApi = class extends BaseAPI {
4123
4216
  default: return await response.value();
4124
4217
  }
4125
4218
  }
4219
+ /**
4220
+ * Returns all Asset Administration Shell Descriptors that confirm to the input query
4221
+ */
4222
+ async queryAssetAdministrationShellDescriptorsRaw(requestParameters, initOverrides) {
4223
+ const queryParameters = {};
4224
+ if (requestParameters["limit"] != null) queryParameters["limit"] = requestParameters["limit"];
4225
+ if (requestParameters["cursor"] != null) queryParameters["cursor"] = requestParameters["cursor"];
4226
+ const headerParameters = {};
4227
+ headerParameters["Content-Type"] = "application/json";
4228
+ return new JSONApiResponse(await this.request({
4229
+ path: `/query/shell-descriptors`,
4230
+ method: "POST",
4231
+ headers: headerParameters,
4232
+ query: queryParameters,
4233
+ body: requestParameters["query"]
4234
+ }, initOverrides));
4235
+ }
4236
+ /**
4237
+ * Returns all Asset Administration Shell Descriptors that confirm to the input query
4238
+ */
4239
+ async queryAssetAdministrationShellDescriptors(requestParameters = {}, initOverrides) {
4240
+ return await (await this.queryAssetAdministrationShellDescriptorsRaw(requestParameters, initOverrides)).value();
4241
+ }
4126
4242
  };
4127
4243
  //#endregion
4128
4244
  //#region dist/generated/AasRegistryService/apis/DescriptionAPIApi.js
@@ -4305,6 +4421,10 @@ const ProtocolInformationSecurityAttributesInnerTypeEnum = {
4305
4421
  W3CDid: "W3C_DID"
4306
4422
  };
4307
4423
  /**
4424
+ * @export
4425
+ */
4426
+ const QueryResultAssetAdministrationShellDescriptorPagingMetadataResultTypeEnum = { AssetAdministrationShellDescriptor: "AssetAdministrationShellDescriptor" };
4427
+ /**
4308
4428
  *
4309
4429
  * @export
4310
4430
  */
@@ -4332,6 +4452,7 @@ var AasRegistryService_exports = /* @__PURE__ */ __exportAll({
4332
4452
  MessageMessageTypeEnum: () => MessageMessageTypeEnum$3,
4333
4453
  ModelType: () => ModelType$2,
4334
4454
  ProtocolInformationSecurityAttributesInnerTypeEnum: () => ProtocolInformationSecurityAttributesInnerTypeEnum,
4455
+ QueryResultAssetAdministrationShellDescriptorPagingMetadataResultTypeEnum: () => QueryResultAssetAdministrationShellDescriptorPagingMetadataResultTypeEnum,
4335
4456
  ReferenceTypes: () => ReferenceTypes$3,
4336
4457
  RequiredError: () => RequiredError,
4337
4458
  ResponseError: () => ResponseError,
@@ -4499,6 +4620,29 @@ var SubmodelRegistryAPIApi = class extends BaseAPI {
4499
4620
  default: return await response.value();
4500
4621
  }
4501
4622
  }
4623
+ /**
4624
+ * Returns all Submodel Descriptors that confirm to the input query
4625
+ */
4626
+ async querySubmodelDescriptorsRaw(requestParameters, initOverrides) {
4627
+ const queryParameters = {};
4628
+ if (requestParameters["limit"] != null) queryParameters["limit"] = requestParameters["limit"];
4629
+ if (requestParameters["cursor"] != null) queryParameters["cursor"] = requestParameters["cursor"];
4630
+ const headerParameters = {};
4631
+ headerParameters["Content-Type"] = "application/json";
4632
+ return new JSONApiResponse(await this.request({
4633
+ path: `/query/submodel-descriptors`,
4634
+ method: "POST",
4635
+ headers: headerParameters,
4636
+ query: queryParameters,
4637
+ body: requestParameters["query"]
4638
+ }, initOverrides));
4639
+ }
4640
+ /**
4641
+ * Returns all Submodel Descriptors that confirm to the input query
4642
+ */
4643
+ async querySubmodelDescriptors(requestParameters = {}, initOverrides) {
4644
+ return await (await this.querySubmodelDescriptorsRaw(requestParameters, initOverrides)).value();
4645
+ }
4502
4646
  };
4503
4647
  //#endregion
4504
4648
  //#region dist/generated/SubmodelRegistryService/models/index.js
@@ -4636,6 +4780,13 @@ const ProtocolInformationSecurityAttributesTypeEnum$1 = {
4636
4780
  W3CDid: "W3C_DID"
4637
4781
  };
4638
4782
  /**
4783
+ * @export
4784
+ */
4785
+ const QueryResultSubmodelDescriptorPagingMetadataResultTypeEnum = {
4786
+ SubmodelDescriptor: "SubmodelDescriptor",
4787
+ Identifier: "Identifier"
4788
+ };
4789
+ /**
4639
4790
  *
4640
4791
  * @export
4641
4792
  */
@@ -4653,6 +4804,7 @@ var SubmodelRegistryService_exports = /* @__PURE__ */ __exportAll({
4653
4804
  MessageMessageTypeEnum: () => MessageMessageTypeEnum$2,
4654
4805
  ModelType: () => ModelType$1,
4655
4806
  ProtocolInformationSecurityAttributesTypeEnum: () => ProtocolInformationSecurityAttributesTypeEnum$1,
4807
+ QueryResultSubmodelDescriptorPagingMetadataResultTypeEnum: () => QueryResultSubmodelDescriptorPagingMetadataResultTypeEnum,
4656
4808
  ReferenceTypes: () => ReferenceTypes$2,
4657
4809
  SubmodelRegistryAPIApi: () => SubmodelRegistryAPIApi
4658
4810
  });
@@ -26514,6 +26666,723 @@ function convertCoreSubmodelDescriptorToApiSubmodelDescriptor(submodelDescriptor
26514
26666
  return JSON.parse(submodelDescriptorStr);
26515
26667
  }
26516
26668
  //#endregion
26669
+ //#region dist/models/Query.js
26670
+ /**
26671
+ * Model of the AAS Query Language (IDTA-01002-3, `$condition`, `$filters` and `$select`).
26672
+ *
26673
+ * The names, property order and constructor signatures follow the query region of the aas-core-meta V3.2 meta-model,
26674
+ * so that this model can be replaced by the classes aas-core-codegen generates for it. Properties carry the
26675
+ * meta-model names (e.g. `strVal`, `andOperands`); {@link toJsonableQuery} and {@link queryFromJsonable} map them to the
26676
+ * JSON names of the query language (e.g. `$strVal`, `$and`).
26677
+ *
26678
+ * See https://industrialdigitaltwin.io/aas-specifications/IDTA-01002/v3.2/query-language.html
26679
+ */
26680
+ /**
26681
+ * Enumerate the global attributes which can be used in a query.
26682
+ */
26683
+ var GlobalAttributeKind;
26684
+ (function(GlobalAttributeKind) {
26685
+ /** The current date and time in the local time zone of the server (`LOCALNOW`) */
26686
+ GlobalAttributeKind[GlobalAttributeKind["LocalNow"] = 0] = "LocalNow";
26687
+ /** The current date and time in UTC (`UTCNOW`) */
26688
+ GlobalAttributeKind[GlobalAttributeKind["UtcNow"] = 1] = "UtcNow";
26689
+ /** The current date and time of the client (`CLIENTNOW`) */
26690
+ GlobalAttributeKind[GlobalAttributeKind["ClientNow"] = 2] = "ClientNow";
26691
+ /** The anonymous user, i.e. a request without authentication (`ANONYMOUS`) */
26692
+ GlobalAttributeKind[GlobalAttributeKind["Anonymous"] = 3] = "Anonymous";
26693
+ })(GlobalAttributeKind || (GlobalAttributeKind = {}));
26694
+ /**
26695
+ * Enumerate the global attributes which can be used as a date-time operand in a query.
26696
+ *
26697
+ * This is a subset of {@link GlobalAttributeKind}.
26698
+ */
26699
+ var DateTimeGlobalAttributeKind;
26700
+ (function(DateTimeGlobalAttributeKind) {
26701
+ /** The current date and time in the local time zone of the server (`LOCALNOW`) */
26702
+ DateTimeGlobalAttributeKind[DateTimeGlobalAttributeKind["LocalNow"] = 0] = "LocalNow";
26703
+ /** The current date and time in UTC (`UTCNOW`) */
26704
+ DateTimeGlobalAttributeKind[DateTimeGlobalAttributeKind["UtcNow"] = 1] = "UtcNow";
26705
+ /** The current date and time of the client (`CLIENTNOW`) */
26706
+ DateTimeGlobalAttributeKind[DateTimeGlobalAttributeKind["ClientNow"] = 2] = "ClientNow";
26707
+ })(DateTimeGlobalAttributeKind || (DateTimeGlobalAttributeKind = {}));
26708
+ /**
26709
+ * Enumerate what a query returns instead of the full objects.
26710
+ */
26711
+ var QuerySelect;
26712
+ (function(QuerySelect) {
26713
+ /** Return only the identifiers of the matching objects (`id`) */
26714
+ QuerySelect[QuerySelect["Id"] = 0] = "Id";
26715
+ })(QuerySelect || (QuerySelect = {}));
26716
+ /**
26717
+ * Refer to a claim of the requester, e.g. from an access token (`CLAIM`).
26718
+ */
26719
+ var ClaimAttribute = class {
26720
+ claim;
26721
+ constructor(claim) {
26722
+ this.claim = claim;
26723
+ }
26724
+ };
26725
+ /**
26726
+ * Refer to a global attribute (`GLOBAL`).
26727
+ */
26728
+ var GlobalAttribute = class {
26729
+ kind;
26730
+ constructor(kind) {
26731
+ this.kind = kind;
26732
+ }
26733
+ };
26734
+ /**
26735
+ * Refer to an attribute of a referable (`REFERENCE`).
26736
+ */
26737
+ var ReferenceAttribute = class {
26738
+ reference;
26739
+ constructor(reference) {
26740
+ this.reference = reference;
26741
+ }
26742
+ };
26743
+ /**
26744
+ * Refer to a global attribute which gives a date and time (`GLOBAL`).
26745
+ */
26746
+ var DateTimeAttributeItem = class {
26747
+ kind;
26748
+ constructor(kind) {
26749
+ this.kind = kind;
26750
+ }
26751
+ };
26752
+ /**
26753
+ * Refer to a field of the queried data (`$field`), e.g. `$aas#idShort` or `$sme.Temperature#value`.
26754
+ */
26755
+ var FieldOperand = class {
26756
+ field;
26757
+ constructor(field) {
26758
+ this.field = field;
26759
+ }
26760
+ };
26761
+ /**
26762
+ * Represent a string literal (`$strVal`).
26763
+ */
26764
+ var StringLiteral = class {
26765
+ strVal;
26766
+ constructor(strVal) {
26767
+ this.strVal = strVal;
26768
+ }
26769
+ };
26770
+ /**
26771
+ * Use an attribute as an operand (`$attribute`).
26772
+ */
26773
+ var AttributeOperand = class {
26774
+ attribute;
26775
+ constructor(attribute) {
26776
+ this.attribute = attribute;
26777
+ }
26778
+ };
26779
+ /**
26780
+ * Represent a number literal (`$numVal`).
26781
+ */
26782
+ var NumberLiteral = class {
26783
+ numVal;
26784
+ constructor(numVal) {
26785
+ this.numVal = numVal;
26786
+ }
26787
+ };
26788
+ /**
26789
+ * Represent a hexadecimal literal (`$hexVal`), e.g. `16#1F`.
26790
+ */
26791
+ var HexLiteral = class {
26792
+ hexVal;
26793
+ constructor(hexVal) {
26794
+ this.hexVal = hexVal;
26795
+ }
26796
+ };
26797
+ /**
26798
+ * Represent a date-time literal (`$dateTimeVal`), e.g. `2025-01-01T00:00:00Z`.
26799
+ */
26800
+ var DateTimeLiteral = class {
26801
+ dateTimeVal;
26802
+ constructor(dateTimeVal) {
26803
+ this.dateTimeVal = dateTimeVal;
26804
+ }
26805
+ };
26806
+ /**
26807
+ * Represent a time literal (`$timeVal`), e.g. `12:00` or `12:00:00`.
26808
+ */
26809
+ var TimeLiteral = class {
26810
+ timeVal;
26811
+ constructor(timeVal) {
26812
+ this.timeVal = timeVal;
26813
+ }
26814
+ };
26815
+ /**
26816
+ * Represent a boolean literal (`$boolean`). It is both an operand and a logical expression.
26817
+ */
26818
+ var BooleanLiteral = class {
26819
+ boolean;
26820
+ constructor(boolean) {
26821
+ this.boolean = boolean;
26822
+ }
26823
+ };
26824
+ /**
26825
+ * Cast the operand to a string (`$strCast`).
26826
+ */
26827
+ var StringCast = class {
26828
+ strCast;
26829
+ constructor(strCast) {
26830
+ this.strCast = strCast;
26831
+ }
26832
+ };
26833
+ /**
26834
+ * Cast the operand to a number (`$numCast`).
26835
+ */
26836
+ var NumberCast = class {
26837
+ numCast;
26838
+ constructor(numCast) {
26839
+ this.numCast = numCast;
26840
+ }
26841
+ };
26842
+ /**
26843
+ * Cast the operand to a hexadecimal (`$hexCast`).
26844
+ */
26845
+ var HexCast = class {
26846
+ hexCast;
26847
+ constructor(hexCast) {
26848
+ this.hexCast = hexCast;
26849
+ }
26850
+ };
26851
+ /**
26852
+ * Cast the operand to a boolean (`$boolCast`).
26853
+ */
26854
+ var BooleanCast = class {
26855
+ boolCast;
26856
+ constructor(boolCast) {
26857
+ this.boolCast = boolCast;
26858
+ }
26859
+ };
26860
+ /**
26861
+ * Cast the operand to a date-time (`$dateTimeCast`).
26862
+ */
26863
+ var DateTimeCast = class {
26864
+ dateTimeCast;
26865
+ constructor(dateTimeCast) {
26866
+ this.dateTimeCast = dateTimeCast;
26867
+ }
26868
+ };
26869
+ /**
26870
+ * Cast the operand to a time (`$timeCast`).
26871
+ */
26872
+ var TimeCast = class {
26873
+ timeCast;
26874
+ constructor(timeCast) {
26875
+ this.timeCast = timeCast;
26876
+ }
26877
+ };
26878
+ /**
26879
+ * Extract the day of the week from a date-time (`$dayOfWeek`).
26880
+ */
26881
+ var DayOfWeek = class {
26882
+ dayOfWeek;
26883
+ constructor(dayOfWeek) {
26884
+ this.dayOfWeek = dayOfWeek;
26885
+ }
26886
+ };
26887
+ /**
26888
+ * Extract the day of the month from a date-time (`$dayOfMonth`).
26889
+ */
26890
+ var DayOfMonth = class {
26891
+ dayOfMonth;
26892
+ constructor(dayOfMonth) {
26893
+ this.dayOfMonth = dayOfMonth;
26894
+ }
26895
+ };
26896
+ /**
26897
+ * Extract the month from a date-time (`$month`).
26898
+ */
26899
+ var Month = class {
26900
+ month;
26901
+ constructor(month) {
26902
+ this.month = month;
26903
+ }
26904
+ };
26905
+ /**
26906
+ * Extract the year from a date-time (`$year`).
26907
+ */
26908
+ var Year = class {
26909
+ year;
26910
+ constructor(year) {
26911
+ this.year = year;
26912
+ }
26913
+ };
26914
+ /**
26915
+ * Use a date-time global attribute as an operand (`$attribute`).
26916
+ */
26917
+ var DateTimeAttributeOperand = class {
26918
+ attribute;
26919
+ constructor(attribute) {
26920
+ this.attribute = attribute;
26921
+ }
26922
+ };
26923
+ /**
26924
+ * Check whether the two operands are equal (`$eq`).
26925
+ */
26926
+ var EqualComparison = class {
26927
+ eq;
26928
+ constructor(eq) {
26929
+ this.eq = eq;
26930
+ }
26931
+ };
26932
+ /**
26933
+ * Check whether the two operands are not equal (`$ne`).
26934
+ */
26935
+ var NotEqualComparison = class {
26936
+ ne;
26937
+ constructor(ne) {
26938
+ this.ne = ne;
26939
+ }
26940
+ };
26941
+ /**
26942
+ * Check whether the first operand is greater than the second (`$gt`).
26943
+ */
26944
+ var GreaterThanComparison = class {
26945
+ gt;
26946
+ constructor(gt) {
26947
+ this.gt = gt;
26948
+ }
26949
+ };
26950
+ /**
26951
+ * Check whether the first operand is greater than or equal to the second (`$ge`).
26952
+ */
26953
+ var GreaterThanOrEqualComparison = class {
26954
+ ge;
26955
+ constructor(ge) {
26956
+ this.ge = ge;
26957
+ }
26958
+ };
26959
+ /**
26960
+ * Check whether the first operand is less than the second (`$lt`).
26961
+ */
26962
+ var LessThanComparison = class {
26963
+ lt;
26964
+ constructor(lt) {
26965
+ this.lt = lt;
26966
+ }
26967
+ };
26968
+ /**
26969
+ * Check whether the first operand is less than or equal to the second (`$le`).
26970
+ */
26971
+ var LessThanOrEqualComparison = class {
26972
+ le;
26973
+ constructor(le) {
26974
+ this.le = le;
26975
+ }
26976
+ };
26977
+ /**
26978
+ * Check whether the first operand contains the second (`$contains`).
26979
+ */
26980
+ var ContainsComparison = class {
26981
+ contains;
26982
+ constructor(contains) {
26983
+ this.contains = contains;
26984
+ }
26985
+ };
26986
+ /**
26987
+ * Check whether the first operand starts with the second (`$starts-with`).
26988
+ */
26989
+ var StartsWithComparison = class {
26990
+ startsWith;
26991
+ constructor(startsWith) {
26992
+ this.startsWith = startsWith;
26993
+ }
26994
+ };
26995
+ /**
26996
+ * Check whether the first operand ends with the second (`$ends-with`).
26997
+ */
26998
+ var EndsWithComparison = class {
26999
+ endsWith;
27000
+ constructor(endsWith) {
27001
+ this.endsWith = endsWith;
27002
+ }
27003
+ };
27004
+ /**
27005
+ * Check whether the first operand matches the regular expression given by the second (`$regex`).
27006
+ */
27007
+ var RegexComparison = class {
27008
+ regex;
27009
+ constructor(regex) {
27010
+ this.regex = regex;
27011
+ }
27012
+ };
27013
+ /**
27014
+ * Evaluate all the expressions against the same element of a list (`$match`), at least one.
27015
+ */
27016
+ var MatchClause = class {
27017
+ matchOperands;
27018
+ constructor(matchOperands) {
27019
+ this.matchOperands = matchOperands;
27020
+ }
27021
+ };
27022
+ /**
27023
+ * Check whether all the operands hold (`$and`), at least two.
27024
+ */
27025
+ var AndExpression = class {
27026
+ andOperands;
27027
+ constructor(andOperands) {
27028
+ this.andOperands = andOperands;
27029
+ }
27030
+ };
27031
+ /**
27032
+ * Check whether any of the operands holds (`$or`), at least two.
27033
+ */
27034
+ var OrExpression = class {
27035
+ orOperands;
27036
+ constructor(orOperands) {
27037
+ this.orOperands = orOperands;
27038
+ }
27039
+ };
27040
+ /**
27041
+ * Negate the operand (`$not`).
27042
+ */
27043
+ var NotExpression = class {
27044
+ notOperand;
27045
+ constructor(notOperand) {
27046
+ this.notOperand = notOperand;
27047
+ }
27048
+ };
27049
+ /**
27050
+ * Filter a fragment of the returned data by a condition (an entry of `$filters`).
27051
+ */
27052
+ var QueryFilter = class {
27053
+ fragment;
27054
+ condition;
27055
+ constructor(fragment, condition) {
27056
+ this.fragment = fragment;
27057
+ this.condition = condition;
27058
+ }
27059
+ };
27060
+ /**
27061
+ * A query in the AAS Query Language.
27062
+ *
27063
+ * @example
27064
+ * ```typescript
27065
+ * const query = new Query(
27066
+ * new EqualComparison([new FieldOperand('$aas#idShort'), new StringLiteral('Robot')])
27067
+ * );
27068
+ * ```
27069
+ */
27070
+ var Query = class {
27071
+ condition;
27072
+ select;
27073
+ filters;
27074
+ constructor(condition, select = null, filters = null) {
27075
+ this.condition = condition;
27076
+ this.select = select;
27077
+ this.filters = filters;
27078
+ }
27079
+ };
27080
+ //#endregion
27081
+ //#region dist/lib/queryJsonization.js
27082
+ const GLOBAL_ATTRIBUTE_KIND_JSON_NAMES = [
27083
+ "LOCALNOW",
27084
+ "UTCNOW",
27085
+ "CLIENTNOW",
27086
+ "ANONYMOUS"
27087
+ ];
27088
+ const QUERY_SELECT_JSON_NAMES = ["id"];
27089
+ const PROPERTY_JSON_NAMES = [
27090
+ ["claim", "CLAIM"],
27091
+ ["kind", "GLOBAL"],
27092
+ ["reference", "REFERENCE"],
27093
+ ["field", "$field"],
27094
+ ["strVal", "$strVal"],
27095
+ ["attribute", "$attribute"],
27096
+ ["numVal", "$numVal"],
27097
+ ["hexVal", "$hexVal"],
27098
+ ["dateTimeVal", "$dateTimeVal"],
27099
+ ["timeVal", "$timeVal"],
27100
+ ["boolean", "$boolean"],
27101
+ ["strCast", "$strCast"],
27102
+ ["numCast", "$numCast"],
27103
+ ["hexCast", "$hexCast"],
27104
+ ["boolCast", "$boolCast"],
27105
+ ["dateTimeCast", "$dateTimeCast"],
27106
+ ["timeCast", "$timeCast"],
27107
+ ["dayOfWeek", "$dayOfWeek"],
27108
+ ["dayOfMonth", "$dayOfMonth"],
27109
+ ["month", "$month"],
27110
+ ["year", "$year"],
27111
+ ["eq", "$eq"],
27112
+ ["ne", "$ne"],
27113
+ ["gt", "$gt"],
27114
+ ["ge", "$ge"],
27115
+ ["lt", "$lt"],
27116
+ ["le", "$le"],
27117
+ ["contains", "$contains"],
27118
+ ["startsWith", "$starts-with"],
27119
+ ["endsWith", "$ends-with"],
27120
+ ["regex", "$regex"],
27121
+ ["matchOperands", "$match"],
27122
+ ["andOperands", "$and"],
27123
+ ["orOperands", "$or"],
27124
+ ["notOperand", "$not"]
27125
+ ];
27126
+ /**
27127
+ * Serialize a query to the JSON of the AAS Query Language, as sent in the body of the `/query/*` endpoints.
27128
+ *
27129
+ * @param query The query to serialize
27130
+ * @returns The JSON-able object, e.g. `{ "$condition": { "$eq": [{ "$field": "$aas#idShort" }, { "$strVal": "x" }] } }`
27131
+ */
27132
+ function toJsonableQuery(query) {
27133
+ const jsonable = {};
27134
+ if (query.select !== null && query.select !== void 0) jsonable["$select"] = enumToJsonable(QUERY_SELECT_JSON_NAMES, query.select, "QuerySelect");
27135
+ jsonable["$condition"] = expressionToJsonable(query.condition);
27136
+ if (query.filters !== null && query.filters !== void 0) jsonable["$filters"] = query.filters.map((filter) => ({
27137
+ $fragment: filter.fragment,
27138
+ $condition: expressionToJsonable(filter.condition)
27139
+ }));
27140
+ return jsonable;
27141
+ }
27142
+ function expressionToJsonable(expression) {
27143
+ const properties = expression;
27144
+ for (const [property, jsonName] of PROPERTY_JSON_NAMES) {
27145
+ const value = properties?.[property];
27146
+ if (value !== void 0) return { [jsonName]: propertyToJsonable(property, value) };
27147
+ }
27148
+ throw new Error(`Unexpected query expression: ${JSON.stringify(expression)}`);
27149
+ }
27150
+ function propertyToJsonable(property, value) {
27151
+ if (property === "kind") return enumToJsonable(GLOBAL_ATTRIBUTE_KIND_JSON_NAMES, value, "GlobalAttributeKind");
27152
+ if (Array.isArray(value)) return value.map((item) => expressionToJsonable(item));
27153
+ if (typeof value === "object" && value !== null) return expressionToJsonable(value);
27154
+ return value;
27155
+ }
27156
+ function enumToJsonable(jsonNames, value, enumName) {
27157
+ const jsonName = jsonNames[value];
27158
+ if (jsonName === void 0) throw new Error(`Unexpected ${enumName} value: ${value}`);
27159
+ return jsonName;
27160
+ }
27161
+ /**
27162
+ * Parse the JSON of the AAS Query Language as a {@link Query}.
27163
+ *
27164
+ * @param jsonable The JSON-able value to parse, e.g. the result of `JSON.parse`
27165
+ * @returns Either the parsed query, or the error with the path to the invalid value
27166
+ */
27167
+ function queryFromJsonable(jsonable) {
27168
+ try {
27169
+ return new Either(parseQuery(jsonable), null);
27170
+ } catch (err) {
27171
+ if (err instanceof ParseError) return new Either(null, new DeserializationError(err.message, err.path));
27172
+ throw err;
27173
+ }
27174
+ }
27175
+ var ParseError = class {
27176
+ message;
27177
+ path = new Path$1();
27178
+ constructor(message) {
27179
+ this.message = message;
27180
+ }
27181
+ };
27182
+ function fail(message) {
27183
+ throw new ParseError(message);
27184
+ }
27185
+ function describeJsonValue(jsonable) {
27186
+ if (jsonable === null) return "null";
27187
+ if (Array.isArray(jsonable)) return "an array";
27188
+ return typeof jsonable;
27189
+ }
27190
+ function asObject(jsonable) {
27191
+ if (typeof jsonable !== "object" || jsonable === null || Array.isArray(jsonable)) fail(`Expected a JSON object, but got ${describeJsonValue(jsonable)}`);
27192
+ return jsonable;
27193
+ }
27194
+ function asString(jsonable) {
27195
+ if (typeof jsonable !== "string") fail(`Expected a string, but got ${describeJsonValue(jsonable)}`);
27196
+ return jsonable;
27197
+ }
27198
+ function asNumber(jsonable) {
27199
+ if (typeof jsonable !== "number") fail(`Expected a number, but got ${describeJsonValue(jsonable)}`);
27200
+ return jsonable;
27201
+ }
27202
+ function asBoolean(jsonable) {
27203
+ if (typeof jsonable !== "boolean") fail(`Expected a boolean, but got ${describeJsonValue(jsonable)}`);
27204
+ return jsonable;
27205
+ }
27206
+ function asArray(jsonable) {
27207
+ if (!Array.isArray(jsonable)) fail(`Expected an array, but got ${describeJsonValue(jsonable)}`);
27208
+ return jsonable;
27209
+ }
27210
+ function listOf(parse) {
27211
+ return (jsonable) => {
27212
+ const items = asArray(jsonable);
27213
+ return items.map((item, index) => {
27214
+ try {
27215
+ return parse(item);
27216
+ } catch (err) {
27217
+ if (err instanceof ParseError) err.path.prepend(new IndexSegment$1(items, index));
27218
+ throw err;
27219
+ }
27220
+ });
27221
+ };
27222
+ }
27223
+ function pairOf(parse) {
27224
+ return (jsonable) => {
27225
+ const items = asArray(jsonable);
27226
+ if (items.length !== 2) fail(`Expected exactly two operands, but got ${items.length}`);
27227
+ const [left, right] = listOf(parse)(items);
27228
+ return [left, right];
27229
+ };
27230
+ }
27231
+ function enumFromJsonable(jsonNames, enumName) {
27232
+ return (jsonable) => {
27233
+ const value = jsonNames.indexOf(asString(jsonable));
27234
+ if (value === -1) fail(`Expected a ${enumName} (${jsonNames.join(", ")}), but got ${JSON.stringify(jsonable)}`);
27235
+ return value;
27236
+ };
27237
+ }
27238
+ function property(jsonObject, name, parse) {
27239
+ try {
27240
+ if (jsonObject[name] === void 0) fail(`The required property is missing`);
27241
+ return parse(jsonObject[name]);
27242
+ } catch (err) {
27243
+ if (err instanceof ParseError) err.path.prepend(new PropertySegment$1(jsonObject, name));
27244
+ throw err;
27245
+ }
27246
+ }
27247
+ function expectOnlyProperties(jsonObject, names, typeName) {
27248
+ const unexpected = Object.keys(jsonObject).filter((key) => !names.includes(key));
27249
+ if (unexpected.length > 0) fail(`Unexpected properties for ${typeName}: ${unexpected.join(", ")}`);
27250
+ }
27251
+ /**
27252
+ * Parse an expression of a union by the one property that names its class, as the JSON of the query language has no
27253
+ * `modelType`.
27254
+ */
27255
+ function oneOf(typeName, parsers) {
27256
+ return (jsonable) => {
27257
+ const jsonObject = asObject(jsonable);
27258
+ const available = parsers();
27259
+ const names = Object.keys(jsonObject);
27260
+ if (names.length !== 1 || !Object.hasOwn(available, names[0])) fail(`Expected exactly one of the properties ${Object.keys(available).join(", ")} for ${typeName}, but got: ${names.join(", ") || "none"}`);
27261
+ return available[names[0]](jsonObject);
27262
+ };
27263
+ }
27264
+ const parseGlobalAttributeKind = enumFromJsonable(GLOBAL_ATTRIBUTE_KIND_JSON_NAMES, "GlobalAttributeKind");
27265
+ const parseDateTimeGlobalAttributeKind = enumFromJsonable(GLOBAL_ATTRIBUTE_KIND_JSON_NAMES.slice(0, 3), "DateTimeGlobalAttributeKind");
27266
+ const parseQuerySelect = enumFromJsonable(QUERY_SELECT_JSON_NAMES, "QuerySelect");
27267
+ const parseAttributeItem = oneOf("AttributeItem", () => ({
27268
+ CLAIM: (o) => new ClaimAttribute(property(o, "CLAIM", asString)),
27269
+ GLOBAL: (o) => new GlobalAttribute(property(o, "GLOBAL", parseGlobalAttributeKind)),
27270
+ REFERENCE: (o) => new ReferenceAttribute(property(o, "REFERENCE", asString))
27271
+ }));
27272
+ const parseDateTimeAttributeItem = oneOf("DateTimeAttributeItem", () => ({ GLOBAL: (o) => new DateTimeAttributeItem(property(o, "GLOBAL", parseDateTimeGlobalAttributeKind)) }));
27273
+ const stringValueParsers = () => ({
27274
+ $field: (o) => new FieldOperand(property(o, "$field", asString)),
27275
+ $strVal: (o) => new StringLiteral(property(o, "$strVal", asString)),
27276
+ $strCast: (o) => new StringCast(property(o, "$strCast", parseValue)),
27277
+ $attribute: (o) => new AttributeOperand(property(o, "$attribute", parseAttributeItem))
27278
+ });
27279
+ const dateTimeLiteralParsers = () => ({
27280
+ $dateTimeVal: (o) => new DateTimeLiteral(property(o, "$dateTimeVal", asString)),
27281
+ $dateTimeCast: (o) => new DateTimeCast(property(o, "$dateTimeCast", parseStringValue))
27282
+ });
27283
+ const parseStringValue = oneOf("StringValue", stringValueParsers);
27284
+ const parseDateTimeOperand = oneOf("DateTimeOperand", () => ({
27285
+ ...dateTimeLiteralParsers(),
27286
+ $attribute: (o) => new DateTimeAttributeOperand(property(o, "$attribute", parseDateTimeAttributeItem))
27287
+ }));
27288
+ const parseTimeCastOperand = oneOf("TimeCastOperand", () => ({
27289
+ ...stringValueParsers(),
27290
+ ...dateTimeLiteralParsers()
27291
+ }));
27292
+ const parseValue = oneOf("Value", () => ({
27293
+ ...stringValueParsers(),
27294
+ $numVal: (o) => new NumberLiteral(property(o, "$numVal", asNumber)),
27295
+ $numCast: (o) => new NumberCast(property(o, "$numCast", parseValue)),
27296
+ $dayOfWeek: (o) => new DayOfWeek(property(o, "$dayOfWeek", parseDateTimeOperand)),
27297
+ $dayOfMonth: (o) => new DayOfMonth(property(o, "$dayOfMonth", parseDateTimeOperand)),
27298
+ $month: (o) => new Month(property(o, "$month", parseDateTimeOperand)),
27299
+ $year: (o) => new Year(property(o, "$year", parseDateTimeOperand)),
27300
+ $hexVal: (o) => new HexLiteral(property(o, "$hexVal", asString)),
27301
+ $hexCast: (o) => new HexCast(property(o, "$hexCast", parseValue)),
27302
+ $boolean: (o) => new BooleanLiteral(property(o, "$boolean", asBoolean)),
27303
+ $boolCast: (o) => new BooleanCast(property(o, "$boolCast", parseValue)),
27304
+ ...dateTimeLiteralParsers(),
27305
+ $timeVal: (o) => new TimeLiteral(property(o, "$timeVal", asString)),
27306
+ $timeCast: (o) => new TimeCast(property(o, "$timeCast", parseTimeCastOperand))
27307
+ }));
27308
+ const matchExpressionParsers = () => ({
27309
+ $match: (o) => new MatchClause(property(o, "$match", listOf(parseMatchExpression))),
27310
+ $eq: (o) => new EqualComparison(property(o, "$eq", pairOf(parseValue))),
27311
+ $ne: (o) => new NotEqualComparison(property(o, "$ne", pairOf(parseValue))),
27312
+ $gt: (o) => new GreaterThanComparison(property(o, "$gt", pairOf(parseValue))),
27313
+ $ge: (o) => new GreaterThanOrEqualComparison(property(o, "$ge", pairOf(parseValue))),
27314
+ $lt: (o) => new LessThanComparison(property(o, "$lt", pairOf(parseValue))),
27315
+ $le: (o) => new LessThanOrEqualComparison(property(o, "$le", pairOf(parseValue))),
27316
+ $contains: (o) => new ContainsComparison(property(o, "$contains", pairOf(parseStringValue))),
27317
+ "$starts-with": (o) => new StartsWithComparison(property(o, "$starts-with", pairOf(parseStringValue))),
27318
+ "$ends-with": (o) => new EndsWithComparison(property(o, "$ends-with", pairOf(parseStringValue))),
27319
+ $regex: (o) => new RegexComparison(property(o, "$regex", pairOf(parseStringValue)))
27320
+ });
27321
+ const parseMatchExpression = oneOf("MatchExpression", matchExpressionParsers);
27322
+ const parseLogicalExpression = oneOf("LogicalExpression", () => ({
27323
+ $and: (o) => new AndExpression(property(o, "$and", listOf(parseLogicalExpression))),
27324
+ $or: (o) => new OrExpression(property(o, "$or", listOf(parseLogicalExpression))),
27325
+ $not: (o) => new NotExpression(property(o, "$not", parseLogicalExpression)),
27326
+ $boolean: (o) => new BooleanLiteral(property(o, "$boolean", asBoolean)),
27327
+ ...matchExpressionParsers()
27328
+ }));
27329
+ function parseQueryFilter(jsonable) {
27330
+ const jsonObject = asObject(jsonable);
27331
+ expectOnlyProperties(jsonObject, ["$fragment", "$condition"], "QueryFilter");
27332
+ return new QueryFilter(property(jsonObject, "$fragment", asString), property(jsonObject, "$condition", parseLogicalExpression));
27333
+ }
27334
+ function parseQuery(jsonable) {
27335
+ const jsonObject = asObject(jsonable);
27336
+ expectOnlyProperties(jsonObject, [
27337
+ "$select",
27338
+ "$condition",
27339
+ "$filters"
27340
+ ], "Query");
27341
+ return new Query(property(jsonObject, "$condition", parseLogicalExpression), jsonObject["$select"] === void 0 ? null : property(jsonObject, "$select", parseQuerySelect), jsonObject["$filters"] === void 0 ? null : property(jsonObject, "$filters", listOf(parseQueryFilter)));
27342
+ }
27343
+ //#endregion
27344
+ //#region dist/lib/queryRequests.js
27345
+ /**
27346
+ * Serialize the query for the body of a `/query/*` request.
27347
+ *
27348
+ * @throws RequiredError if no query is given
27349
+ */
27350
+ function toQueryRequestBody(query) {
27351
+ if (query === null || query === void 0) throw new RequiredError("query", "Required parameter \"query\" was null or undefined.");
27352
+ return toJsonableQuery(query);
27353
+ }
27354
+ /**
27355
+ * Convert the response of a `/query/*` request.
27356
+ *
27357
+ * The result holds identifiers if the server reports `resultType: 'Identifier'` or the query selected them. Servers
27358
+ * that return objects for `select: QuerySelect.Id` anyway are tolerated: the `id` of each object is used.
27359
+ *
27360
+ * @param response The parsed response body
27361
+ * @param query The query that was sent
27362
+ * @param resultType The `resultType` of a result with objects
27363
+ * @param convertItem Converts a returned object
27364
+ */
27365
+ function convertQueryResult(response, query, resultType, convertItem) {
27366
+ const pagedResult = response.paging_metadata;
27367
+ const items = response.result ?? [];
27368
+ if (pagedResult?.resultType === "Identifier" || query.select === QuerySelect.Id) return {
27369
+ pagedResult,
27370
+ resultType: "Identifier",
27371
+ result: items.map(toIdentifier)
27372
+ };
27373
+ return {
27374
+ pagedResult,
27375
+ resultType,
27376
+ result: items.map((item) => convertItem(item))
27377
+ };
27378
+ }
27379
+ function toIdentifier(item) {
27380
+ if (typeof item === "string") return item;
27381
+ const id = item?.id;
27382
+ if (typeof id === "string") return id;
27383
+ throw new Error(`Expected an identifier in the query result, but got: ${JSON.stringify(item)}`);
27384
+ }
27385
+ //#endregion
26517
27386
  //#region dist/clients/AasRegistryClient.js
26518
27387
  var AasRegistryClient = class AasRegistryClient {
26519
27388
  static requireIdentifier(value, field) {
@@ -26574,6 +27443,42 @@ var AasRegistryClient = class AasRegistryClient {
26574
27443
  }
26575
27444
  }
26576
27445
  /**
27446
+ * Returns all Asset Administration Shell Descriptors that conform to the query (AAS Query Language)
27447
+ *
27448
+ * @param options Object containing:
27449
+ * - configuration: The http request options
27450
+ * - query: The query, e.g. `new Query(new EqualComparison([new FieldOperand('$aasdesc#idShort'), new StringLiteral('Robot')]))`
27451
+ * - limit?: The maximum number of elements in the response array
27452
+ * - cursor?: A server-generated identifier retrieved from paging_metadata that specifies from which position the result listing should continue
27453
+ *
27454
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
27455
+ * `data.resultType` is `'Identifier'` with `result: string[]` if the query selects `QuerySelect.Id`.
27456
+ */
27457
+ async queryAssetAdministrationShellDescriptors(options) {
27458
+ const { configuration, query, limit, cursor } = options;
27459
+ try {
27460
+ const response = await new AssetAdministrationShellRegistryAPIApi(applyDefaults(configuration)).queryAssetAdministrationShellDescriptorsRaw({
27461
+ query: toQueryRequestBody(query),
27462
+ limit,
27463
+ cursor
27464
+ });
27465
+ return {
27466
+ success: true,
27467
+ data: convertQueryResult(await response.value(), query, "AssetAdministrationShellDescriptor", convertApiAasDescriptorToCoreAasDescriptor),
27468
+ statusCode: response.raw.status,
27469
+ etag: getEtag(response.raw)
27470
+ };
27471
+ } catch (err) {
27472
+ const customError = await handleApiError(err);
27473
+ return {
27474
+ success: false,
27475
+ error: customError,
27476
+ statusCode: AasRegistryClient.extractStatusCode(err, customError),
27477
+ ...getConditionalErrorFields(err)
27478
+ };
27479
+ }
27480
+ }
27481
+ /**
26577
27482
  * Creates a new Asset Administration Shell Descriptor, i.e. registers an AAS
26578
27483
  *
26579
27484
  * @param options Object containing:
@@ -27153,6 +28058,42 @@ var AasRepositoryClient = class AasRepositoryClient {
27153
28058
  }
27154
28059
  }
27155
28060
  /**
28061
+ * Returns all Asset Administration Shells that conform to the query (AAS Query Language)
28062
+ *
28063
+ * @param options Object containing:
28064
+ * - configuration: The http request options
28065
+ * - query: The query, e.g. `new Query(new EqualComparison([new FieldOperand('$aas#idShort'), new StringLiteral('Robot')]))`
28066
+ * - limit?: The maximum number of elements in the response array
28067
+ * - cursor?: A server-generated identifier retrieved from paging_metadata that specifies from which position the result listing should continue
28068
+ *
28069
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
28070
+ * `data.resultType` is `'Identifier'` with `result: string[]` if the query selects `QuerySelect.Id`.
28071
+ */
28072
+ async queryAssetAdministrationShells(options) {
28073
+ const { configuration, query, limit, cursor } = options;
28074
+ try {
28075
+ const response = await new AssetAdministrationShellRepositoryAPIApi(applyDefaults(configuration)).queryAssetAdministrationShellsRaw({
28076
+ query: toQueryRequestBody(query),
28077
+ limit,
28078
+ cursor
28079
+ });
28080
+ return {
28081
+ success: true,
28082
+ data: convertQueryResult(await response.value(), query, "AssetAdministrationShell", convertApiAasToCoreAas),
28083
+ statusCode: response.raw.status,
28084
+ etag: getEtag(response.raw)
28085
+ };
28086
+ } catch (err) {
28087
+ const customError = await handleApiError(err);
28088
+ return {
28089
+ success: false,
28090
+ error: customError,
28091
+ statusCode: AasRepositoryClient.extractStatusCode(err, customError),
28092
+ ...getConditionalErrorFields(err)
28093
+ };
28094
+ }
28095
+ }
28096
+ /**
27156
28097
  * Returns References to all Asset Administration Shells
27157
28098
  *
27158
28099
  * @param options Object containing:
@@ -29830,6 +30771,42 @@ var ConceptDescriptionRepositoryClient = class ConceptDescriptionRepositoryClien
29830
30771
  }
29831
30772
  }
29832
30773
  /**
30774
+ * Returns all Concept Descriptions that conform to the query (AAS Query Language)
30775
+ *
30776
+ * @param options Object containing:
30777
+ * - configuration: The http request options
30778
+ * - query: The query, e.g. `new Query(new EqualComparison([new FieldOperand('$cd#idShort'), new StringLiteral('Voltage')]))`
30779
+ * - limit?: The maximum number of elements in the response array
30780
+ * - cursor?: A server-generated identifier retrieved from paging_metadata that specifies from which position the result listing should continue
30781
+ *
30782
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
30783
+ * `data.resultType` is `'Identifier'` with `result: string[]` if the query selects `QuerySelect.Id`.
30784
+ */
30785
+ async queryConceptDescriptions(options) {
30786
+ const { configuration, query, limit, cursor } = options;
30787
+ try {
30788
+ const response = await new ConceptDescriptionRepositoryAPIApi(applyDefaults(configuration)).queryConceptDescriptionsRaw({
30789
+ query: toQueryRequestBody(query),
30790
+ limit,
30791
+ cursor
30792
+ });
30793
+ return {
30794
+ success: true,
30795
+ data: convertQueryResult(await response.value(), query, "ConceptDescription", convertApiCDToCoreCD),
30796
+ statusCode: response.raw.status,
30797
+ etag: getEtag(response.raw)
30798
+ };
30799
+ } catch (err) {
30800
+ const customError = await handleApiError(err);
30801
+ return {
30802
+ success: false,
30803
+ error: customError,
30804
+ statusCode: ConceptDescriptionRepositoryClient.extractStatusCode(err, customError),
30805
+ ...getConditionalErrorFields(err)
30806
+ };
30807
+ }
30808
+ }
30809
+ /**
29833
30810
  * Creates a new Concept Description
29834
30811
  *
29835
30812
  * @param options Object containing:
@@ -29977,6 +30954,42 @@ var SubmodelRegistryClient = class SubmodelRegistryClient {
29977
30954
  }
29978
30955
  }
29979
30956
  /**
30957
+ * Returns all Submodel Descriptors that conform to the query (AAS Query Language)
30958
+ *
30959
+ * @param options Object containing:
30960
+ * - configuration: The http request options
30961
+ * - query: The query, e.g. `new Query(new EqualComparison([new FieldOperand('$smdesc#idShort'), new StringLiteral('Nameplate')]))`
30962
+ * - limit?: The maximum number of elements in the response array
30963
+ * - cursor?: A server-generated identifier retrieved from paging_metadata that specifies from which position the result listing should continue
30964
+ *
30965
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
30966
+ * `data.resultType` is `'Identifier'` with `result: string[]` if the query selects `QuerySelect.Id`.
30967
+ */
30968
+ async querySubmodelDescriptors(options) {
30969
+ const { configuration, query, limit, cursor } = options;
30970
+ try {
30971
+ const response = await new SubmodelRegistryAPIApi(applyDefaults(configuration)).querySubmodelDescriptorsRaw({
30972
+ query: toQueryRequestBody(query),
30973
+ limit,
30974
+ cursor
30975
+ });
30976
+ return {
30977
+ success: true,
30978
+ data: convertQueryResult(await response.value(), query, "SubmodelDescriptor", convertApiSubmodelDescriptorToCoreSubmodelDescriptor),
30979
+ statusCode: response.raw.status,
30980
+ etag: getEtag(response.raw)
30981
+ };
30982
+ } catch (err) {
30983
+ const customError = await handleApiError(err);
30984
+ return {
30985
+ success: false,
30986
+ error: customError,
30987
+ statusCode: SubmodelRegistryClient.extractStatusCode(err, customError),
30988
+ ...getConditionalErrorFields(err)
30989
+ };
30990
+ }
30991
+ }
30992
+ /**
29980
30993
  * Creates a new Submodel Descriptor, i.e. registers a Submodel
29981
30994
  *
29982
30995
  * @param options Object containing:
@@ -30212,6 +31225,42 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
30212
31225
  }
30213
31226
  }
30214
31227
  /**
31228
+ * Returns all Submodels that conform to the query (AAS Query Language)
31229
+ *
31230
+ * @param options Object containing:
31231
+ * - configuration: The http request options
31232
+ * - query: The query, e.g. `new Query(new EqualComparison([new FieldOperand('$sm#idShort'), new StringLiteral('Nameplate')]))`
31233
+ * - limit?: The maximum number of elements in the response array
31234
+ * - cursor?: A server-generated identifier retrieved from paging_metadata that specifies from which position the result listing should continue
31235
+ *
31236
+ * @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
31237
+ * `data.resultType` is `'Identifier'` with `result: string[]` if the query selects `QuerySelect.Id`.
31238
+ */
31239
+ async querySubmodels(options) {
31240
+ const { configuration, query, limit, cursor } = options;
31241
+ try {
31242
+ const response = await new SubmodelRepositoryAPIApi(applyDefaults(configuration)).querySubmodelsRaw({
31243
+ query: toQueryRequestBody(query),
31244
+ limit,
31245
+ cursor
31246
+ });
31247
+ return {
31248
+ success: true,
31249
+ data: convertQueryResult(await response.value(), query, "Submodel", convertApiSubmodelToCoreSubmodel),
31250
+ statusCode: response.raw.status,
31251
+ etag: getEtag(response.raw)
31252
+ };
31253
+ } catch (err) {
31254
+ const customError = await handleApiError(err);
31255
+ return {
31256
+ success: false,
31257
+ error: customError,
31258
+ statusCode: SubmodelRepositoryClient.extractStatusCode(err, customError),
31259
+ ...getConditionalErrorFields(err)
31260
+ };
31261
+ }
31262
+ }
31263
+ /**
30215
31264
  * Returns all Submodels in metadata representation
30216
31265
  *
30217
31266
  * @param options Object containing:
@@ -31932,36 +32981,183 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
31932
32981
  };
31933
32982
  //#endregion
31934
32983
  //#region dist/utils/DescriptorUtils.js
31935
- var DescriptorUtils_exports = /* @__PURE__ */ __exportAll({ extractEndpointHref: () => extractEndpointHref });
32984
+ var DescriptorUtils_exports = /* @__PURE__ */ __exportAll({
32985
+ extractEndpointHref: () => extractEndpointHref,
32986
+ findEndpoint: () => findEndpoint,
32987
+ isRepositoryEndpoint: () => isRepositoryEndpoint
32988
+ });
32989
+ const interfaceShortNames = [
32990
+ "AAS",
32991
+ "SUBMODEL",
32992
+ "SERIALIZE",
32993
+ "DESCRIPTION",
32994
+ "AASX-FILE",
32995
+ "AAS-REGISTRY",
32996
+ "SUBMODEL-REGISTRY",
32997
+ "AAS-REPOSITORY",
32998
+ "SUBMODEL-REPOSITORY",
32999
+ "CD-REPOSITORY",
33000
+ "AAS-DISCOVERY"
33001
+ ];
33002
+ /**
33003
+ * Finds the endpoint of a descriptor that matches the given interface short name.
33004
+ *
33005
+ * An exact match on `endpoint._interface` is preferred. For `AAS-3.x` and `SUBMODEL-3.x` requests,
33006
+ * other 3.x versions are accepted as well, in this order:
33007
+ * 1. exact match (e.g. `AAS-3.0`)
33008
+ * 2. any direct interface of major version 3 (e.g. `AAS-3.1`, `AAS-3.2`)
33009
+ * 3. the repository interface of the same version (e.g. `AAS-REPOSITORY-3.0`)
33010
+ * 4. any repository interface of major version 3 (e.g. `AAS-REPOSITORY-3.2`)
33011
+ *
33012
+ * The href of a repository interface points to the repository base path instead of the resource itself.
33013
+ *
33014
+ * @param {Object} descriptor - The descriptor containing endpoint information.
33015
+ * @param {string} interfaceShortName - The short name of the interface to match against endpoint interfaces.
33016
+ * @returns {Endpoint | undefined} The matching endpoint, or `undefined` if there is none.
33017
+ */
33018
+ function findEndpoint(descriptor, interfaceShortName) {
33019
+ if (!interfaceShortName || interfaceShortName.trim() === "") return void 0;
33020
+ interfaceShortName = interfaceShortName.trim().toUpperCase();
33021
+ if (!interfaceShortNames.some((iShortName) => interfaceShortName.startsWith(`${iShortName}-`))) return;
33022
+ if (!Array.isArray(descriptor?.endpoints) || descriptor.endpoints.length === 0) return;
33023
+ const endpoints = descriptor.endpoints.filter((endpoint) => endpoint?.protocolInformation?.href);
33024
+ const interfaceOf = (endpoint) => endpoint._interface?.trim().toUpperCase();
33025
+ const exactMatch = endpoints.find((endpoint) => interfaceOf(endpoint) === interfaceShortName);
33026
+ if (exactMatch) return exactMatch;
33027
+ const versionedInterface = /^(AAS|SUBMODEL)-(3\.\d+(?:\.\d+)*)$/.exec(interfaceShortName);
33028
+ if (!versionedInterface) return void 0;
33029
+ const [, interfaceName, version] = versionedInterface;
33030
+ const directInterfacePattern = new RegExp(String.raw`^${interfaceName}-3\.\d+(?:\.\d+)*$`);
33031
+ const repositoryInterfacePattern = new RegExp(String.raw`^${interfaceName}-REPOSITORY-3\.\d+(?:\.\d+)*$`);
33032
+ return endpoints.find((endpoint) => directInterfacePattern.test(interfaceOf(endpoint) ?? "")) ?? endpoints.find((endpoint) => interfaceOf(endpoint) === `${interfaceName}-REPOSITORY-${version}`) ?? endpoints.find((endpoint) => repositoryInterfacePattern.test(interfaceOf(endpoint) ?? ""));
33033
+ }
33034
+ /**
33035
+ * Checks whether an endpoint uses a repository interface (e.g. `AAS-REPOSITORY-3.0`).
33036
+ * The href of such an endpoint points to the repository base path instead of the resource itself.
33037
+ *
33038
+ * @param {Endpoint} endpoint - The endpoint to check.
33039
+ * @returns {boolean} `true` if the endpoint uses a repository interface.
33040
+ */
33041
+ function isRepositoryEndpoint(endpoint) {
33042
+ return /^[A-Z-]+-REPOSITORY-/.test(endpoint?._interface?.trim().toUpperCase() ?? "");
33043
+ }
31936
33044
  /**
31937
33045
  * Extracts the endpoint from a descriptor based on the given interface short name.
33046
+ * See {@link findEndpoint} for the order in which endpoints are matched.
31938
33047
  *
31939
33048
  * @param {Object} descriptor - The descriptor containing endpoint information.
31940
33049
  * @param {string} interfaceShortName - The short name of the interface to match against endpoint interfaces.
31941
33050
  * @returns {string} The href of the matching endpoint's protocol information if found, otherwise an empty string.
31942
33051
  */
31943
33052
  function extractEndpointHref(descriptor, interfaceShortName) {
31944
- const failResponse = "";
31945
- const interfaceShortNames = [
31946
- "AAS",
31947
- "SUBMODEL",
31948
- "SERIALIZE",
31949
- "DESCRIPTION",
31950
- "AASX-FILE",
31951
- "AAS-REGISTRY",
31952
- "SUBMODEL-REGISTRY",
31953
- "AAS-REPOSITORY",
31954
- "SUBMODEL-REPOSITORY",
31955
- "CD-REPOSITORY",
31956
- "AAS-DISCOVERY"
31957
- ];
31958
- if (!interfaceShortName || interfaceShortName.trim() === "") return failResponse;
31959
- interfaceShortName = interfaceShortName.trim();
31960
- interfaceShortName = interfaceShortName.toUpperCase();
31961
- if (!interfaceShortNames.some((iShortName) => interfaceShortName.startsWith(`${iShortName}-`))) return failResponse;
31962
- if (!Array.isArray(descriptor?.endpoints) || descriptor?.endpoints.length === 0) return failResponse;
31963
- const endpoint = descriptor.endpoints.find((endpoint) => endpoint?._interface === interfaceShortName);
31964
- return endpoint?.protocolInformation?.href ? endpoint.protocolInformation.href : "";
33053
+ return findEndpoint(descriptor, interfaceShortName)?.protocolInformation?.href ?? "";
33054
+ }
33055
+ //#endregion
33056
+ //#region dist/lib/endpointConfiguration.js
33057
+ /**
33058
+ * Splits a resource URL like `http://host/prefix/shells/{encodedId}` into the repository base path and the
33059
+ * encoded identifier.
33060
+ *
33061
+ * @param href The resource URL
33062
+ * @param collection The collection segment (`shells` or `submodels`)
33063
+ * @returns The base path and encoded identifier, or `undefined` if the URL does not match
33064
+ */
33065
+ function splitResourceHref(href, collection) {
33066
+ const match = href.match(new RegExp(String.raw`^(https?:\/\/[^/?#]+(?:\/[^?#]*?)?)\/${collection}\/([^/?#]+)\/?$`));
33067
+ if (!match) return void 0;
33068
+ return {
33069
+ basePath: match[1],
33070
+ encodedId: match[2]
33071
+ };
33072
+ }
33073
+ /**
33074
+ * Resolves the endpoint of a descriptor for the given interface family (`AAS` or `SUBMODEL`).
33075
+ * Repository interface endpoints are expanded to the resource URL of the descriptor's identifier.
33076
+ *
33077
+ * @param descriptor The descriptor
33078
+ * @param interfaceName `AAS` or `SUBMODEL`
33079
+ * @returns The resolved endpoint, or `undefined` if the descriptor has no usable endpoint
33080
+ */
33081
+ function resolveDescriptorEndpoint(descriptor, interfaceName) {
33082
+ const endpoint = findEndpoint(descriptor, `${interfaceName}-3.0`);
33083
+ const endpointHref = endpoint?.protocolInformation?.href?.trim();
33084
+ if (!endpoint || !endpointHref) return void 0;
33085
+ const collection = interfaceName === "AAS" ? "shells" : "submodels";
33086
+ if (isRepositoryEndpoint(endpoint)) {
33087
+ if (!descriptor.id) return void 0;
33088
+ const basePath = endpointHref.replace(/\/+$/, "");
33089
+ return {
33090
+ href: `${basePath}/${collection}/${base64Encode(descriptor.id)}`,
33091
+ basePath
33092
+ };
33093
+ }
33094
+ return {
33095
+ href: endpointHref,
33096
+ basePath: splitResourceHref(endpointHref, collection)?.basePath ?? endpointHref
33097
+ };
33098
+ }
33099
+ /**
33100
+ * Creates a configuration for the given base path that keeps the auth, fetch and middleware settings of `source`.
33101
+ *
33102
+ * @param basePath The base path to target
33103
+ * @param source The configuration to take the settings from
33104
+ * @returns The new configuration
33105
+ */
33106
+ function withBasePath(basePath, source) {
33107
+ if (!source) return new Configuration({ basePath });
33108
+ return new Configuration({
33109
+ basePath,
33110
+ fetchApi: source.fetchApi,
33111
+ middleware: source.middleware,
33112
+ queryParamsStringify: source.queryParamsStringify,
33113
+ username: source.username,
33114
+ password: source.password,
33115
+ apiKey: source.apiKey,
33116
+ accessToken: source.accessToken,
33117
+ headers: source.headers,
33118
+ credentials: source.credentials
33119
+ });
33120
+ }
33121
+ /**
33122
+ * Determines the configuration for a request to a descriptor endpoint.
33123
+ *
33124
+ * If a resolver is given, it decides: it returns the configuration to use, or rejects the endpoint by returning
33125
+ * `null`/`undefined` or throwing. Otherwise, the settings of the fallback configuration (if any) are used.
33126
+ *
33127
+ * @param href The full endpoint URL
33128
+ * @param basePath The base path to send the request to
33129
+ * @param resolver The caller's endpoint configuration hook
33130
+ * @param fallback The configuration to take settings from if no resolver is given
33131
+ * @returns The configuration, or an `EndpointRejected` error
33132
+ */
33133
+ async function createEndpointConfiguration(href, basePath, resolver, fallback) {
33134
+ if (!resolver) return {
33135
+ success: true,
33136
+ configuration: withBasePath(basePath, fallback)
33137
+ };
33138
+ let configuration;
33139
+ try {
33140
+ configuration = await resolver(href);
33141
+ } catch (error) {
33142
+ return {
33143
+ success: false,
33144
+ error: {
33145
+ errorType: "EndpointRejected",
33146
+ message: `Endpoint ${href} was rejected: ${error instanceof Error ? error.message : String(error)}`
33147
+ }
33148
+ };
33149
+ }
33150
+ if (!configuration) return {
33151
+ success: false,
33152
+ error: {
33153
+ errorType: "EndpointRejected",
33154
+ message: `Endpoint ${href} was rejected`
33155
+ }
33156
+ };
33157
+ return {
33158
+ success: true,
33159
+ configuration: withBasePath(basePath, configuration)
33160
+ };
31965
33161
  }
31966
33162
  //#endregion
31967
33163
  //#region dist/services/SubmodelService.js
@@ -31980,6 +33176,7 @@ var SubmodelService = class {
31980
33176
  submodelRegistryConfig;
31981
33177
  submodelRepositoryConfig;
31982
33178
  conceptDescriptionRepositoryConfig;
33179
+ endpointConfiguration;
31983
33180
  constructor(config) {
31984
33181
  this.submodelRegistryClient = new SubmodelRegistryClient();
31985
33182
  this.submodelRepositoryClient = new SubmodelRepositoryClient();
@@ -31987,6 +33184,7 @@ var SubmodelService = class {
31987
33184
  this.submodelRegistryConfig = config.submodelRegistryConfig;
31988
33185
  this.submodelRepositoryConfig = config.submodelRepositoryConfig;
31989
33186
  this.conceptDescriptionRepositoryConfig = config.conceptDescriptionRepositoryConfig;
33187
+ this.endpointConfiguration = config.endpointConfiguration;
31990
33188
  }
31991
33189
  /**
31992
33190
  * Retrieves a list of all Submodels.
@@ -32030,13 +33228,13 @@ var SubmodelService = class {
32030
33228
  message: "Submodel descriptor does not contain an id and cannot be resolved"
32031
33229
  }
32032
33230
  };
32033
- const endpoint = descriptor.endpoints?.[0]?.protocolInformation?.href;
33231
+ const endpoint = resolveDescriptorEndpoint(descriptor, "SUBMODEL")?.href;
32034
33232
  if (!endpoint) return {
32035
33233
  submodel: null,
32036
33234
  warning: {
32037
33235
  submodelIdentifier: descriptor.id,
32038
33236
  errorType: "MissingEndpoint",
32039
- message: "Submodel descriptor has no endpoint and cannot be resolved"
33237
+ message: "Submodel descriptor has no SUBMODEL-3.x endpoint and cannot be resolved"
32040
33238
  }
32041
33239
  };
32042
33240
  const submodelResult = await this.getSubmodelByEndpoint({ endpoint });
@@ -32135,7 +33333,7 @@ var SubmodelService = class {
32135
33333
  });
32136
33334
  if (descriptorResult.success) {
32137
33335
  const descriptor = descriptorResult.data;
32138
- const endpoint = descriptor.endpoints?.[0]?.protocolInformation?.href;
33336
+ const endpoint = resolveDescriptorEndpoint(descriptor, "SUBMODEL")?.href;
32139
33337
  if (endpoint) {
32140
33338
  const submodelResult = await this.getSubmodelByEndpoint({
32141
33339
  endpoint,
@@ -32204,7 +33402,7 @@ var SubmodelService = class {
32204
33402
  submodelIdentifier
32205
33403
  });
32206
33404
  if (descriptorResult.success) {
32207
- const endpoint = descriptorResult.data.endpoints?.[0]?.protocolInformation?.href;
33405
+ const endpoint = resolveDescriptorEndpoint(descriptorResult.data, "SUBMODEL")?.href;
32208
33406
  if (endpoint) return {
32209
33407
  success: true,
32210
33408
  data: endpoint
@@ -32228,9 +33426,10 @@ var SubmodelService = class {
32228
33426
  *
32229
33427
  * Extracts the base URL and base64url-encoded Submodel identifier from the endpoint,
32230
33428
  * decodes the identifier, and fetches the submodel from the repository.
33429
+ * If an `endpointConfiguration` hook is configured, it decides whether and how the endpoint is contacted.
32231
33430
  *
32232
33431
  * @param options Object containing:
32233
- * - endpoint: The endpoint URL (format: http://host/submodels/{base64EncodedId})
33432
+ * - endpoint: The endpoint URL (format: http://host[/basePath]/submodels/{base64EncodedId})
32234
33433
  * - includeConceptDescriptions?: Whether to fetch concept descriptions (default: false)
32235
33434
  *
32236
33435
  * @returns Either `{ success: true; data: { submodel, conceptDescriptions? }; etag? }` or `{ success: false; error: ... }`.
@@ -32238,15 +33437,15 @@ var SubmodelService = class {
32238
33437
  */
32239
33438
  async getSubmodelByEndpoint(options) {
32240
33439
  const { endpoint, includeConceptDescriptions = false } = options;
32241
- const match = endpoint.match(/^(https?:\/\/[^/]+(?::\d+)?)\/submodels\/([^/]+)$/);
32242
- if (!match) return {
33440
+ const parts = splitResourceHref(endpoint, "submodels");
33441
+ if (!parts) return {
32243
33442
  success: false,
32244
33443
  error: {
32245
33444
  errorType: "InvalidEndpoint",
32246
33445
  message: "Invalid endpoint format. Expected format: http://host/submodels/{base64EncodedId}"
32247
33446
  }
32248
33447
  };
32249
- const [, baseUrl, encodedId] = match;
33448
+ const { basePath: baseUrl, encodedId } = parts;
32250
33449
  let submodelIdentifier;
32251
33450
  try {
32252
33451
  submodelIdentifier = base64Decode(encodedId);
@@ -32259,9 +33458,13 @@ var SubmodelService = class {
32259
33458
  }
32260
33459
  };
32261
33460
  }
32262
- const config = this.createRepositoryEndpointConfiguration(baseUrl);
33461
+ const configResult = await createEndpointConfiguration(endpoint, baseUrl, this.endpointConfiguration, this.submodelRepositoryConfig);
33462
+ if (!configResult.success) return {
33463
+ success: false,
33464
+ error: configResult.error
33465
+ };
32263
33466
  const submodelResult = await this.submodelRepositoryClient.getSubmodelById({
32264
- configuration: config,
33467
+ configuration: configResult.configuration,
32265
33468
  submodelIdentifier
32266
33469
  });
32267
33470
  if (!submodelResult.success) return {
@@ -32281,27 +33484,6 @@ var SubmodelService = class {
32281
33484
  };
32282
33485
  }
32283
33486
  /**
32284
- * Creates a repository configuration for an endpoint while preserving auth and middleware.
32285
- *
32286
- * @param basePath The endpoint base path to target
32287
- * @returns Configuration with endpoint basePath plus repository auth/settings
32288
- */
32289
- createRepositoryEndpointConfiguration(basePath) {
32290
- if (!this.submodelRepositoryConfig) return new Configuration({ basePath });
32291
- return new Configuration({
32292
- basePath,
32293
- fetchApi: this.submodelRepositoryConfig.fetchApi,
32294
- middleware: this.submodelRepositoryConfig.middleware,
32295
- queryParamsStringify: this.submodelRepositoryConfig.queryParamsStringify,
32296
- username: this.submodelRepositoryConfig.username,
32297
- password: this.submodelRepositoryConfig.password,
32298
- apiKey: this.submodelRepositoryConfig.apiKey,
32299
- accessToken: this.submodelRepositoryConfig.accessToken,
32300
- headers: this.submodelRepositoryConfig.headers,
32301
- credentials: this.submodelRepositoryConfig.credentials
32302
- });
32303
- }
32304
- /**
32305
33487
  * Creates a Submodel and optionally registers it in the registry.
32306
33488
  *
32307
33489
  * This method creates the Submodel in the repository first. If registry is configured
@@ -32591,6 +33773,7 @@ var AasService = class {
32591
33773
  aasRegistryConfig;
32592
33774
  aasRepositoryConfig;
32593
33775
  discoveryConfig;
33776
+ endpointConfiguration;
32594
33777
  submodelService;
32595
33778
  constructor(config) {
32596
33779
  this.aasRegistryClient = new AasRegistryClient();
@@ -32599,10 +33782,12 @@ var AasService = class {
32599
33782
  this.aasRegistryConfig = config.aasRegistryConfig;
32600
33783
  this.aasRepositoryConfig = config.aasRepositoryConfig;
32601
33784
  this.discoveryConfig = config.discoveryConfig;
33785
+ this.endpointConfiguration = config.endpointConfiguration;
32602
33786
  this.submodelService = new SubmodelService({
32603
33787
  submodelRegistryConfig: config.submodelRegistryConfig ?? config.aasRegistryConfig,
32604
33788
  submodelRepositoryConfig: config.submodelRepositoryConfig ?? config.aasRepositoryConfig,
32605
- conceptDescriptionRepositoryConfig: config.conceptDescriptionRepositoryConfig
33789
+ conceptDescriptionRepositoryConfig: config.conceptDescriptionRepositoryConfig,
33790
+ endpointConfiguration: config.endpointConfiguration
32606
33791
  });
32607
33792
  }
32608
33793
  /**
@@ -32649,19 +33834,27 @@ var AasService = class {
32649
33834
  });
32650
33835
  continue;
32651
33836
  }
32652
- const endpoint = extractEndpointHref(descriptor, "AAS-3.0");
32653
- if (!endpoint) {
33837
+ const resolvedEndpoint = resolveDescriptorEndpoint(descriptor, "AAS");
33838
+ if (!resolvedEndpoint) {
32654
33839
  warnings.push({
32655
33840
  descriptorId: descriptor.id,
32656
33841
  errorType: "MissingEndpoint",
32657
- message: "AAS descriptor has no AAS-3.0 endpoint and cannot be resolved"
33842
+ message: "AAS descriptor has no AAS-3.x endpoint and cannot be resolved"
33843
+ });
33844
+ continue;
33845
+ }
33846
+ const endpoint = resolvedEndpoint.href;
33847
+ const configResult = await this.createEndpointConfiguration(endpoint, resolvedEndpoint.basePath);
33848
+ if (!configResult.success) {
33849
+ warnings.push({
33850
+ descriptorId: descriptor.id,
33851
+ endpoint,
33852
+ ...configResult.error
32658
33853
  });
32659
33854
  continue;
32660
33855
  }
32661
- const baseUrl = endpoint.match(/^(https?:\/\/[^/]+(?::\d+)?)/)?.[1] || endpoint;
32662
- const config = this.createRepositoryEndpointConfiguration(baseUrl);
32663
33856
  const shellResult = await this.aasRepositoryClient.getAssetAdministrationShellById({
32664
- configuration: config,
33857
+ configuration: configResult.configuration,
32665
33858
  aasIdentifier: descriptor.id
32666
33859
  });
32667
33860
  if (shellResult.success) shells.push(shellResult.data);
@@ -32757,12 +33950,11 @@ var AasService = class {
32757
33950
  });
32758
33951
  if (descriptorResult.success) {
32759
33952
  const descriptor = descriptorResult.data;
32760
- const endpoint = extractEndpointHref(descriptor, "AAS-3.0");
32761
- if (endpoint) {
32762
- const baseUrl = endpoint.match(/^(https?:\/\/[^/]+(?::\d+)?)/)?.[1] || endpoint;
32763
- const config = this.createRepositoryEndpointConfiguration(baseUrl);
33953
+ const resolvedEndpoint = resolveDescriptorEndpoint(descriptor, "AAS");
33954
+ const configResult = resolvedEndpoint ? await this.createEndpointConfiguration(resolvedEndpoint.href, resolvedEndpoint.basePath) : void 0;
33955
+ if (configResult?.success) {
32764
33956
  const shellResult = await this.aasRepositoryClient.getAssetAdministrationShellById({
32765
- configuration: config,
33957
+ configuration: configResult.configuration,
32766
33958
  aasIdentifier
32767
33959
  });
32768
33960
  if (shellResult.success) {
@@ -32833,7 +34025,7 @@ var AasService = class {
32833
34025
  aasIdentifier
32834
34026
  });
32835
34027
  if (descriptorResult.success) {
32836
- const endpoint = extractEndpointHref(descriptorResult.data, "AAS-3.0");
34028
+ const endpoint = resolveDescriptorEndpoint(descriptorResult.data, "AAS")?.href;
32837
34029
  if (endpoint) return {
32838
34030
  success: true,
32839
34031
  data: endpoint
@@ -32857,9 +34049,10 @@ var AasService = class {
32857
34049
  *
32858
34050
  * Extracts the base URL and base64url-encoded AAS identifier from the endpoint,
32859
34051
  * decodes the identifier, and fetches the shell from the repository.
34052
+ * If an `endpointConfiguration` hook is configured, it decides whether and how the endpoint is contacted.
32860
34053
  *
32861
34054
  * @param options Object containing:
32862
- * - endpoint: The endpoint URL (format: http://host/shells/{base64EncodedId})
34055
+ * - endpoint: The endpoint URL (format: http://host[/basePath]/shells/{base64EncodedId})
32863
34056
  * - includeSubmodels?: Whether to fetch submodels for the shell (default: false)
32864
34057
  * - includeConceptDescriptions?: Whether to fetch concept descriptions (default: false)
32865
34058
  *
@@ -32868,15 +34061,15 @@ var AasService = class {
32868
34061
  */
32869
34062
  async getAasByEndpoint(options) {
32870
34063
  const { endpoint, includeSubmodels = false } = options;
32871
- const match = endpoint.match(/^(https?:\/\/[^/]+(?::\d+)?)\/shells\/([^/]+)$/);
32872
- if (!match) return {
34064
+ const parts = splitResourceHref(endpoint, "shells");
34065
+ if (!parts) return {
32873
34066
  success: false,
32874
34067
  error: {
32875
34068
  errorType: "InvalidEndpoint",
32876
34069
  message: "Invalid endpoint format. Expected format: http://host/shells/{base64EncodedId}"
32877
34070
  }
32878
34071
  };
32879
- const [, baseUrl, encodedId] = match;
34072
+ const { basePath: baseUrl, encodedId } = parts;
32880
34073
  let aasIdentifier;
32881
34074
  try {
32882
34075
  aasIdentifier = base64Decode(encodedId);
@@ -32889,9 +34082,13 @@ var AasService = class {
32889
34082
  }
32890
34083
  };
32891
34084
  }
32892
- const config = this.createRepositoryEndpointConfiguration(baseUrl);
34085
+ const configResult = await this.createEndpointConfiguration(endpoint, baseUrl);
34086
+ if (!configResult.success) return {
34087
+ success: false,
34088
+ error: configResult.error
34089
+ };
32893
34090
  const shellResult = await this.aasRepositoryClient.getAssetAdministrationShellById({
32894
- configuration: config,
34091
+ configuration: configResult.configuration,
32895
34092
  aasIdentifier
32896
34093
  });
32897
34094
  if (!shellResult.success) return {
@@ -33235,25 +34432,15 @@ var AasService = class {
33235
34432
  };
33236
34433
  }
33237
34434
  /**
33238
- * Creates a repository configuration for an endpoint while preserving auth and middleware.
34435
+ * Determines the configuration for a request to an AAS endpoint, using the `endpointConfiguration` hook if
34436
+ * configured and the repository settings otherwise.
33239
34437
  *
34438
+ * @param href The full endpoint URL
33240
34439
  * @param basePath The endpoint base path to target
33241
- * @returns Configuration with endpoint basePath plus repository auth/settings
33242
- */
33243
- createRepositoryEndpointConfiguration(basePath) {
33244
- if (!this.aasRepositoryConfig) return new Configuration({ basePath });
33245
- return new Configuration({
33246
- basePath,
33247
- fetchApi: this.aasRepositoryConfig.fetchApi,
33248
- middleware: this.aasRepositoryConfig.middleware,
33249
- queryParamsStringify: this.aasRepositoryConfig.queryParamsStringify,
33250
- username: this.aasRepositoryConfig.username,
33251
- password: this.aasRepositoryConfig.password,
33252
- apiKey: this.aasRepositoryConfig.apiKey,
33253
- accessToken: this.aasRepositoryConfig.accessToken,
33254
- headers: this.aasRepositoryConfig.headers,
33255
- credentials: this.aasRepositoryConfig.credentials
33256
- });
34440
+ * @returns The configuration, or an `EndpointRejected` error
34441
+ */
34442
+ createEndpointConfiguration(href, basePath) {
34443
+ return createEndpointConfiguration(href, basePath, this.endpointConfiguration, this.aasRepositoryConfig);
33257
34444
  }
33258
34445
  /**
33259
34446
  * Helper method to create an AAS descriptor from an AssetAdministrationShell.
@@ -35095,11 +36282,13 @@ var lib_exports = /* @__PURE__ */ __exportAll({
35095
36282
  endpointFromJsonable: () => endpointFromJsonable,
35096
36283
  handleApiError: () => handleApiError,
35097
36284
  protocolInformationFromJsonable: () => protocolInformationFromJsonable,
36285
+ queryFromJsonable: () => queryFromJsonable,
35098
36286
  serializeXml: () => serializeXml,
35099
36287
  submodelDescriptorFromJsonable: () => submodelDescriptorFromJsonable,
35100
36288
  toJsonableAssetAdministrationShellDescriptor: () => toJsonableAssetAdministrationShellDescriptor,
35101
36289
  toJsonableEndpoint: () => toJsonableEndpoint,
35102
36290
  toJsonableProtocolInformation: () => toJsonableProtocolInformation,
36291
+ toJsonableQuery: () => toJsonableQuery,
35103
36292
  toJsonableSecurityAttribute: () => toJsonableSecurityAttribute,
35104
36293
  toJsonableSubmodelDescriptor: () => toJsonableSubmodelDescriptor
35105
36294
  });
@@ -35736,6 +36925,66 @@ function extractVersionRevision(semanticId) {
35736
36925
  return failResponse;
35737
36926
  }
35738
36927
  //#endregion
36928
+ //#region dist/utils/ServiceDescriptionUtils.js
36929
+ var ServiceDescriptionUtils_exports = /* @__PURE__ */ __exportAll({
36930
+ getQueryEndpoints: () => getQueryEndpoints,
36931
+ supportsQuery: () => supportsQuery
36932
+ });
36933
+ const QUERY_PROFILES = {
36934
+ shells: {
36935
+ specification: "AssetAdministrationShellRepositoryServiceSpecification",
36936
+ profile: "SSP-003"
36937
+ },
36938
+ submodels: {
36939
+ specification: "SubmodelRepositoryServiceSpecification",
36940
+ profile: "SSP-005"
36941
+ },
36942
+ "shell-descriptors": {
36943
+ specification: "AssetAdministrationShellRegistryServiceSpecification",
36944
+ profile: "SSP-004"
36945
+ },
36946
+ "submodel-descriptors": {
36947
+ specification: "SubmodelRegistryServiceSpecification",
36948
+ profile: "SSP-004"
36949
+ },
36950
+ "concept-descriptions": {
36951
+ specification: "ConceptDescriptionRepositoryServiceSpecification",
36952
+ profile: "SSP-002"
36953
+ }
36954
+ };
36955
+ const PROFILE_PATTERN = /\/aas\/API\/3\/\d+\/([A-Za-z]+)\/(SSP-\d+)$/;
36956
+ /**
36957
+ * Returns the query endpoints whose query profile a service advertises in its `ServiceDescription`.
36958
+ *
36959
+ * Profiles are matched by service specification and profile number, regardless of host and API version (both
36960
+ * `https://admin-shell.io/aas/API/3/2/...` and `https://basyx.org/aas/API/3/2/...`). This is a best-effort hint: a
36961
+ * server can serve query endpoints without advertising their profile, so an empty result does not prove that queries
36962
+ * are unsupported.
36963
+ *
36964
+ * @param serviceDescription The result of `getSelfDescription`
36965
+ * @returns The query endpoints with an advertised profile
36966
+ */
36967
+ function getQueryEndpoints(serviceDescription) {
36968
+ const profiles = serviceDescription?.profiles ?? [];
36969
+ return Object.keys(QUERY_PROFILES).filter((endpoint) => profiles.some((profile) => {
36970
+ const match = PROFILE_PATTERN.exec(profile);
36971
+ return match !== null && match[1] === QUERY_PROFILES[endpoint].specification && match[2] === QUERY_PROFILES[endpoint].profile;
36972
+ }));
36973
+ }
36974
+ /**
36975
+ * Checks whether a service advertises the query profile for an endpoint, or for any query endpoint if none is given.
36976
+ *
36977
+ * This is a best-effort hint, see {@link getQueryEndpoints}.
36978
+ *
36979
+ * @param serviceDescription The result of `getSelfDescription`
36980
+ * @param endpoint The query endpoint, e.g. `'shells'` for `/query/shells`
36981
+ * @returns `true` if the matching query profile is advertised
36982
+ */
36983
+ function supportsQuery(serviceDescription, endpoint) {
36984
+ const endpoints = getQueryEndpoints(serviceDescription);
36985
+ return endpoint === void 0 ? endpoints.length > 0 : endpoints.includes(endpoint);
36986
+ }
36987
+ //#endregion
35739
36988
  //#region dist/utils/index.js
35740
36989
  var utils_exports = /* @__PURE__ */ __exportAll({
35741
36990
  DescriptorUtils: () => DescriptorUtils_exports,
@@ -35744,6 +36993,7 @@ var utils_exports = /* @__PURE__ */ __exportAll({
35744
36993
  ReferableUtils: () => ReferableUtils_exports,
35745
36994
  ReferenceUtil: () => ReferenceUtil_exports,
35746
36995
  SemanticIdUtils: () => SemanticIdUtils_exports,
36996
+ ServiceDescriptionUtils: () => ServiceDescriptionUtils_exports,
35747
36997
  checkIdShort: () => checkIdShort,
35748
36998
  checkSemanticId: () => checkSemanticId,
35749
36999
  checkSemanticIdEclassIrdi: () => checkSemanticIdEclassIrdi,
@@ -35754,17 +37004,21 @@ var utils_exports = /* @__PURE__ */ __exportAll({
35754
37004
  extractEndpointHref: () => extractEndpointHref,
35755
37005
  extractId: () => extractId,
35756
37006
  extractVersionRevision: () => extractVersionRevision,
37007
+ findEndpoint: () => findEndpoint,
35757
37008
  firstLangStringSetText: () => firstLangStringSetText,
35758
37009
  getEquivalentEclassSemanticIds: () => getEquivalentEclassSemanticIds,
35759
37010
  getEquivalentIriSemanticIds: () => getEquivalentIriSemanticIds,
35760
37011
  getKeyTypeAbbreviation: () => getKeyTypeAbbreviation,
37012
+ getQueryEndpoints: () => getQueryEndpoints,
35761
37013
  getSubmodelElementByIdShort: () => getSubmodelElementByIdShort,
35762
37014
  getSubmodelElementBySemanticId: () => getSubmodelElementBySemanticId,
35763
37015
  getSubmodelElementsByIdShort: () => getSubmodelElementsByIdShort,
35764
37016
  getSubmodelElementsBySemanticId: () => getSubmodelElementsBySemanticId,
35765
37017
  hasValue: () => hasValue,
37018
+ isRepositoryEndpoint: () => isRepositoryEndpoint,
35766
37019
  keyTypes: () => keyTypes,
35767
37020
  nameToDisplay: () => nameToDisplay,
37021
+ supportsQuery: () => supportsQuery,
35768
37022
  valueToDisplay: () => valueToDisplay
35769
37023
  });
35770
37024
  //#endregion
@@ -35797,12 +37051,17 @@ Object.defineProperty(exports, "AasxFileService", {
35797
37051
  return AasxFileService_exports;
35798
37052
  }
35799
37053
  });
37054
+ exports.AndExpression = AndExpression;
35800
37055
  exports.AssetAdministrationShellDescriptor = AssetAdministrationShellDescriptor;
37056
+ exports.AttributeOperand = AttributeOperand;
35801
37057
  exports.BASE_PATH = BASE_PATH;
35802
37058
  exports.BaSyxEnvironment = BaSyxEnvironment;
35803
37059
  exports.BaseAPI = BaseAPI;
35804
37060
  exports.BlobApiResponse = BlobApiResponse;
37061
+ exports.BooleanCast = BooleanCast;
37062
+ exports.BooleanLiteral = BooleanLiteral;
35805
37063
  exports.COLLECTION_FORMATS = COLLECTION_FORMATS;
37064
+ exports.ClaimAttribute = ClaimAttribute;
35806
37065
  exports.ConceptDescriptionRepositoryClient = ConceptDescriptionRepositoryClient;
35807
37066
  Object.defineProperty(exports, "ConceptDescriptionRepositoryService", {
35808
37067
  enumerable: true,
@@ -35811,6 +37070,19 @@ Object.defineProperty(exports, "ConceptDescriptionRepositoryService", {
35811
37070
  }
35812
37071
  });
35813
37072
  exports.Configuration = Configuration;
37073
+ exports.ContainsComparison = ContainsComparison;
37074
+ exports.DateTimeAttributeItem = DateTimeAttributeItem;
37075
+ exports.DateTimeAttributeOperand = DateTimeAttributeOperand;
37076
+ exports.DateTimeCast = DateTimeCast;
37077
+ Object.defineProperty(exports, "DateTimeGlobalAttributeKind", {
37078
+ enumerable: true,
37079
+ get: function() {
37080
+ return DateTimeGlobalAttributeKind;
37081
+ }
37082
+ });
37083
+ exports.DateTimeLiteral = DateTimeLiteral;
37084
+ exports.DayOfMonth = DayOfMonth;
37085
+ exports.DayOfWeek = DayOfWeek;
35814
37086
  exports.DefaultConfig = DefaultConfig;
35815
37087
  Object.defineProperty(exports, "DescriptorUtils", {
35816
37088
  enumerable: true,
@@ -35818,7 +37090,21 @@ Object.defineProperty(exports, "DescriptorUtils", {
35818
37090
  return DescriptorUtils_exports;
35819
37091
  }
35820
37092
  });
37093
+ exports.EndsWithComparison = EndsWithComparison;
37094
+ exports.EqualComparison = EqualComparison;
35821
37095
  exports.FetchError = FetchError;
37096
+ exports.FieldOperand = FieldOperand;
37097
+ exports.GlobalAttribute = GlobalAttribute;
37098
+ Object.defineProperty(exports, "GlobalAttributeKind", {
37099
+ enumerable: true,
37100
+ get: function() {
37101
+ return GlobalAttributeKind;
37102
+ }
37103
+ });
37104
+ exports.GreaterThanComparison = GreaterThanComparison;
37105
+ exports.GreaterThanOrEqualComparison = GreaterThanOrEqualComparison;
37106
+ exports.HexCast = HexCast;
37107
+ exports.HexLiteral = HexLiteral;
35822
37108
  exports.JSONApiResponse = JSONApiResponse;
35823
37109
  Object.defineProperty(exports, "KeyTypesUtil", {
35824
37110
  enumerable: true,
@@ -35826,36 +37112,55 @@ Object.defineProperty(exports, "KeyTypesUtil", {
35826
37112
  return KeyTypesUtil_exports;
35827
37113
  }
35828
37114
  });
37115
+ exports.LessThanComparison = LessThanComparison;
37116
+ exports.LessThanOrEqualComparison = LessThanOrEqualComparison;
35829
37117
  Object.defineProperty(exports, "Lib", {
35830
37118
  enumerable: true,
35831
37119
  get: function() {
35832
37120
  return lib_exports;
35833
37121
  }
35834
37122
  });
37123
+ exports.MatchClause = MatchClause;
37124
+ exports.Month = Month;
35835
37125
  Object.defineProperty(exports, "MultiLanguagePropertyUtils", {
35836
37126
  enumerable: true,
35837
37127
  get: function() {
35838
37128
  return MultiLanguagePropertyUtils_exports;
35839
37129
  }
35840
37130
  });
37131
+ exports.NotEqualComparison = NotEqualComparison;
37132
+ exports.NotExpression = NotExpression;
37133
+ exports.NumberCast = NumberCast;
37134
+ exports.NumberLiteral = NumberLiteral;
37135
+ exports.OrExpression = OrExpression;
35841
37136
  Object.defineProperty(exports, "ProtocolInformationSecurityAttributesTypeEnum", {
35842
37137
  enumerable: true,
35843
37138
  get: function() {
35844
37139
  return ProtocolInformationSecurityAttributesTypeEnum;
35845
37140
  }
35846
37141
  });
37142
+ exports.Query = Query;
37143
+ exports.QueryFilter = QueryFilter;
37144
+ Object.defineProperty(exports, "QuerySelect", {
37145
+ enumerable: true,
37146
+ get: function() {
37147
+ return QuerySelect;
37148
+ }
37149
+ });
35847
37150
  Object.defineProperty(exports, "ReferableUtils", {
35848
37151
  enumerable: true,
35849
37152
  get: function() {
35850
37153
  return ReferableUtils_exports;
35851
37154
  }
35852
37155
  });
37156
+ exports.ReferenceAttribute = ReferenceAttribute;
35853
37157
  Object.defineProperty(exports, "ReferenceUtil", {
35854
37158
  enumerable: true,
35855
37159
  get: function() {
35856
37160
  return ReferenceUtil_exports;
35857
37161
  }
35858
37162
  });
37163
+ exports.RegexComparison = RegexComparison;
35859
37164
  exports.RequiredError = RequiredError;
35860
37165
  exports.ResponseError = ResponseError;
35861
37166
  Object.defineProperty(exports, "SemanticIdUtils", {
@@ -35864,6 +37169,15 @@ Object.defineProperty(exports, "SemanticIdUtils", {
35864
37169
  return SemanticIdUtils_exports;
35865
37170
  }
35866
37171
  });
37172
+ Object.defineProperty(exports, "ServiceDescriptionUtils", {
37173
+ enumerable: true,
37174
+ get: function() {
37175
+ return ServiceDescriptionUtils_exports;
37176
+ }
37177
+ });
37178
+ exports.StartsWithComparison = StartsWithComparison;
37179
+ exports.StringCast = StringCast;
37180
+ exports.StringLiteral = StringLiteral;
35867
37181
  exports.SubmodelDescriptor = SubmodelDescriptor;
35868
37182
  exports.SubmodelRegistryClient = SubmodelRegistryClient;
35869
37183
  Object.defineProperty(exports, "SubmodelRegistryService", {
@@ -35881,6 +37195,8 @@ Object.defineProperty(exports, "SubmodelRepositoryService", {
35881
37195
  });
35882
37196
  exports.SubmodelService = SubmodelService;
35883
37197
  exports.TextApiResponse = TextApiResponse;
37198
+ exports.TimeCast = TimeCast;
37199
+ exports.TimeLiteral = TimeLiteral;
35884
37200
  Object.defineProperty(exports, "Utils", {
35885
37201
  enumerable: true,
35886
37202
  get: function() {
@@ -35888,6 +37204,7 @@ Object.defineProperty(exports, "Utils", {
35888
37204
  }
35889
37205
  });
35890
37206
  exports.VoidApiResponse = VoidApiResponse;
37207
+ exports.Year = Year;
35891
37208
  exports.applyDefaults = applyDefaults;
35892
37209
  exports.assetAdministrationShellDescriptorFromJsonable = assetAdministrationShellDescriptorFromJsonable;
35893
37210
  exports.base64Decode = base64Decode;
@@ -35924,25 +37241,31 @@ exports.exists = exists;
35924
37241
  exports.extractEndpointHref = extractEndpointHref;
35925
37242
  exports.extractId = extractId;
35926
37243
  exports.extractVersionRevision = extractVersionRevision;
37244
+ exports.findEndpoint = findEndpoint;
35927
37245
  exports.firstLangStringSetText = firstLangStringSetText;
35928
37246
  exports.getEquivalentEclassSemanticIds = getEquivalentEclassSemanticIds;
35929
37247
  exports.getEquivalentIriSemanticIds = getEquivalentIriSemanticIds;
35930
37248
  exports.getKeyTypeAbbreviation = getKeyTypeAbbreviation;
37249
+ exports.getQueryEndpoints = getQueryEndpoints;
35931
37250
  exports.getSubmodelElementByIdShort = getSubmodelElementByIdShort;
35932
37251
  exports.getSubmodelElementBySemanticId = getSubmodelElementBySemanticId;
35933
37252
  exports.getSubmodelElementsByIdShort = getSubmodelElementsByIdShort;
35934
37253
  exports.getSubmodelElementsBySemanticId = getSubmodelElementsBySemanticId;
35935
37254
  exports.handleApiError = handleApiError;
35936
37255
  exports.hasValue = hasValue;
37256
+ exports.isRepositoryEndpoint = isRepositoryEndpoint;
35937
37257
  exports.keyTypes = keyTypes;
35938
37258
  exports.nameToDisplay = nameToDisplay;
35939
37259
  exports.protocolInformationFromJsonable = protocolInformationFromJsonable;
37260
+ exports.queryFromJsonable = queryFromJsonable;
35940
37261
  exports.querystring = querystring;
35941
37262
  exports.serializeXml = serializeXml;
35942
37263
  exports.submodelDescriptorFromJsonable = submodelDescriptorFromJsonable;
37264
+ exports.supportsQuery = supportsQuery;
35943
37265
  exports.toJsonableAssetAdministrationShellDescriptor = toJsonableAssetAdministrationShellDescriptor;
35944
37266
  exports.toJsonableEndpoint = toJsonableEndpoint;
35945
37267
  exports.toJsonableProtocolInformation = toJsonableProtocolInformation;
37268
+ exports.toJsonableQuery = toJsonableQuery;
35946
37269
  exports.toJsonableSecurityAttribute = toJsonableSecurityAttribute;
35947
37270
  exports.toJsonableSubmodelDescriptor = toJsonableSubmodelDescriptor;
35948
37271
  exports.valueToDisplay = valueToDisplay;