@twin.org/synchronised-storage-service 0.0.1-next.9 → 0.0.3-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 (55) hide show
  1. package/dist/es/data/verifiableStorageKeys.json +5 -0
  2. package/dist/es/entities/syncSnapshotEntry.js +93 -0
  3. package/dist/es/entities/syncSnapshotEntry.js.map +1 -0
  4. package/dist/es/helpers/blobStorageHelper.js +185 -0
  5. package/dist/es/helpers/blobStorageHelper.js.map +1 -0
  6. package/dist/es/helpers/changeSetHelper.js +215 -0
  7. package/dist/es/helpers/changeSetHelper.js.map +1 -0
  8. package/dist/es/helpers/localSyncStateHelper.js +384 -0
  9. package/dist/es/helpers/localSyncStateHelper.js.map +1 -0
  10. package/dist/es/helpers/remoteSyncStateHelper.js +560 -0
  11. package/dist/es/helpers/remoteSyncStateHelper.js.map +1 -0
  12. package/dist/es/helpers/versions.js +6 -0
  13. package/dist/es/helpers/versions.js.map +1 -0
  14. package/dist/es/index.js +13 -0
  15. package/dist/es/index.js.map +1 -0
  16. package/dist/es/models/ISyncPointerStore.js +4 -0
  17. package/dist/es/models/ISyncPointerStore.js.map +1 -0
  18. package/dist/es/models/ISyncSnapshot.js +4 -0
  19. package/dist/es/models/ISyncSnapshot.js.map +1 -0
  20. package/dist/es/models/ISyncState.js +2 -0
  21. package/dist/es/models/ISyncState.js.map +1 -0
  22. package/dist/es/models/ISynchronisedStorageServiceConfig.js +4 -0
  23. package/dist/es/models/ISynchronisedStorageServiceConfig.js.map +1 -0
  24. package/dist/es/models/ISynchronisedStorageServiceConstructorOptions.js +2 -0
  25. package/dist/es/models/ISynchronisedStorageServiceConstructorOptions.js.map +1 -0
  26. package/dist/es/restEntryPoints.js +10 -0
  27. package/dist/es/restEntryPoints.js.map +1 -0
  28. package/dist/es/schema.js +11 -0
  29. package/dist/es/schema.js.map +1 -0
  30. package/dist/es/synchronisedStorageRoutes.js +142 -0
  31. package/dist/es/synchronisedStorageRoutes.js.map +1 -0
  32. package/dist/es/synchronisedStorageService.js +512 -0
  33. package/dist/es/synchronisedStorageService.js.map +1 -0
  34. package/dist/types/entities/syncSnapshotEntry.d.ts +3 -3
  35. package/dist/types/helpers/blobStorageHelper.d.ts +3 -3
  36. package/dist/types/helpers/changeSetHelper.d.ts +16 -32
  37. package/dist/types/helpers/localSyncStateHelper.d.ts +11 -11
  38. package/dist/types/helpers/remoteSyncStateHelper.d.ts +18 -14
  39. package/dist/types/index.d.ts +10 -10
  40. package/dist/types/models/ISyncState.d.ts +1 -1
  41. package/dist/types/models/ISynchronisedStorageServiceConfig.d.ts +7 -8
  42. package/dist/types/models/ISynchronisedStorageServiceConstructorOptions.d.ts +6 -6
  43. package/dist/types/synchronisedStorageRoutes.d.ts +1 -1
  44. package/dist/types/synchronisedStorageService.d.ts +17 -21
  45. package/docs/architecture.md +168 -12
  46. package/docs/changelog.md +149 -0
  47. package/docs/open-api/spec.json +62 -57
  48. package/docs/reference/classes/SyncSnapshotEntry.md +4 -10
  49. package/docs/reference/classes/SynchronisedStorageService.md +38 -50
  50. package/docs/reference/interfaces/ISynchronisedStorageServiceConfig.md +11 -17
  51. package/docs/reference/interfaces/ISynchronisedStorageServiceConstructorOptions.md +8 -8
  52. package/locales/en.json +7 -15
  53. package/package.json +26 -9
  54. package/dist/cjs/index.cjs +0 -2235
  55. package/dist/esm/index.mjs +0 -2227
@@ -70,30 +70,30 @@ verifiable-storage
70
70
 
71
71
  ***
72
72
 
73
- ### identityConnectorType?
73
+ ### taskSchedulerComponentType?
74
74
 
75
- > `optional` **identityConnectorType**: `string`
75
+ > `optional` **taskSchedulerComponentType**: `string`
76
76
 
77
- The identity connector.
77
+ The task scheduler component.
78
78
 
79
79
  #### Default
80
80
 
81
81
  ```ts
82
- identity
82
+ task-scheduler
83
83
  ```
84
84
 
85
85
  ***
86
86
 
87
- ### taskSchedulerComponentType?
87
+ ### trustComponentType?
88
88
 
89
- > `optional` **taskSchedulerComponentType**: `string`
89
+ > `optional` **trustComponentType**: `string`
90
90
 
91
- The task scheduler component.
91
+ The type of the trust component.
92
92
 
93
93
  #### Default
94
94
 
95
95
  ```ts
96
- task-scheduler
96
+ trust
97
97
  ```
98
98
 
99
99
  ***
package/locales/en.json CHANGED
@@ -3,11 +3,6 @@
3
3
  "changeSetHelper": {
4
4
  "changeSetApplyingChange": "Applying remote sync change with operation id \"{operation}\" for item with id \"{id}\"",
5
5
  "changeSetStoring": "Storing remote sync change set with id \"{id}\"",
6
- "verifyChangeSetProofMissing": "Verifying change set with id \"{id}\" failed, missing proof",
7
- "verifyChangeSetProofInvalid": "Verifying change set with id \"{id}\" failed, missing proof",
8
- "verifyChangeSetProofNodeIdentityMismatch": "Verifying change set with id \"{id}\" failed, the node identity does not match the proof",
9
- "verifyChangeSetProofValid": "Verifying change set with id \"{id}\" succeeded",
10
- "createdChangeSetProof": "Created change proof for change set with id \"{id}\", proof value is \"{proofValue}\"",
11
6
  "getChangeSet": "Retrieving change set with id \"{changeSetStorageId}\"",
12
7
  "getChangeSetEmpty": "No change set found with id \"{changeSetStorageId}\"",
13
8
  "copyChangeSet": "Copying change set with id \"{changeSetStorageId}\"",
@@ -41,7 +36,9 @@
41
36
  "consolidationCompleted": "Consolidation of remote sync state completed",
42
37
  "addChangeSetToSyncState": "Adding change set with id \"{changeSetStorageId}\" to remote sync state for storage key \"{storageKey}\"",
43
38
  "buildingChangeSet": "Building change set for storage key \"{storageKey}\" with \"{changeCount}\" changes",
44
- "finalisingSyncChanges": "Finalising sync changes for storage key \"{storageKey}\""
39
+ "finalisingSyncChanges": "Finalising sync changes for storage key \"{storageKey}\"",
40
+ "createChangeSetRequestingItem": "Creating change set for key \"{storageKey}\", requesting item with id \"{id}\"",
41
+ "createChangeSetRespondingItem": "Responding to change set request for key \"{storageKey}\", item with id \"{id}\""
45
42
  },
46
43
  "synchronisedStorageService": {
47
44
  "registerStorageKey": "Registering synchronised storage key \"{storageKey}\"",
@@ -52,10 +49,9 @@
52
49
  "updateFromLocalSyncStateNoChanges": "No changes found in local sync state for key \"{storageKey}\", skipping update",
53
50
  "builtStorageChangeSet": "Built storage change set for key \"{storageKey}\" with id \"{changeSetStorageId}\"",
54
51
  "builtStorageChangeSetNone": "No changes found for key \"{storageKey}\", no storage change set created",
55
- "createChangeSetRequestingItem": "Creating change set for key \"{storageKey}\", requesting item with id \"{id}\"",
56
- "createChangeSetRespondingItem": "Responding to change set request for key \"{storageKey}\", item with id \"{id}\"",
57
52
  "sendingChangeSetToTrustedNode": "Sending change set with id \"{changeSetStorageId}\" to trusted node for key \"{storageKey}\"",
58
- "syncChangeSetForRemoteNode": "Synchronising change set with id \"{changeSetStorageId}\" for remote node for type \"{storageKey}\""
53
+ "decryptionKeyRequest": "Decryption key requested by node identity \"{nodeId}\"",
54
+ "syncChangeSetForRemoteNode": "Synchronising change set with id \"{changeSetStorageId}\" for node identity \"{nodeId}\""
59
55
  },
60
56
  "blobStorageHelper": {
61
57
  "loadBlob": "Loading blob with id \"{blobId}\"",
@@ -69,15 +65,10 @@
69
65
  }
70
66
  },
71
67
  "error": {
72
- "synchronisedEntityStorageConnector": {
73
- "missingRequiredProperty": "To use synchronised entity storage the entity schema must contain the property \"{requiredProperty}\"",
74
- "missingRequiredPropertySort": "To use synchronised entity storage the entity schema must contain the property \"{requiredProperty}\" and it must be sortable"
75
- },
76
68
  "synchronisedStorageService": {
77
69
  "notTrustedNode": "This method can only be called on a trusted node",
78
70
  "entitySyncFailed": "Failed to sync synchronised entity storage connector",
79
71
  "consolidationSyncFailed": "Failed to consolidate synchronised entity storage connector",
80
- "invalidProof": "Invalid proof provided for synchronised entity storage connector",
81
72
  "decryptionKeyNotFound": "Decryption key not found, ensure the synchronised storage component is initialised and the decryption key is set"
82
73
  },
83
74
  "remoteSyncStateHelper": {
@@ -86,7 +77,8 @@
86
77
  "blobStorageHelper": {
87
78
  "loadBlobFailed": "Failed to load blob with id \"{blobId}\"",
88
79
  "saveBlobFailed": "Failed to save blob",
89
- "notTrustedNode": "Cannot save blob, this is not a trusted node"
80
+ "notTrustedNode": "Cannot save blob, this is not a trusted node",
81
+ "removeBlobFailed": "Failed to remove blob with id \"{blobId}\""
90
82
  }
91
83
  },
92
84
  "warn": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/synchronised-storage-service",
3
- "version": "0.0.1-next.9",
3
+ "version": "0.0.3-next.2",
4
4
  "description": "Synchronised storage contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,35 +17,52 @@
17
17
  "@twin.org/api-models": "next",
18
18
  "@twin.org/background-task-models": "next",
19
19
  "@twin.org/blob-storage-models": "next",
20
+ "@twin.org/context": "next",
20
21
  "@twin.org/core": "next",
21
22
  "@twin.org/crypto": "next",
22
23
  "@twin.org/entity": "next",
23
24
  "@twin.org/entity-storage-models": "next",
24
25
  "@twin.org/event-bus-models": "next",
26
+ "@twin.org/identity-authentication": "next",
25
27
  "@twin.org/identity-models": "next",
26
28
  "@twin.org/logging-models": "next",
27
29
  "@twin.org/nameof": "next",
28
30
  "@twin.org/standards-w3c-did": "next",
29
- "@twin.org/synchronised-storage-models": "0.0.1-next.9",
31
+ "@twin.org/standards-w3c-odrl": "next",
32
+ "@twin.org/synchronised-storage-models": "0.0.3-next.2",
33
+ "@twin.org/trust-models": "next",
30
34
  "@twin.org/verifiable-storage-models": "next",
31
35
  "@twin.org/web": "next"
32
36
  },
33
- "main": "./dist/cjs/index.cjs",
34
- "module": "./dist/esm/index.mjs",
37
+ "main": "./dist/es/index.js",
35
38
  "types": "./dist/types/index.d.ts",
36
39
  "exports": {
37
40
  ".": {
38
41
  "types": "./dist/types/index.d.ts",
39
- "require": "./dist/cjs/index.cjs",
40
- "import": "./dist/esm/index.mjs"
42
+ "import": "./dist/es/index.js",
43
+ "default": "./dist/es/index.js"
41
44
  },
42
45
  "./locales/*.json": "./locales/*.json"
43
46
  },
44
47
  "files": [
45
- "dist/cjs",
46
- "dist/esm",
48
+ "dist/es",
47
49
  "dist/types",
48
50
  "locales",
49
51
  "docs"
50
- ]
52
+ ],
53
+ "keywords": [
54
+ "twin",
55
+ "trade",
56
+ "iota",
57
+ "framework",
58
+ "blockchain",
59
+ "synchronised-storage",
60
+ "service",
61
+ "microservice",
62
+ "business-logic"
63
+ ],
64
+ "bugs": {
65
+ "url": "git+https://github.com/twinfoundation/synchronised-storage/issues"
66
+ },
67
+ "homepage": "https://twindev.org"
51
68
  }