@twin.org/synchronised-storage-service 0.0.1-next.6 → 0.0.1-next.8

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.
@@ -1,5 +1,5 @@
1
1
  import type { IBlobStorageConnector } from "@twin.org/blob-storage-models";
2
- import type { ILoggingConnector } from "@twin.org/logging-models";
2
+ import type { ILoggingComponent } from "@twin.org/logging-models";
3
3
  import { type IVaultConnector } from "@twin.org/vault-models";
4
4
  /**
5
5
  * Class for performing blob storage operations.
@@ -11,13 +11,13 @@ export declare class BlobStorageHelper {
11
11
  readonly CLASS_NAME: string;
12
12
  /**
13
13
  * Create a new instance of BlobStorageHelper.
14
- * @param logging The logging connector to use for logging.
14
+ * @param loggingComponent The logging connector to use for logging.
15
15
  * @param vaultConnector The vault connector to use for for the encryption key.
16
16
  * @param blobStorageConnector The blob storage component to use.
17
17
  * @param blobStorageEncryptionKeyId The id of the vault key to use for encrypting/decrypting blobs.
18
18
  * @param isTrustedNode Is this a trusted node.
19
19
  */
20
- constructor(logging: ILoggingConnector | undefined, vaultConnector: IVaultConnector, blobStorageConnector: IBlobStorageConnector, blobStorageEncryptionKeyId: string, isTrustedNode: boolean);
20
+ constructor(loggingComponent: ILoggingComponent | undefined, vaultConnector: IVaultConnector, blobStorageConnector: IBlobStorageConnector, blobStorageEncryptionKeyId: string, isTrustedNode: boolean);
21
21
  /**
22
22
  * Load a blob from storage.
23
23
  * @param blobId The id of the blob to apply.
@@ -1,6 +1,6 @@
1
1
  import type { IEventBusComponent } from "@twin.org/event-bus-models";
2
2
  import { type IIdentityConnector } from "@twin.org/identity-models";
3
- import type { ILoggingConnector } from "@twin.org/logging-models";
3
+ import type { ILoggingComponent } from "@twin.org/logging-models";
4
4
  import { type IProof } from "@twin.org/standards-w3c-did";
5
5
  import { type ISyncChangeSet, type ISynchronisedEntity, type SyncNodeIdentityMode } from "@twin.org/synchronised-storage-models";
6
6
  import type { BlobStorageHelper } from "./blobStorageHelper";
@@ -14,13 +14,13 @@ export declare class ChangeSetHelper<T extends ISynchronisedEntity = ISynchronis
14
14
  readonly CLASS_NAME: string;
15
15
  /**
16
16
  * Create a new instance of ChangeSetHelper.
17
- * @param logging The logging connector to use for logging.
17
+ * @param loggingComponent The logging connector to use for logging.
18
18
  * @param eventBusComponent The event bus component to use for events.
19
19
  * @param identityConnector The identity connector to use for signing/verifying changesets.
20
20
  * @param blobStorageHelper The blob storage component to use for remote sync states.
21
21
  * @param decentralisedStorageMethodId The id of the identity method to use when signing/verifying changesets.
22
22
  */
23
- constructor(logging: ILoggingConnector | undefined, eventBusComponent: IEventBusComponent, identityConnector: IIdentityConnector, blobStorageHelper: BlobStorageHelper, decentralisedStorageMethodId: string);
23
+ constructor(loggingComponent: ILoggingComponent | undefined, eventBusComponent: IEventBusComponent, identityConnector: IIdentityConnector, blobStorageHelper: BlobStorageHelper, decentralisedStorageMethodId: string);
24
24
  /**
25
25
  * Set the node identity to use for signing changesets.
26
26
  * @param nodeIdentity The identity of the node that is performing the update.
@@ -1,5 +1,5 @@
1
1
  import type { IEntityStorageConnector } from "@twin.org/entity-storage-models";
2
- import type { ILoggingConnector } from "@twin.org/logging-models";
2
+ import type { ILoggingComponent } from "@twin.org/logging-models";
3
3
  import { type ISynchronisedEntity, type SyncChangeOperation } from "@twin.org/synchronised-storage-models";
4
4
  import type { ChangeSetHelper } from "./changeSetHelper";
5
5
  import type { SyncSnapshotEntry } from "../entities/syncSnapshotEntry";
@@ -14,11 +14,11 @@ export declare class LocalSyncStateHelper<T extends ISynchronisedEntity = ISynch
14
14
  readonly CLASS_NAME: string;
15
15
  /**
16
16
  * Create a new instance of LocalSyncStateHelper.
17
- * @param logging The logging connector to use for logging.
17
+ * @param loggingComponent The logging connector to use for logging.
18
18
  * @param snapshotEntryEntityStorage The storage connector for the sync snapshot entries.
19
19
  * @param changeSetHelper The change set helper to use for applying changesets.
20
20
  */
21
- constructor(logging: ILoggingConnector | undefined, snapshotEntryEntityStorage: IEntityStorageConnector<SyncSnapshotEntry<T>>, changeSetHelper: ChangeSetHelper<T>);
21
+ constructor(loggingComponent: ILoggingComponent | undefined, snapshotEntryEntityStorage: IEntityStorageConnector<SyncSnapshotEntry<T>>, changeSetHelper: ChangeSetHelper<T>);
22
22
  /**
23
23
  * Add a new change to the local snapshot.
24
24
  * @param storageKey The storage key of the snapshot to add the change for.
@@ -1,5 +1,5 @@
1
1
  import type { IEventBusComponent } from "@twin.org/event-bus-models";
2
- import type { ILoggingConnector } from "@twin.org/logging-models";
2
+ import type { ILoggingComponent } from "@twin.org/logging-models";
3
3
  import { type ISyncChange, type ISyncChangeSet, type ISynchronisedEntity } from "@twin.org/synchronised-storage-models";
4
4
  import type { IVerifiableStorageConnector } from "@twin.org/verifiable-storage-models";
5
5
  import type { BlobStorageHelper } from "./blobStorageHelper";
@@ -16,7 +16,7 @@ export declare class RemoteSyncStateHelper<T extends ISynchronisedEntity = ISync
16
16
  readonly CLASS_NAME: string;
17
17
  /**
18
18
  * Create a new instance of DecentralisedEntityStorageConnector.
19
- * @param logging The logging connector to use for logging.
19
+ * @param loggingComponent The logging component to use for logging.
20
20
  * @param eventBusComponent The event bus component to use for events.
21
21
  * @param verifiableSyncPointerStorageConnector The verifiable storage connector to use for storing sync pointers.
22
22
  * @param blobStorageHelper The blob storage helper to use for remote sync states.
@@ -24,7 +24,7 @@ export declare class RemoteSyncStateHelper<T extends ISynchronisedEntity = ISync
24
24
  * @param isTrustedNode Whether the node is trusted or not.
25
25
  * @param maxConsolidations The maximum number of consolidations to keep in storage.
26
26
  */
27
- constructor(logging: ILoggingConnector | undefined, eventBusComponent: IEventBusComponent, verifiableSyncPointerStorageConnector: IVerifiableStorageConnector, blobStorageHelper: BlobStorageHelper, changeSetHelper: ChangeSetHelper<T>, isTrustedNode: boolean, maxConsolidations: number);
27
+ constructor(loggingComponent: ILoggingComponent | undefined, eventBusComponent: IEventBusComponent, verifiableSyncPointerStorageConnector: IVerifiableStorageConnector, blobStorageHelper: BlobStorageHelper, changeSetHelper: ChangeSetHelper<T>, isTrustedNode: boolean, maxConsolidations: number);
28
28
  /**
29
29
  * Set the node identity to use for signing changesets.
30
30
  * @param nodeIdentity The identity of the node that is performing the update.
@@ -12,11 +12,6 @@ export interface ISynchronisedStorageServiceConfig {
12
12
  * @default 5
13
13
  */
14
14
  entityUpdateIntervalMinutes?: number;
15
- /**
16
- * Is this a node that has permission to write to the verifiable storage?
17
- * @default false
18
- */
19
- isTrustedNode?: boolean;
20
15
  /**
21
16
  * Interval to perform consolidation of changesets, only used if isTrustedNode is set.
22
17
  * @default 60
@@ -4,9 +4,9 @@ import type { ISynchronisedStorageServiceConfig } from "./ISynchronisedStorageSe
4
4
  */
5
5
  export interface ISynchronisedStorageServiceConstructorOptions {
6
6
  /**
7
- * The logging connector.
7
+ * The logging component.
8
8
  */
9
- loggingConnectorType?: string;
9
+ loggingComponentType?: string;
10
10
  /**
11
11
  * The event bus component type.
12
12
  */
@@ -42,6 +42,7 @@ export interface ISynchronisedStorageServiceConstructorOptions {
42
42
  taskSchedulerComponentType?: string;
43
43
  /**
44
44
  * The synchronised entity storage component type to use if this node is not trusted.
45
+ * If this is set, this node uses it as the trusted node to store changesets.
45
46
  */
46
47
  trustedSynchronisedStorageComponentType?: string;
47
48
  /**
package/docs/changelog.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.1-next.8](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-service-v0.0.1-next.7...synchronised-storage-service-v0.0.1-next.8) (2025-08-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * remove isTrustedNode from config and rely on trusted component ([cc2d987](https://github.com/twinfoundation/synchronised-storage/commit/cc2d98795044fc97b33fadf871188f6103f5c987))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/synchronised-storage-models bumped from 0.0.1-next.7 to 0.0.1-next.8
16
+
17
+ ## [0.0.1-next.7](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-service-v0.0.1-next.6...synchronised-storage-service-v0.0.1-next.7) (2025-08-12)
18
+
19
+
20
+ ### Features
21
+
22
+ * switch to logging component ([a606302](https://github.com/twinfoundation/synchronised-storage/commit/a606302d7b89b922d33456b420d8f140d4fd565a))
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/synchronised-storage-models bumped from 0.0.1-next.6 to 0.0.1-next.7
30
+
3
31
  ## [0.0.1-next.6](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-service-v0.0.1-next.5...synchronised-storage-service-v0.0.1-next.6) (2025-08-11)
4
32
 
5
33
 
@@ -32,20 +32,6 @@ How often to check for entity updates in minutes.
32
32
 
33
33
  ***
34
34
 
35
- ### isTrustedNode?
36
-
37
- > `optional` **isTrustedNode**: `boolean`
38
-
39
- Is this a node that has permission to write to the verifiable storage?
40
-
41
- #### Default
42
-
43
- ```ts
44
- false
45
- ```
46
-
47
- ***
48
-
49
35
  ### consolidationIntervalMinutes?
50
36
 
51
37
  > `optional` **consolidationIntervalMinutes**: `number`
@@ -4,11 +4,11 @@ Options for the Synchronised Storage Service constructor.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### loggingConnectorType?
7
+ ### loggingComponentType?
8
8
 
9
- > `optional` **loggingConnectorType**: `string`
9
+ > `optional` **loggingComponentType**: `string`
10
10
 
11
- The logging connector.
11
+ The logging component.
12
12
 
13
13
  ***
14
14
 
@@ -103,6 +103,7 @@ task-scheduler
103
103
  > `optional` **trustedSynchronisedStorageComponentType**: `string`
104
104
 
105
105
  The synchronised entity storage component type to use if this node is not trusted.
106
+ If this is set, this node uses it as the trusted node to store changesets.
106
107
 
107
108
  ***
108
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/synchronised-storage-service",
3
- "version": "0.0.1-next.6",
3
+ "version": "0.0.1-next.8",
4
4
  "description": "Synchronised storage contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@twin.org/logging-models": "next",
27
27
  "@twin.org/nameof": "next",
28
28
  "@twin.org/standards-w3c-did": "next",
29
- "@twin.org/synchronised-storage-models": "0.0.1-next.6",
29
+ "@twin.org/synchronised-storage-models": "0.0.1-next.8",
30
30
  "@twin.org/verifiable-storage-models": "next",
31
31
  "@twin.org/web": "next"
32
32
  },