@twin.org/engine-types 0.0.2-next.1 → 0.0.2-next.2

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 (85) hide show
  1. package/dist/cjs/index.cjs +212 -45
  2. package/dist/esm/index.mjs +214 -47
  3. package/dist/types/components/identity.d.ts +1 -1
  4. package/dist/types/components/identityProfile.d.ts +1 -1
  5. package/dist/types/components/telemetry.d.ts +1 -1
  6. package/dist/types/components/vault.d.ts +1 -1
  7. package/dist/types/components/verifiableStorage.d.ts +1 -1
  8. package/dist/types/models/config/attestationComponentConfig.d.ts +4 -0
  9. package/dist/types/models/config/auditableItemGraphComponentConfig.d.ts +4 -0
  10. package/dist/types/models/config/auditableItemStreamComponentConfig.d.ts +4 -0
  11. package/dist/types/models/config/blobStorageComponentConfig.d.ts +4 -0
  12. package/dist/types/models/config/dataProcessingComponentConfig.d.ts +4 -0
  13. package/dist/types/models/config/documentManagementComponentConfig.d.ts +5 -1
  14. package/dist/types/models/config/entityStorageComponentConfig.d.ts +9 -0
  15. package/dist/types/models/config/eventBusComponentConfig.d.ts +4 -0
  16. package/dist/types/models/config/federatedCatalogueComponentConfig.d.ts +4 -0
  17. package/dist/types/models/config/identityComponentConfig.d.ts +4 -0
  18. package/dist/types/models/config/identityProfileComponentConfig.d.ts +4 -0
  19. package/dist/types/models/config/identityResolverComponentConfig.d.ts +6 -2
  20. package/dist/types/models/config/immutableProofComponentConfig.d.ts +4 -0
  21. package/dist/types/models/config/loggingComponentConfig.d.ts +4 -0
  22. package/dist/types/models/config/nftComponentConfig.d.ts +4 -0
  23. package/dist/types/models/config/rightsManagementComponentConfig.d.ts +4 -0
  24. package/dist/types/models/config/taskSchedulerComponentConfig.d.ts +1 -1
  25. package/dist/types/models/config/telemetryComponentConfig.d.ts +4 -0
  26. package/dist/types/models/config/verifiableStorageComponentConfig.d.ts +4 -0
  27. package/dist/types/models/types/attestationComponentType.d.ts +4 -0
  28. package/dist/types/models/types/auditableItemGraphComponentType.d.ts +4 -0
  29. package/dist/types/models/types/auditableItemStreamComponentType.d.ts +4 -0
  30. package/dist/types/models/types/blobStorageComponentType.d.ts +4 -0
  31. package/dist/types/models/types/dataProcessingComponentType.d.ts +4 -0
  32. package/dist/types/models/types/documentManagementComponentType.d.ts +4 -0
  33. package/dist/types/models/types/entityStorageComponentType.d.ts +4 -0
  34. package/dist/types/models/types/eventBusComponentType.d.ts +4 -0
  35. package/dist/types/models/types/federatedCatalogueComponentType.d.ts +4 -0
  36. package/dist/types/models/types/identityComponentType.d.ts +4 -0
  37. package/dist/types/models/types/identityProfileComponentType.d.ts +4 -0
  38. package/dist/types/models/types/identityResolverComponentType.d.ts +4 -0
  39. package/dist/types/models/types/immutableProofComponentType.d.ts +4 -0
  40. package/dist/types/models/types/loggingComponentType.d.ts +4 -0
  41. package/dist/types/models/types/nftComponentType.d.ts +4 -0
  42. package/dist/types/models/types/rightsManagementComponentType.d.ts +4 -0
  43. package/dist/types/models/types/taskSchedulerComponentType.d.ts +1 -1
  44. package/dist/types/models/types/telemetryComponentType.d.ts +4 -0
  45. package/dist/types/models/types/verifiableStorageComponentType.d.ts +4 -0
  46. package/docs/changelog.md +14 -0
  47. package/docs/reference/type-aliases/AttestationComponentConfig.md +1 -13
  48. package/docs/reference/type-aliases/AuditableItemGraphComponentConfig.md +1 -13
  49. package/docs/reference/type-aliases/AuditableItemStreamComponentConfig.md +1 -13
  50. package/docs/reference/type-aliases/BlobStorageComponentConfig.md +1 -13
  51. package/docs/reference/type-aliases/DataProcessingComponentConfig.md +1 -13
  52. package/docs/reference/type-aliases/DocumentManagementComponentConfig.md +2 -14
  53. package/docs/reference/type-aliases/EntityStorageComponentConfig.md +1 -13
  54. package/docs/reference/type-aliases/EventBusComponentConfig.md +1 -13
  55. package/docs/reference/type-aliases/FederatedCatalogueComponentConfig.md +1 -13
  56. package/docs/reference/type-aliases/IdentityComponentConfig.md +1 -13
  57. package/docs/reference/type-aliases/IdentityProfileComponentConfig.md +1 -13
  58. package/docs/reference/type-aliases/IdentityResolverComponentConfig.md +1 -13
  59. package/docs/reference/type-aliases/ImmutableProofComponentConfig.md +1 -13
  60. package/docs/reference/type-aliases/LoggingComponentConfig.md +1 -13
  61. package/docs/reference/type-aliases/NftComponentConfig.md +1 -13
  62. package/docs/reference/type-aliases/RightsManagementComponentConfig.md +1 -13
  63. package/docs/reference/type-aliases/TaskSchedulerComponentConfig.md +1 -1
  64. package/docs/reference/type-aliases/TelemetryComponentConfig.md +1 -13
  65. package/docs/reference/type-aliases/VerifiableStorageComponentConfig.md +1 -13
  66. package/docs/reference/variables/AttestationComponentType.md +6 -0
  67. package/docs/reference/variables/AuditableItemGraphComponentType.md +6 -0
  68. package/docs/reference/variables/AuditableItemStreamComponentType.md +6 -0
  69. package/docs/reference/variables/BlobStorageComponentType.md +6 -0
  70. package/docs/reference/variables/DataProcessingComponentType.md +6 -0
  71. package/docs/reference/variables/DocumentManagementComponentType.md +6 -0
  72. package/docs/reference/variables/EntityStorageComponentType.md +6 -0
  73. package/docs/reference/variables/EventBusComponentType.md +6 -0
  74. package/docs/reference/variables/FederatedCatalogueComponentType.md +6 -0
  75. package/docs/reference/variables/IdentityComponentType.md +6 -0
  76. package/docs/reference/variables/IdentityProfileComponentType.md +6 -0
  77. package/docs/reference/variables/IdentityResolverComponentType.md +6 -0
  78. package/docs/reference/variables/ImmutableProofComponentType.md +6 -0
  79. package/docs/reference/variables/LoggingComponentType.md +6 -0
  80. package/docs/reference/variables/NftComponentType.md +6 -0
  81. package/docs/reference/variables/RightsManagementComponentType.md +6 -0
  82. package/docs/reference/variables/TaskSchedulerComponentType.md +2 -2
  83. package/docs/reference/variables/TelemetryComponentType.md +6 -0
  84. package/docs/reference/variables/VerifiableStorageComponentType.md +6 -0
  85. package/package.json +18 -2
@@ -1,7 +1,9 @@
1
1
  import { NftAttestationConnector } from '@twin.org/attestation-connector-nft';
2
2
  import { AttestationConnectorFactory } from '@twin.org/attestation-models';
3
+ import { AttestationClient } from '@twin.org/attestation-rest-client';
3
4
  import { AttestationService } from '@twin.org/attestation-service';
4
- import { I18n, GeneralError, ComponentFactory, StringHelper, Is } from '@twin.org/core';
5
+ import { I18n, GeneralError, StringHelper, ComponentFactory, Is } from '@twin.org/core';
6
+ import { AuditableItemGraphClient } from '@twin.org/auditable-item-graph-rest-client';
5
7
  import { initSchema, AuditableItemGraphService } from '@twin.org/auditable-item-graph-service';
6
8
  import path from 'node:path';
7
9
  import { CosmosDbEntityStorageConnector } from '@twin.org/entity-storage-connector-cosmosdb';
@@ -14,7 +16,9 @@ import { MySqlEntityStorageConnector } from '@twin.org/entity-storage-connector-
14
16
  import { PostgreSqlEntityStorageConnector } from '@twin.org/entity-storage-connector-postgresql';
15
17
  import { ScyllaDBTableConnector } from '@twin.org/entity-storage-connector-scylladb';
16
18
  import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
19
+ import { EntityStorageClient } from '@twin.org/entity-storage-rest-client';
17
20
  import { EntityStorageService } from '@twin.org/entity-storage-service';
21
+ import { AuditableItemStreamClient } from '@twin.org/auditable-item-stream-rest-client';
18
22
  import { initSchema as initSchema$1, AuditableItemStreamService } from '@twin.org/auditable-item-stream-service';
19
23
  import { initSchema as initSchema$2, EntityStorageBackgroundTaskConnector } from '@twin.org/background-task-connector-entity-storage';
20
24
  import { BackgroundTaskConnectorFactory } from '@twin.org/background-task-models';
@@ -25,28 +29,36 @@ import { GcpBlobStorageConnector } from '@twin.org/blob-storage-connector-gcp';
25
29
  import { IpfsBlobStorageConnector } from '@twin.org/blob-storage-connector-ipfs';
26
30
  import { MemoryBlobStorageConnector } from '@twin.org/blob-storage-connector-memory';
27
31
  import { BlobStorageConnectorFactory } from '@twin.org/blob-storage-models';
32
+ import { BlobStorageClient } from '@twin.org/blob-storage-rest-client';
28
33
  import { initSchema as initSchema$3, BlobStorageService } from '@twin.org/blob-storage-service';
29
34
  import { JsonConverterConnector, XmlConverterConnector } from '@twin.org/data-processing-converters';
30
35
  import { JsonPathExtractorConnector } from '@twin.org/data-processing-extractors';
31
36
  import { DataConverterConnectorFactory, DataExtractorConnectorFactory } from '@twin.org/data-processing-models';
37
+ import { DataProcessingClient } from '@twin.org/data-processing-rest-client';
32
38
  import { initSchema as initSchema$4, DataProcessingService } from '@twin.org/data-processing-service';
39
+ import { DocumentManagementClient } from '@twin.org/document-management-rest-client';
33
40
  import { DocumentManagementService } from '@twin.org/document-management-service';
34
41
  import { LocalEventBusConnector } from '@twin.org/event-bus-connector-local';
35
42
  import { EventBusConnectorFactory } from '@twin.org/event-bus-models';
36
43
  import { EventBusService } from '@twin.org/event-bus-service';
44
+ import { EventBusSocketClient } from '@twin.org/event-bus-socket-client';
37
45
  import { EntityStorageFaucetConnector, EntityStorageWalletConnector, initSchema as initSchema$g } from '@twin.org/wallet-connector-entity-storage';
38
46
  import { IotaFaucetConnector, IotaWalletConnector } from '@twin.org/wallet-connector-iota';
39
47
  import { FaucetConnectorFactory, WalletConnectorFactory } from '@twin.org/wallet-models';
48
+ import { FederatedCatalogueClient } from '@twin.org/federated-catalogue-rest-client';
40
49
  import { initSchema as initSchema$5, FederatedCatalogueService } from '@twin.org/federated-catalogue-service';
41
50
  import { initSchema as initSchema$6, EntityStorageIdentityConnector, EntityStorageIdentityProfileConnector, EntityStorageIdentityResolverConnector } from '@twin.org/identity-connector-entity-storage';
42
51
  import { IotaIdentityConnector, IotaIdentityResolverConnector } from '@twin.org/identity-connector-iota';
43
52
  import { IdentityConnectorFactory, IdentityProfileConnectorFactory, IdentityResolverConnectorFactory } from '@twin.org/identity-models';
53
+ import { IdentityClient, IdentityProfileClient, IdentityResolverClient } from '@twin.org/identity-rest-client';
44
54
  import { IdentityService, IdentityProfileService, IdentityResolverService } from '@twin.org/identity-service';
45
55
  import { UniversalResolverConnector } from '@twin.org/identity-connector-universal';
56
+ import { ImmutableProofClient } from '@twin.org/immutable-proof-rest-client';
46
57
  import { initSchema as initSchema$7, ImmutableProofService } from '@twin.org/immutable-proof-service';
47
58
  import { ConsoleLoggingConnector } from '@twin.org/logging-connector-console';
48
59
  import { initSchema as initSchema$8, EntityStorageLoggingConnector } from '@twin.org/logging-connector-entity-storage';
49
60
  import { MultiLoggingConnector, LoggingConnectorFactory } from '@twin.org/logging-models';
61
+ import { LoggingClient } from '@twin.org/logging-rest-client';
50
62
  import { LoggingService } from '@twin.org/logging-service';
51
63
  import { AwsMessagingEmailConnector, AwsMessagingSmsConnector, AwsMessagingPushNotificationConnector } from '@twin.org/messaging-connector-aws';
52
64
  import { initSchema as initSchema$9, EntityStorageMessagingEmailConnector, EntityStorageMessagingSmsConnector, EntityStorageMessagingPushNotificationConnector } from '@twin.org/messaging-connector-entity-storage';
@@ -55,12 +67,15 @@ import { initSchema as initSchema$a, MessagingService } from '@twin.org/messagin
55
67
  import { initSchema as initSchema$b, EntityStorageNftConnector } from '@twin.org/nft-connector-entity-storage';
56
68
  import { IotaNftConnector } from '@twin.org/nft-connector-iota';
57
69
  import { NftConnectorFactory } from '@twin.org/nft-models';
70
+ import { NftClient } from '@twin.org/nft-rest-client';
58
71
  import { NftService } from '@twin.org/nft-service';
72
+ import { RightsManagementClient } from '@twin.org/rights-management-rest-client';
59
73
  import { RightsManagementService } from '@twin.org/rights-management-service';
60
74
  import { initSchema as initSchema$c, PolicyAdministrationPointService } from '@twin.org/rights-management-pap-service';
61
- import { TaskSchedulerComponent } from '@twin.org/background-task-scheduler';
75
+ import { TaskSchedulerService } from '@twin.org/background-task-scheduler';
62
76
  import { initSchema as initSchema$d, EntityStorageTelemetryConnector } from '@twin.org/telemetry-connector-entity-storage';
63
77
  import { TelemetryConnectorFactory } from '@twin.org/telemetry-models';
78
+ import { TelemetryClient } from '@twin.org/telemetry-rest-client';
64
79
  import { TelemetryService } from '@twin.org/telemetry-service';
65
80
  import { initSchema as initSchema$e, EntityStorageVaultConnector } from '@twin.org/vault-connector-entity-storage';
66
81
  import { HashicorpVaultConnector } from '@twin.org/vault-connector-hashicorp';
@@ -68,6 +83,7 @@ import { VaultConnectorFactory } from '@twin.org/vault-models';
68
83
  import { initSchema as initSchema$f, EntityStorageVerifiableStorageConnector } from '@twin.org/verifiable-storage-connector-entity-storage';
69
84
  import { IotaVerifiableStorageConnector } from '@twin.org/verifiable-storage-connector-iota';
70
85
  import { VerifiableStorageConnectorFactory } from '@twin.org/verifiable-storage-models';
86
+ import { VerifiableStorageClient } from '@twin.org/verifiable-storage-rest-client';
71
87
  import { VerifiableStorageService } from '@twin.org/verifiable-storage-service';
72
88
 
73
89
  // Copyright 2024 IOTA Stiftung.
@@ -80,7 +96,11 @@ const AttestationComponentType = {
80
96
  /**
81
97
  * Service.
82
98
  */
83
- Service: "service"
99
+ Service: "service",
100
+ /**
101
+ * REST client.
102
+ */
103
+ RestClient: "rest-client"
84
104
  };
85
105
 
86
106
  // Copyright 2024 IOTA Stiftung.
@@ -156,7 +176,11 @@ function initialiseAttestationComponent(engineCore, context, instanceConfig, ove
156
176
  component = new AttestationService({
157
177
  ...instanceConfig.options
158
178
  });
159
- instanceType = AttestationService.NAMESPACE;
179
+ instanceType = StringHelper.kebabCase("AttestationService");
180
+ }
181
+ else if (type === AttestationComponentType.RestClient) {
182
+ component = new AttestationClient(instanceConfig.options);
183
+ instanceType = StringHelper.kebabCase("AttestationClient");
160
184
  }
161
185
  else {
162
186
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -183,7 +207,11 @@ const EntityStorageComponentType = {
183
207
  /**
184
208
  * Service.
185
209
  */
186
- Service: "service"
210
+ Service: "service",
211
+ /**
212
+ * REST client.
213
+ */
214
+ RestClient: "rest-client"
187
215
  };
188
216
 
189
217
  // Copyright 2024 IOTA Stiftung.
@@ -386,14 +414,14 @@ function initialiseEntityStorageComponent(engineCore, context, instanceConfig, o
386
414
  element: `Entity Storage Component: ${instanceConfig.type}`
387
415
  }));
388
416
  const type = instanceConfig.type;
389
- let connector;
417
+ let component;
390
418
  let instanceType;
391
419
  if (type === EntityStorageComponentType.Service) {
392
420
  const kebabName = StringHelper.kebabCase(instanceConfig.options.entityStorageType);
393
421
  // See if there is a custom entity storage for this type, otherwise just use the default one.
394
422
  const hasCustom = context.config.types.entityStorageConnector?.some(c => c.type === kebabName || c.overrideInstanceType === kebabName);
395
423
  initialiseEntityStorageConnector(engineCore, context, hasCustom ? kebabName : undefined, instanceConfig.options.entityStorageType);
396
- connector = new EntityStorageService({
424
+ component = new EntityStorageService({
397
425
  entityStorageType: kebabName,
398
426
  config: {
399
427
  ...instanceConfig.options.config
@@ -401,6 +429,14 @@ function initialiseEntityStorageComponent(engineCore, context, instanceConfig, o
401
429
  });
402
430
  instanceType = StringHelper.kebabCase(instanceConfig.options.entityStorageType);
403
431
  }
432
+ else if (type === EntityStorageComponentType.RestClient) {
433
+ const kebabName = StringHelper.kebabCase(instanceConfig.options.entityStorageType);
434
+ component = new EntityStorageClient({
435
+ pathPrefix: kebabName,
436
+ ...instanceConfig.options
437
+ });
438
+ instanceType = `${StringHelper.kebabCase("EntityStorageClient")}-${kebabName}`;
439
+ }
404
440
  else {
405
441
  throw new GeneralError("engineCore", "componentUnknownType", {
406
442
  type,
@@ -410,9 +446,9 @@ function initialiseEntityStorageComponent(engineCore, context, instanceConfig, o
410
446
  const finalInstanceType = overrideInstanceType ?? instanceType;
411
447
  context.componentInstances.push({
412
448
  instanceType: finalInstanceType,
413
- component: connector
449
+ component
414
450
  });
415
- ComponentFactory.register(finalInstanceType, () => connector);
451
+ ComponentFactory.register(finalInstanceType, () => component);
416
452
  return finalInstanceType;
417
453
  }
418
454
 
@@ -426,7 +462,11 @@ const AuditableItemGraphComponentType = {
426
462
  /**
427
463
  * Service.
428
464
  */
429
- Service: "service"
465
+ Service: "service",
466
+ /**
467
+ * REST client.
468
+ */
469
+ RestClient: "rest-client"
430
470
  };
431
471
 
432
472
  /**
@@ -454,7 +494,11 @@ function initialiseAuditableItemGraphComponent(engineCore, context, instanceConf
454
494
  eventBusComponentType: context.defaultTypes.eventBusComponent,
455
495
  ...instanceConfig.options
456
496
  });
457
- instanceType = AuditableItemGraphService.NAMESPACE;
497
+ instanceType = StringHelper.kebabCase("AuditableItemGraphService");
498
+ }
499
+ else if (type === AuditableItemGraphComponentType.RestClient) {
500
+ component = new AuditableItemGraphClient(instanceConfig.options);
501
+ instanceType = StringHelper.kebabCase("AuditableItemGraphClient");
458
502
  }
459
503
  else {
460
504
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -481,7 +525,11 @@ const AuditableItemStreamComponentType = {
481
525
  /**
482
526
  * Service.
483
527
  */
484
- Service: "service"
528
+ Service: "service",
529
+ /**
530
+ * REST client.
531
+ */
532
+ RestClient: "rest-client"
485
533
  };
486
534
 
487
535
  /**
@@ -509,7 +557,11 @@ function initialiseAuditableItemStreamComponent(engineCore, context, instanceCon
509
557
  eventBusComponentType: context.defaultTypes.eventBusComponent,
510
558
  ...instanceConfig.options
511
559
  });
512
- instanceType = AuditableItemStreamService.NAMESPACE;
560
+ instanceType = StringHelper.kebabCase("AuditableItemStreamService");
561
+ }
562
+ else if (type === AuditableItemStreamComponentType.RestClient) {
563
+ component = new AuditableItemStreamClient(instanceConfig.options);
564
+ instanceType = StringHelper.kebabCase("AuditableItemStreamClient");
513
565
  }
514
566
  else {
515
567
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -588,7 +640,11 @@ const BlobStorageComponentType = {
588
640
  /**
589
641
  * Service.
590
642
  */
591
- Service: "service"
643
+ Service: "service",
644
+ /**
645
+ * REST client.
646
+ */
647
+ RestClient: "rest-client"
592
648
  };
593
649
 
594
650
  // Copyright 2024 IOTA Stiftung.
@@ -729,7 +785,11 @@ function initialiseBlobStorageComponent(engineCore, context, instanceConfig, ove
729
785
  vaultConnectorType: context.defaultTypes.vaultConnector,
730
786
  ...instanceConfig.options
731
787
  });
732
- instanceType = BlobStorageService.NAMESPACE;
788
+ instanceType = StringHelper.kebabCase("BlobStorageService");
789
+ }
790
+ else if (type === BlobStorageComponentType.RestClient) {
791
+ component = new BlobStorageClient(instanceConfig.options);
792
+ instanceType = StringHelper.kebabCase("BlobStorageClient");
733
793
  }
734
794
  else {
735
795
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -786,7 +846,11 @@ const DataProcessingComponentType = {
786
846
  /**
787
847
  * Service.
788
848
  */
789
- Service: "service"
849
+ Service: "service",
850
+ /**
851
+ * REST client.
852
+ */
853
+ RestClient: "rest-client"
790
854
  };
791
855
 
792
856
  // Copyright 2024 IOTA Stiftung.
@@ -885,7 +949,11 @@ function initialiseDataProcessingComponent(engineCore, context, instanceConfig,
885
949
  component = new DataProcessingService({
886
950
  ...instanceConfig.options
887
951
  });
888
- instanceType = DataProcessingService.NAMESPACE;
952
+ instanceType = StringHelper.kebabCase("DataProcessingService");
953
+ }
954
+ else if (type === DataProcessingComponentType.RestClient) {
955
+ component = new DataProcessingClient(instanceConfig.options);
956
+ instanceType = StringHelper.kebabCase("DataProcessingClient");
889
957
  }
890
958
  else {
891
959
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -912,7 +980,11 @@ const DocumentManagementComponentType = {
912
980
  /**
913
981
  * Service.
914
982
  */
915
- Service: "service"
983
+ Service: "service",
984
+ /**
985
+ * REST client.
986
+ */
987
+ RestClient: "rest-client"
916
988
  };
917
989
 
918
990
  // Copyright 2024 IOTA Stiftung.
@@ -941,7 +1013,11 @@ function initialiseDocumentManagementComponent(engineCore, context, instanceConf
941
1013
  dataProcessingComponentType: context.defaultTypes.dataProcessingComponent,
942
1014
  ...instanceConfig.options
943
1015
  });
944
- instanceType = DocumentManagementService.NAMESPACE;
1016
+ instanceType = StringHelper.kebabCase("DocumentManagementService");
1017
+ }
1018
+ else if (type === DocumentManagementComponentType.RestClient) {
1019
+ component = new DocumentManagementClient(instanceConfig.options);
1020
+ instanceType = StringHelper.kebabCase("DocumentManagementClient");
945
1021
  }
946
1022
  else {
947
1023
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -968,7 +1044,11 @@ const EventBusComponentType = {
968
1044
  /**
969
1045
  * Service.
970
1046
  */
971
- Service: "service"
1047
+ Service: "service",
1048
+ /**
1049
+ * Socket client.
1050
+ */
1051
+ SocketClient: "socket-client"
972
1052
  };
973
1053
 
974
1054
  // Copyright 2024 IOTA Stiftung.
@@ -1041,7 +1121,14 @@ function initialiseEventBusComponent(engineCore, context, instanceConfig, overri
1041
1121
  eventBusConnectorType: context.defaultTypes.eventBusConnector,
1042
1122
  ...instanceConfig.options
1043
1123
  });
1044
- instanceType = EventBusService.NAMESPACE;
1124
+ instanceType = StringHelper.kebabCase("EventBusService");
1125
+ }
1126
+ else if (type === EventBusComponentType.SocketClient) {
1127
+ component = new EventBusSocketClient({
1128
+ loggingComponentType: context.defaultTypes.loggingConnector,
1129
+ ...instanceConfig.options
1130
+ });
1131
+ instanceType = StringHelper.kebabCase("EventBusSocketClient");
1045
1132
  }
1046
1133
  else {
1047
1134
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1130,7 +1217,11 @@ const FederatedCatalogueComponentType = {
1130
1217
  /**
1131
1218
  * Service.
1132
1219
  */
1133
- Service: "service"
1220
+ Service: "service",
1221
+ /**
1222
+ * REST client.
1223
+ */
1224
+ RestClient: "rest-client"
1134
1225
  };
1135
1226
 
1136
1227
  // Copyright 2024 IOTA Stiftung.
@@ -1162,7 +1253,11 @@ function initialiseFederatedCatalogueComponent(engineCore, context, instanceConf
1162
1253
  identityResolverComponentType: context.defaultTypes.identityResolverComponent,
1163
1254
  ...instanceConfig.options
1164
1255
  });
1165
- instanceType = FederatedCatalogueService.NAMESPACE;
1256
+ instanceType = StringHelper.kebabCase("FederatedCatalogueService");
1257
+ }
1258
+ else if (type === FederatedCatalogueComponentType.RestClient) {
1259
+ component = new FederatedCatalogueClient(instanceConfig.options);
1260
+ instanceType = StringHelper.kebabCase("FederatedCatalogueClient");
1166
1261
  }
1167
1262
  else {
1168
1263
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1189,7 +1284,11 @@ const IdentityComponentType = {
1189
1284
  /**
1190
1285
  * Service.
1191
1286
  */
1192
- Service: "service"
1287
+ Service: "service",
1288
+ /**
1289
+ * REST client.
1290
+ */
1291
+ RestClient: "rest-client"
1193
1292
  };
1194
1293
 
1195
1294
  // Copyright 2024 IOTA Stiftung.
@@ -1277,7 +1376,11 @@ function initialiseIdentityComponent(engineCore, context, instanceConfig, overri
1277
1376
  let instanceType;
1278
1377
  if (type === IdentityComponentType.Service) {
1279
1378
  component = new IdentityService(instanceConfig.options);
1280
- instanceType = IdentityService.NAMESPACE;
1379
+ instanceType = StringHelper.kebabCase("IdentityService");
1380
+ }
1381
+ else if (type === IdentityComponentType.RestClient) {
1382
+ component = new IdentityClient(instanceConfig.options);
1383
+ instanceType = StringHelper.kebabCase("IdentityClient");
1281
1384
  }
1282
1385
  else {
1283
1386
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1301,7 +1404,11 @@ const IdentityProfileComponentType = {
1301
1404
  /**
1302
1405
  * Service.
1303
1406
  */
1304
- Service: "service"
1407
+ Service: "service",
1408
+ /**
1409
+ * REST client.
1410
+ */
1411
+ RestClient: "rest-client"
1305
1412
  };
1306
1413
 
1307
1414
  // Copyright 2024 IOTA Stiftung.
@@ -1376,7 +1483,11 @@ function initialiseIdentityProfileComponent(engineCore, context, instanceConfig,
1376
1483
  profileEntityConnectorType: context.defaultTypes.identityProfileConnector,
1377
1484
  ...instanceConfig.options
1378
1485
  });
1379
- instanceType = IdentityProfileService.NAMESPACE;
1486
+ instanceType = StringHelper.kebabCase("IdentityProfileService");
1487
+ }
1488
+ else if (type === IdentityProfileComponentType.RestClient) {
1489
+ component = new IdentityProfileClient(instanceConfig.options);
1490
+ instanceType = StringHelper.kebabCase("IdentityProfileClient");
1380
1491
  }
1381
1492
  else {
1382
1493
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1403,7 +1514,11 @@ const IdentityResolverComponentType = {
1403
1514
  /**
1404
1515
  * Service.
1405
1516
  */
1406
- Service: "service"
1517
+ Service: "service",
1518
+ /**
1519
+ * REST client.
1520
+ */
1521
+ RestClient: "rest-client"
1407
1522
  };
1408
1523
 
1409
1524
  // Copyright 2024 IOTA Stiftung.
@@ -1505,7 +1620,11 @@ function initialiseIdentityResolverComponent(engineCore, context, instanceConfig
1505
1620
  : undefined,
1506
1621
  ...instanceConfig.options
1507
1622
  });
1508
- instanceType = IdentityResolverService.NAMESPACE;
1623
+ instanceType = StringHelper.kebabCase("IdentityResolverService");
1624
+ }
1625
+ else if (type === IdentityResolverComponentType.RestClient) {
1626
+ component = new IdentityResolverClient(instanceConfig.options);
1627
+ instanceType = StringHelper.kebabCase("IdentityResolverClient");
1509
1628
  }
1510
1629
  else {
1511
1630
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1529,7 +1648,11 @@ const ImmutableProofComponentType = {
1529
1648
  /**
1530
1649
  * Service.
1531
1650
  */
1532
- Service: "service"
1651
+ Service: "service",
1652
+ /**
1653
+ * REST client.
1654
+ */
1655
+ RestClient: "rest-client"
1533
1656
  };
1534
1657
 
1535
1658
  // Copyright 2024 IOTA Stiftung.
@@ -1560,7 +1683,11 @@ function initialiseImmutableProofComponent(engineCore, context, instanceConfig,
1560
1683
  eventBusComponentType: context.defaultTypes.eventBusComponent,
1561
1684
  ...instanceConfig.options
1562
1685
  });
1563
- instanceType = ImmutableProofService.NAMESPACE;
1686
+ instanceType = StringHelper.kebabCase("ImmutableProofService");
1687
+ }
1688
+ else if (type === ImmutableProofComponentType.RestClient) {
1689
+ component = new ImmutableProofClient(instanceConfig.options);
1690
+ instanceType = StringHelper.kebabCase("ImmutableProofClient");
1564
1691
  }
1565
1692
  else {
1566
1693
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1587,7 +1714,11 @@ const LoggingComponentType = {
1587
1714
  /**
1588
1715
  * Service.
1589
1716
  */
1590
- Service: "service"
1717
+ Service: "service",
1718
+ /**
1719
+ * REST client.
1720
+ */
1721
+ RestClient: "rest-client"
1591
1722
  };
1592
1723
 
1593
1724
  // Copyright 2024 IOTA Stiftung.
@@ -1675,7 +1806,11 @@ function initialiseLoggingComponent(engineCore, context, instanceConfig, overrid
1675
1806
  loggingConnectorType: context.defaultTypes.loggingConnector,
1676
1807
  ...instanceConfig.options
1677
1808
  });
1678
- instanceType = LoggingService.NAMESPACE;
1809
+ instanceType = StringHelper.kebabCase("LoggingService");
1810
+ }
1811
+ else if (type === LoggingComponentType.RestClient) {
1812
+ component = new LoggingClient(instanceConfig.options);
1813
+ instanceType = StringHelper.kebabCase("LoggingClient");
1679
1814
  }
1680
1815
  else {
1681
1816
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1910,7 +2045,7 @@ function initialiseMessagingComponent(engineCore, context, instanceConfig, overr
1910
2045
  messagingPushNotificationConnectorType: context.defaultTypes.messagingNotificationConnector,
1911
2046
  ...instanceConfig.options
1912
2047
  });
1913
- instanceType = MessagingService.NAMESPACE;
2048
+ instanceType = StringHelper.kebabCase("MessagingService");
1914
2049
  }
1915
2050
  else {
1916
2051
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1934,7 +2069,11 @@ const NftComponentType = {
1934
2069
  /**
1935
2070
  * Service.
1936
2071
  */
1937
- Service: "service"
2072
+ Service: "service",
2073
+ /**
2074
+ * REST client.
2075
+ */
2076
+ RestClient: "rest-client"
1938
2077
  };
1939
2078
 
1940
2079
  // Copyright 2024 IOTA Stiftung.
@@ -2018,7 +2157,11 @@ function initialiseNftComponent(engineCore, context, instanceConfig, overrideIns
2018
2157
  let instanceType;
2019
2158
  if (type === NftComponentType.Service) {
2020
2159
  component = new NftService(instanceConfig.options);
2021
- instanceType = NftService.NAMESPACE;
2160
+ instanceType = StringHelper.kebabCase("NftService");
2161
+ }
2162
+ else if (type === NftComponentType.RestClient) {
2163
+ component = new NftClient(instanceConfig.options);
2164
+ instanceType = StringHelper.kebabCase("NftClient");
2022
2165
  }
2023
2166
  else {
2024
2167
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -2045,7 +2188,11 @@ const RightsManagementComponentType = {
2045
2188
  /**
2046
2189
  * Service.
2047
2190
  */
2048
- Service: "service"
2191
+ Service: "service",
2192
+ /**
2193
+ * REST client.
2194
+ */
2195
+ RestClient: "rest-client"
2049
2196
  };
2050
2197
 
2051
2198
  // Copyright 2024 IOTA Stiftung.
@@ -2071,7 +2218,11 @@ function initialiseRightsManagementComponent(engineCore, context, instanceConfig
2071
2218
  papComponentType: context.defaultTypes.rightsManagementPapComponent,
2072
2219
  ...instanceConfig.options
2073
2220
  });
2074
- instanceType = RightsManagementService.NAMESPACE;
2221
+ instanceType = StringHelper.kebabCase("RightsManagementService");
2222
+ }
2223
+ else if (type === RightsManagementComponentType.RestClient) {
2224
+ component = new RightsManagementClient(instanceConfig.options);
2225
+ instanceType = StringHelper.kebabCase("RightsManagementClient");
2075
2226
  }
2076
2227
  else {
2077
2228
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -2123,7 +2274,7 @@ function initialiseRightsManagementPapComponent(engineCore, context, instanceCon
2123
2274
  initSchema$c();
2124
2275
  initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.odrlPolicyEntityStorageType, "OdrlPolicy");
2125
2276
  component = new PolicyAdministrationPointService(instanceConfig.options);
2126
- instanceType = PolicyAdministrationPointService.NAMESPACE;
2277
+ instanceType = StringHelper.kebabCase("PolicyAdministrationPointService");
2127
2278
  }
2128
2279
  else {
2129
2280
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -2150,7 +2301,7 @@ const TaskSchedulerComponentType = {
2150
2301
  /**
2151
2302
  * Task scheduler.
2152
2303
  */
2153
- Default: "default"
2304
+ Service: "service"
2154
2305
  };
2155
2306
 
2156
2307
  /**
@@ -2169,12 +2320,12 @@ function initialiseTaskSchedulerComponent(engineCore, context, instanceConfig, o
2169
2320
  const type = instanceConfig.type;
2170
2321
  let component;
2171
2322
  let instanceType;
2172
- if (type === TaskSchedulerComponentType.Default) {
2173
- component = new TaskSchedulerComponent({
2323
+ if (type === TaskSchedulerComponentType.Service) {
2324
+ component = new TaskSchedulerService({
2174
2325
  loggingConnectorType: context.defaultTypes.loggingConnector,
2175
2326
  ...instanceConfig.options
2176
2327
  });
2177
- instanceType = TaskSchedulerComponent.NAMESPACE;
2328
+ instanceType = StringHelper.kebabCase("TaskSchedulerService");
2178
2329
  }
2179
2330
  else {
2180
2331
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -2201,7 +2352,11 @@ const TelemetryComponentType = {
2201
2352
  /**
2202
2353
  * Service.
2203
2354
  */
2204
- Service: "service"
2355
+ Service: "service",
2356
+ /**
2357
+ * REST client.
2358
+ */
2359
+ RestClient: "rest-client"
2205
2360
  };
2206
2361
 
2207
2362
  // Copyright 2024 IOTA Stiftung.
@@ -2277,7 +2432,11 @@ function initialiseTelemetryComponent(engineCore, context, instanceConfig, overr
2277
2432
  telemetryConnectorType: context.defaultTypes.telemetryConnector,
2278
2433
  ...instanceConfig.options
2279
2434
  });
2280
- instanceType = TelemetryService.NAMESPACE;
2435
+ instanceType = StringHelper.kebabCase("TelemetryService");
2436
+ }
2437
+ else if (type === TelemetryComponentType.RestClient) {
2438
+ component = new TelemetryClient(instanceConfig.options);
2439
+ instanceType = StringHelper.kebabCase("TelemetryClient");
2281
2440
  }
2282
2441
  else {
2283
2442
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -2359,7 +2518,11 @@ const VerifiableStorageComponentType = {
2359
2518
  /**
2360
2519
  * Service.
2361
2520
  */
2362
- Service: "service"
2521
+ Service: "service",
2522
+ /**
2523
+ * REST client.
2524
+ */
2525
+ RestClient: "rest-client"
2363
2526
  };
2364
2527
 
2365
2528
  // Copyright 2024 IOTA Stiftung.
@@ -2449,7 +2612,11 @@ function initialiseVerifiableStorageComponent(engineCore, context, instanceConfi
2449
2612
  component = new VerifiableStorageService({
2450
2613
  ...instanceConfig.options
2451
2614
  });
2452
- instanceType = VerifiableStorageService.NAMESPACE;
2615
+ instanceType = StringHelper.kebabCase("VerifiableStorageService");
2616
+ }
2617
+ else if (type === VerifiableStorageComponentType.RestClient) {
2618
+ component = new VerifiableStorageClient(instanceConfig.options);
2619
+ instanceType = StringHelper.kebabCase("VerifiableStorageClient");
2453
2620
  }
2454
2621
  else {
2455
2622
  throw new GeneralError("engineCore", "componentUnknownType", {
@@ -1,4 +1,4 @@
1
- import type { IEngineCoreContext, IEngineCore } from "@twin.org/engine-models";
1
+ import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
2
2
  import type { IdentityComponentConfig } from "../models/config/identityComponentConfig";
3
3
  import type { IdentityConnectorConfig } from "../models/config/identityConnectorConfig";
4
4
  import type { IEngineConfig } from "../models/IEngineConfig";
@@ -1,4 +1,4 @@
1
- import type { IEngineCoreContext, IEngineCore } from "@twin.org/engine-models";
1
+ import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
2
2
  import type { IdentityProfileComponentConfig } from "../models/config/identityProfileComponentConfig";
3
3
  import type { IdentityProfileConnectorConfig } from "../models/config/identityProfileConnectorConfig";
4
4
  import type { IEngineConfig } from "../models/IEngineConfig";
@@ -1,4 +1,4 @@
1
- import type { IEngineCoreContext, IEngineCore } from "@twin.org/engine-models";
1
+ import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
2
2
  import type { TelemetryComponentConfig } from "../models/config/telemetryComponentConfig";
3
3
  import type { TelemetryConnectorConfig } from "../models/config/telemetryConnectorConfig";
4
4
  import type { IEngineConfig } from "../models/IEngineConfig";
@@ -1,4 +1,4 @@
1
- import type { IEngineCoreContext, IEngineCore } from "@twin.org/engine-models";
1
+ import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
2
2
  import type { VaultConnectorConfig } from "../models/config/vaultConnectorConfig";
3
3
  import type { IEngineConfig } from "../models/IEngineConfig";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import type { IEngineCoreContext, IEngineCore } from "@twin.org/engine-models";
1
+ import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
2
2
  import type { VerifiableStorageComponentConfig } from "../models/config/verifiableStorageComponentConfig";
3
3
  import type { VerifiableStorageConnectorConfig } from "../models/config/verifiableStorageConnectorConfig";
4
4
  import type { IEngineConfig } from "../models/IEngineConfig";
@@ -1,3 +1,4 @@
1
+ import type { IBaseRestClientConfig } from "@twin.org/api-models";
1
2
  import type { IAttestationServiceConstructorOptions } from "@twin.org/attestation-service";
2
3
  import type { AttestationComponentType } from "../types/attestationComponentType";
3
4
  /**
@@ -6,4 +7,7 @@ import type { AttestationComponentType } from "../types/attestationComponentType
6
7
  export type AttestationComponentConfig = {
7
8
  type: typeof AttestationComponentType.Service;
8
9
  options?: IAttestationServiceConstructorOptions;
10
+ } | {
11
+ type: typeof AttestationComponentType.RestClient;
12
+ options: IBaseRestClientConfig;
9
13
  };