@twin.org/node-core 0.0.2-next.8 → 0.0.3-next.1

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 (126) hide show
  1. package/README.md +1 -1
  2. package/dist/es/bootstrap.js +374 -0
  3. package/dist/es/bootstrap.js.map +1 -0
  4. package/dist/es/builders/engineEnvBuilder.js +1051 -0
  5. package/dist/es/builders/engineEnvBuilder.js.map +1 -0
  6. package/dist/es/builders/engineServerEnvBuilder.js +197 -0
  7. package/dist/es/builders/engineServerEnvBuilder.js.map +1 -0
  8. package/dist/es/builders/extensionsBuilder.js +100 -0
  9. package/dist/es/builders/extensionsBuilder.js.map +1 -0
  10. package/dist/es/defaults.js +9 -0
  11. package/dist/es/defaults.js.map +1 -0
  12. package/dist/es/identity.js +169 -0
  13. package/dist/es/identity.js.map +1 -0
  14. package/dist/es/index.js +23 -0
  15. package/dist/es/index.js.map +1 -0
  16. package/dist/es/models/ICacheMetadata.js +4 -0
  17. package/dist/es/models/ICacheMetadata.js.map +1 -0
  18. package/dist/es/models/IEngineEnvironmentVariables.js +4 -0
  19. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -0
  20. package/dist/es/models/IEngineServerEnvironmentVariables.js +2 -0
  21. package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -0
  22. package/dist/es/models/IModuleProtocol.js +2 -0
  23. package/dist/es/models/IModuleProtocol.js.map +1 -0
  24. package/dist/es/models/INodeEngineConfig.js +2 -0
  25. package/dist/es/models/INodeEngineConfig.js.map +1 -0
  26. package/dist/es/models/INodeEngineState.js +2 -0
  27. package/dist/es/models/INodeEngineState.js.map +1 -0
  28. package/dist/es/models/INodeEnvironmentVariables.js +2 -0
  29. package/dist/es/models/INodeEnvironmentVariables.js.map +1 -0
  30. package/dist/es/models/INodeOptions.js +2 -0
  31. package/dist/es/models/INodeOptions.js.map +1 -0
  32. package/dist/es/models/IProtocolHandlerResult.js +4 -0
  33. package/dist/es/models/IProtocolHandlerResult.js.map +1 -0
  34. package/dist/es/models/moduleProtocol.js +29 -0
  35. package/dist/es/models/moduleProtocol.js.map +1 -0
  36. package/dist/es/models/nodeExtensionMethods.js +2 -0
  37. package/dist/es/models/nodeExtensionMethods.js.map +1 -0
  38. package/dist/es/models/nodeFeatures.js +21 -0
  39. package/dist/es/models/nodeFeatures.js.map +1 -0
  40. package/dist/es/node.js +265 -0
  41. package/dist/es/node.js.map +1 -0
  42. package/dist/es/server.js +74 -0
  43. package/dist/es/server.js.map +1 -0
  44. package/dist/es/utils.js +418 -0
  45. package/dist/es/utils.js.map +1 -0
  46. package/dist/types/bootstrap.d.ts +27 -10
  47. package/dist/types/builders/engineEnvBuilder.d.ts +3 -2
  48. package/dist/types/builders/engineServerEnvBuilder.d.ts +4 -3
  49. package/dist/types/builders/extensionsBuilder.d.ts +32 -0
  50. package/dist/types/defaults.d.ts +6 -0
  51. package/dist/types/identity.d.ts +14 -0
  52. package/dist/types/index.d.ts +20 -11
  53. package/dist/types/models/ICacheMetadata.d.ts +17 -0
  54. package/dist/types/models/IEngineEnvironmentVariables.d.ts +132 -24
  55. package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +12 -3
  56. package/dist/types/models/IModuleProtocol.d.ts +18 -0
  57. package/dist/types/models/INodeEngineConfig.d.ts +6 -0
  58. package/dist/types/models/INodeEngineState.d.ts +22 -0
  59. package/dist/types/models/INodeEnvironmentVariables.d.ts +50 -10
  60. package/dist/types/models/INodeOptions.d.ts +14 -3
  61. package/dist/types/models/IProtocolHandlerResult.d.ts +13 -0
  62. package/dist/types/models/moduleProtocol.d.ts +29 -0
  63. package/dist/types/models/nodeExtensionMethods.d.ts +27 -0
  64. package/dist/types/models/nodeFeatures.d.ts +5 -5
  65. package/dist/types/node.d.ts +17 -7
  66. package/dist/types/server.d.ts +9 -6
  67. package/dist/types/utils.d.ts +87 -2
  68. package/docs/changelog.md +185 -0
  69. package/docs/detailed-guide.md +129 -0
  70. package/docs/reference/functions/bootstrap.md +1 -1
  71. package/docs/reference/functions/bootstrapAuth.md +1 -1
  72. package/docs/reference/functions/bootstrapBlobEncryption.md +1 -1
  73. package/docs/reference/functions/bootstrapContextIdHandlers.md +35 -0
  74. package/docs/reference/functions/bootstrapImmutableProofMethod.md +1 -1
  75. package/docs/reference/functions/{bootstrapNodeUser.md → bootstrapNodeAdminUser.md} +3 -3
  76. package/docs/reference/functions/{bootstrapNodeIdentity.md → bootstrapNodeId.md} +3 -3
  77. package/docs/reference/functions/bootstrapSynchronisedStorage.md +1 -1
  78. package/docs/reference/functions/bootstrapTenantId.md +35 -0
  79. package/docs/reference/functions/buildConfiguration.md +2 -2
  80. package/docs/reference/functions/buildEngineConfiguration.md +8 -2
  81. package/docs/reference/functions/buildEngineServerConfiguration.md +9 -3
  82. package/docs/reference/functions/createModuleImportUrl.md +21 -0
  83. package/docs/reference/functions/directoryExists.md +19 -0
  84. package/docs/reference/functions/extensionsConfiguration.md +25 -0
  85. package/docs/reference/functions/extensionsInitialiseEngine.md +25 -0
  86. package/docs/reference/functions/extensionsInitialiseEngineServer.md +31 -0
  87. package/docs/reference/functions/getExtensionsCacheDir.md +31 -0
  88. package/docs/reference/functions/getFiles.md +19 -0
  89. package/docs/reference/functions/getSubFolders.md +19 -0
  90. package/docs/reference/functions/handleHttpsProtocol.md +49 -0
  91. package/docs/reference/functions/handleNpmProtocol.md +31 -0
  92. package/docs/reference/functions/hashUrl.md +19 -0
  93. package/docs/reference/functions/isCacheExpired.md +31 -0
  94. package/docs/reference/functions/overrideModuleImport.md +8 -2
  95. package/docs/reference/functions/parseModuleProtocol.md +19 -0
  96. package/docs/reference/functions/resolvePackageEntryPoint.md +32 -0
  97. package/docs/reference/functions/run.md +3 -3
  98. package/docs/reference/functions/shutdownExtensions.md +25 -0
  99. package/docs/reference/functions/start.md +11 -5
  100. package/docs/reference/index.md +36 -2
  101. package/docs/reference/interfaces/ICacheMetadata.md +27 -0
  102. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +255 -37
  103. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +1696 -5
  104. package/docs/reference/interfaces/IModuleProtocol.md +27 -0
  105. package/docs/reference/interfaces/INodeEngineConfig.md +7 -0
  106. package/docs/reference/interfaces/INodeEngineState.md +39 -0
  107. package/docs/reference/interfaces/INodeEnvironmentVariables.md +609 -165
  108. package/docs/reference/interfaces/INodeOptions.md +27 -3
  109. package/docs/reference/interfaces/IProtocolHandlerResult.md +19 -0
  110. package/docs/reference/type-aliases/ModuleProtocol.md +5 -0
  111. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +18 -0
  112. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +24 -0
  113. package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +23 -0
  114. package/docs/reference/type-aliases/NodeExtensionShutdownMethod.md +10 -0
  115. package/docs/reference/variables/ATTESTATION_VERIFICATION_METHOD_ID.md +3 -0
  116. package/docs/reference/variables/AUTH_SIGNING_KEY_ID.md +3 -0
  117. package/docs/reference/variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
  118. package/docs/reference/variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md +3 -0
  119. package/docs/reference/variables/ModuleProtocol.md +37 -0
  120. package/docs/reference/variables/NodeFeatures.md +8 -8
  121. package/docs/reference/variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
  122. package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +3 -0
  123. package/locales/en.json +27 -9
  124. package/package.json +27 -9
  125. package/dist/cjs/index.cjs +0 -1910
  126. package/dist/esm/index.mjs +0 -1870
@@ -4,7 +4,7 @@ The engine core environment variables.
4
4
 
5
5
  ## Extended by
6
6
 
7
- - [`INodeEnvironmentVariables`](INodeEnvironmentVariables.md)
7
+ - [`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md)
8
8
 
9
9
  ## Properties
10
10
 
@@ -32,6 +32,30 @@ The name of the state file.
32
32
 
33
33
  ***
34
34
 
35
+ ### tenantEnabled?
36
+
37
+ > `optional` **tenantEnabled**: `string`
38
+
39
+ Is multi-tenant support enabled, defaults to false.
40
+
41
+ ***
42
+
43
+ ### tenantId?
44
+
45
+ > `optional` **tenantId**: `string`
46
+
47
+ A tenant id to use as a default for the node.
48
+
49
+ ***
50
+
51
+ ### tenantApiKey?
52
+
53
+ > `optional` **tenantApiKey**: `string`
54
+
55
+ A tenant api key to use as a default for the node.
56
+
57
+ ***
58
+
35
59
  ### entityStorageConnectorType?
36
60
 
37
61
  > `optional` **entityStorageConnectorType**: `string`
@@ -57,6 +81,14 @@ A prefix for all the table in entity-storage, can be empty.
57
81
 
58
82
  ***
59
83
 
84
+ ### awsDynamodbAuthMode?
85
+
86
+ > `optional` **awsDynamodbAuthMode**: `string`
87
+
88
+ AWS DynamoDB auth mode, either credentials or pod.
89
+
90
+ ***
91
+
60
92
  ### awsDynamodbAccessKeyId?
61
93
 
62
94
  > `optional` **awsDynamodbAccessKeyId**: `string`
@@ -387,11 +419,11 @@ A prefix for all the blobs in blob-storage, can be empty.
387
419
 
388
420
  ***
389
421
 
390
- ### awsS3AccessKeyId?
422
+ ### awsS3Region?
391
423
 
392
- > `optional` **awsS3AccessKeyId**: `string`
424
+ > `optional` **awsS3Region**: `string`
393
425
 
394
- AWS S3 access key id.
426
+ AWS S3 region.
395
427
 
396
428
  ***
397
429
 
@@ -403,19 +435,19 @@ AWS S3 bucket name.
403
435
 
404
436
  ***
405
437
 
406
- ### awsS3Endpoint?
438
+ ### awsS3AuthMode?
407
439
 
408
- > `optional` **awsS3Endpoint**: `string`
440
+ > `optional` **awsS3AuthMode**: `string`
409
441
 
410
- AWS S3 endpoint.
442
+ AWS S3 auth mode, either credentials or pod, defaults to credentials.
411
443
 
412
444
  ***
413
445
 
414
- ### awsS3Region?
446
+ ### awsS3AccessKeyId?
415
447
 
416
- > `optional` **awsS3Region**: `string`
448
+ > `optional` **awsS3AccessKeyId**: `string`
417
449
 
418
- AWS S3 region.
450
+ AWS S3 access key id.
419
451
 
420
452
  ***
421
453
 
@@ -427,6 +459,14 @@ AWS S3 secret access key.
427
459
 
428
460
  ***
429
461
 
462
+ ### awsS3Endpoint?
463
+
464
+ > `optional` **awsS3Endpoint**: `string`
465
+
466
+ AWS S3 endpoint.
467
+
468
+ ***
469
+
430
470
  ### azureStorageAccountKey?
431
471
 
432
472
  > `optional` **azureStorageAccountKey**: `string`
@@ -519,7 +559,7 @@ Hashicorp Vault endpoint.
519
559
 
520
560
  > `optional` **loggingConnector**: `string`
521
561
 
522
- The type of background task connector, can be a comma separated list: console, entity-storage.
562
+ The type of logging task connector, can be a comma separated list: console, entity-storage.
523
563
 
524
564
  ***
525
565
 
@@ -547,27 +587,51 @@ The type of event bus component: service.
547
587
 
548
588
  ***
549
589
 
550
- ### messagingEmailConnector?
590
+ ### messagingEnabled?
551
591
 
552
- > `optional` **messagingEmailConnector**: `string`
592
+ > `optional` **messagingEnabled**: `string`
553
593
 
554
- The type of messaging email connector: entity-storage, aws.
594
+ Are the messaging components enabled, defaults to false.
555
595
 
556
596
  ***
557
597
 
558
- ### messagingSmsConnector?
598
+ ### awsSesRegion?
559
599
 
560
- > `optional` **messagingSmsConnector**: `string`
600
+ > `optional` **awsSesRegion**: `string`
561
601
 
562
- The type of messaging sms connector: entity-storage, aws.
602
+ AWS SES region.
563
603
 
564
604
  ***
565
605
 
566
- ### messagingPushNotificationConnector?
606
+ ### awsSesAuthMode?
567
607
 
568
- > `optional` **messagingPushNotificationConnector**: `string`
608
+ > `optional` **awsSesAuthMode**: `string`
569
609
 
570
- The type of messaging push notification connector: entity-storage, aws.
610
+ AWS SES auth mode, either credentials or pod, defaults to credentials.
611
+
612
+ ***
613
+
614
+ ### awsSesSecretAccessKey?
615
+
616
+ > `optional` **awsSesSecretAccessKey**: `string`
617
+
618
+ AWS SES secret access key.
619
+
620
+ ***
621
+
622
+ ### awsSesAccessKeyId?
623
+
624
+ > `optional` **awsSesAccessKeyId**: `string`
625
+
626
+ AWS SES access key id.
627
+
628
+ ***
629
+
630
+ ### awsSesEndpoint?
631
+
632
+ > `optional` **awsSesEndpoint**: `string`
633
+
634
+ AWS SES endpoint.
571
635
 
572
636
  ***
573
637
 
@@ -579,11 +643,27 @@ The applications for the push notifications JSON stringified array of IAwsApplic
579
643
 
580
644
  ***
581
645
 
582
- ### messagingComponent?
646
+ ### messagingEmailConnector?
583
647
 
584
- > `optional` **messagingComponent**: `string`
648
+ > `optional` **messagingEmailConnector**: `string`
585
649
 
586
- The type of messaging component: service.
650
+ The type of messaging email connector: entity-storage, aws.
651
+
652
+ ***
653
+
654
+ ### messagingSmsConnector?
655
+
656
+ > `optional` **messagingSmsConnector**: `string`
657
+
658
+ The type of messaging sms connector: entity-storage, aws.
659
+
660
+ ***
661
+
662
+ ### messagingPushNotificationConnector?
663
+
664
+ > `optional` **messagingPushNotificationConnector**: `string`
665
+
666
+ The type of messaging push notification connector: entity-storage, aws.
587
667
 
588
668
  ***
589
669
 
@@ -739,6 +819,14 @@ The identity verification method id to use with attestation.
739
819
 
740
820
  ***
741
821
 
822
+ ### dataProcessingEnabled?
823
+
824
+ > `optional` **dataProcessingEnabled**: `string`
825
+
826
+ Is the data processing enabled, defaults to false.
827
+
828
+ ***
829
+
742
830
  ### dataConverterConnectors?
743
831
 
744
832
  > `optional` **dataConverterConnectors**: `string`
@@ -755,6 +843,30 @@ The type of the default data extractor, can be a comma separated list: json-path
755
843
 
756
844
  ***
757
845
 
846
+ ### auditableItemGraphEnabled?
847
+
848
+ > `optional` **auditableItemGraphEnabled**: `string`
849
+
850
+ Is the auditable item graph enabled, defaults to false.
851
+
852
+ ***
853
+
854
+ ### auditableItemStreamEnabled?
855
+
856
+ > `optional` **auditableItemStreamEnabled**: `string`
857
+
858
+ Is the auditable item stream enabled, defaults to false.
859
+
860
+ ***
861
+
862
+ ### documentManagementEnabled?
863
+
864
+ > `optional` **documentManagementEnabled**: `string`
865
+
866
+ Is the document management enabled, defaults to false.
867
+
868
+ ***
869
+
758
870
  ### synchronisedStorageEnabled?
759
871
 
760
872
  > `optional` **synchronisedStorageEnabled**: `string`
@@ -776,16 +888,7 @@ Url which points to the api for a trusted synchronised storage node, not require
776
888
  > `optional` **synchronisedStorageVerifiableStorageKeyId**: `string`
777
889
 
778
890
  The key for the smart contract which contains the verifiable storage pointer store for synchronised storage.
779
- This only required if using a custom verifiable storage item, otherwise it will default the the network name.
780
-
781
- ***
782
-
783
- ### synchronisedStorageVerificationMethodId?
784
-
785
- > `optional` **synchronisedStorageVerificationMethodId**: `string`
786
-
787
- The identity verification method id to use with synchronised storage for signing/verifying changesets.
788
- Defaults to synchronised-storage-assertion.
891
+ This only required if using a custom verifiable storage item, otherwise it will default to the network name.
789
892
 
790
893
  ***
791
894
 
@@ -896,6 +999,77 @@ Is the rights management enabled, defaults to false.
896
999
 
897
1000
  ***
898
1001
 
1002
+ ### rightsManagementBaseCallbackUrl?
1003
+
1004
+ > `optional` **rightsManagementBaseCallbackUrl**: `string`
1005
+
1006
+ What is the base callback url for rights management negotiations e.g. https://my-node/rights-management.
1007
+
1008
+ ***
1009
+
1010
+ ### rightsManagementInformationSources?
1011
+
1012
+ > `optional` **rightsManagementInformationSources**: `string`
1013
+
1014
+ The rights management configuration which includes the information sources modules to load.
1015
+ Use the @json: prefix to specify the path to the JSON configuration file.
1016
+
1017
+ ***
1018
+
1019
+ ### rightsManagementNegotiators?
1020
+
1021
+ > `optional` **rightsManagementNegotiators**: `string`
1022
+
1023
+ The rights management configuration which includes the negotiator modules to load.
1024
+ Use the @json: prefix to specify the path to the JSON configuration file.
1025
+
1026
+ ***
1027
+
1028
+ ### rightsManagementRequesters?
1029
+
1030
+ > `optional` **rightsManagementRequesters**: `string`
1031
+
1032
+ The rights management configuration which includes the requester modules to load.
1033
+ Use the @json: prefix to specify the path to the JSON configuration file.
1034
+
1035
+ ***
1036
+
1037
+ ### rightsManagementExecutionActions?
1038
+
1039
+ > `optional` **rightsManagementExecutionActions**: `string`
1040
+
1041
+ The rights management configuration which includes the execution actions modules to load.
1042
+ Use the @json: prefix to specify the path to the JSON configuration file.
1043
+
1044
+ ***
1045
+
1046
+ ### rightsManagementEnforcementProcessors?
1047
+
1048
+ > `optional` **rightsManagementEnforcementProcessors**: `string`
1049
+
1050
+ The rights management configuration which includes the enforcement processor modules to load.
1051
+ Use the @json: prefix to specify the path to the JSON configuration file.
1052
+
1053
+ ***
1054
+
1055
+ ### rightsManagementArbiters?
1056
+
1057
+ > `optional` **rightsManagementArbiters**: `string`
1058
+
1059
+ The rights management configuration which includes the arbiter modules to load.
1060
+ Use the @json: prefix to specify the path to the JSON configuration file.
1061
+
1062
+ ***
1063
+
1064
+ ### rightsManagementOffers?
1065
+
1066
+ > `optional` **rightsManagementOffers**: `string`
1067
+
1068
+ The rights management configuration which includes the offer modules to load.
1069
+ Use the @json: prefix to specify the path to the JSON configuration file.
1070
+
1071
+ ***
1072
+
899
1073
  ### taskSchedulerEnabled?
900
1074
 
901
1075
  > `optional` **taskSchedulerEnabled**: `string`
@@ -912,9 +1086,53 @@ Is the data space connector enabled, defaults to false.
912
1086
 
913
1087
  ***
914
1088
 
915
- ### dataSpaceConnectorApps?
1089
+ ### dataSpaceConnectorRetainActivityLogsFor?
916
1090
 
917
- > `optional` **dataSpaceConnectorApps**: `string`
1091
+ > `optional` **dataSpaceConnectorRetainActivityLogsFor**: `string`
918
1092
 
919
- The application configuration for the data space connector.
920
- Use the @json: prefix to specify the path to the JSON configuration file.
1093
+ The length of time to retain the activity logs for in minutes, set to -1 to keep forever.
1094
+
1095
+ #### Default
1096
+
1097
+ ```ts
1098
+ 10
1099
+ ```
1100
+
1101
+ ***
1102
+
1103
+ ### dataSpaceConnectorActivityLogsCleanUpInterval?
1104
+
1105
+ > `optional` **dataSpaceConnectorActivityLogsCleanUpInterval**: `string`
1106
+
1107
+ The interval for cleaning up the activity logs.
1108
+
1109
+ #### Default
1110
+
1111
+ ```ts
1112
+ 60
1113
+ ```
1114
+
1115
+ ***
1116
+
1117
+ ### vcAuthenticationEnabled?
1118
+
1119
+ > `optional` **vcAuthenticationEnabled**: `string`
1120
+
1121
+ Enable verifiable credential authentication for the API.
1122
+
1123
+ ***
1124
+
1125
+ ### vcAuthenticationVerificationMethodId?
1126
+
1127
+ > `optional` **vcAuthenticationVerificationMethodId**: `string`
1128
+
1129
+ Verifiable credential assertion for node to node communication.
1130
+ Defaults to node-authentication-assertion.
1131
+
1132
+ ***
1133
+
1134
+ ### extensions?
1135
+
1136
+ > `optional` **extensions**: `string`
1137
+
1138
+ A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.