@twin.org/synchronised-storage-service 0.0.1-next.5 → 0.0.1-next.7
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.
- package/dist/cjs/index.cjs +194 -155
- package/dist/esm/index.mjs +194 -155
- package/dist/types/entities/syncSnapshotEntry.d.ts +4 -0
- package/dist/types/helpers/blobStorageHelper.d.ts +3 -3
- package/dist/types/helpers/changeSetHelper.d.ts +3 -3
- package/dist/types/helpers/localSyncStateHelper.d.ts +3 -3
- package/dist/types/helpers/remoteSyncStateHelper.d.ts +3 -3
- package/dist/types/models/ISyncSnapshot.d.ts +4 -0
- package/dist/types/models/ISynchronisedStorageServiceConstructorOptions.d.ts +2 -2
- package/docs/changelog.md +28 -0
- package/docs/reference/classes/SyncSnapshotEntry.md +8 -0
- package/docs/reference/interfaces/ISyncSnapshot.md +8 -0
- package/docs/reference/interfaces/ISynchronisedStorageServiceConstructorOptions.md +3 -3
- package/package.json +2 -2
|
@@ -31,6 +31,10 @@ export declare class SyncSnapshotEntry<T extends ISynchronisedEntity = ISynchron
|
|
|
31
31
|
* The flag to determine if this is a consolidated snapshot.
|
|
32
32
|
*/
|
|
33
33
|
isConsolidated: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The epoch for the changeset.
|
|
36
|
+
*/
|
|
37
|
+
epoch: number;
|
|
34
38
|
/**
|
|
35
39
|
* The ids of the storage for the change sets in the snapshot, if this is not a local snapshot.
|
|
36
40
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IBlobStorageConnector } from "@twin.org/blob-storage-models";
|
|
2
|
-
import type {
|
|
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
|
|
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(
|
|
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 {
|
|
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
|
|
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(
|
|
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 {
|
|
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
|
|
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(
|
|
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 {
|
|
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
|
|
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(
|
|
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.
|
|
@@ -4,9 +4,9 @@ import type { ISynchronisedStorageServiceConfig } from "./ISynchronisedStorageSe
|
|
|
4
4
|
*/
|
|
5
5
|
export interface ISynchronisedStorageServiceConstructorOptions {
|
|
6
6
|
/**
|
|
7
|
-
* The logging
|
|
7
|
+
* The logging component.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
loggingComponentType?: string;
|
|
10
10
|
/**
|
|
11
11
|
* The event bus component type.
|
|
12
12
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [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)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* switch to logging component ([a606302](https://github.com/twinfoundation/synchronised-storage/commit/a606302d7b89b922d33456b420d8f140d4fd565a))
|
|
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.6 to 0.0.1-next.7
|
|
16
|
+
|
|
17
|
+
## [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* improve consolidation logic ([698232f](https://github.com/twinfoundation/synchronised-storage/commit/698232f57640f87642ecd323cb1e4670eda33343))
|
|
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.5 to 0.0.1-next.6
|
|
30
|
+
|
|
3
31
|
## [0.0.1-next.5](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-service-v0.0.1-next.4...synchronised-storage-service-v0.0.1-next.5) (2025-08-11)
|
|
4
32
|
|
|
5
33
|
|
|
@@ -4,11 +4,11 @@ Options for the Synchronised Storage Service constructor.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### loggingComponentType?
|
|
8
8
|
|
|
9
|
-
> `optional` **
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
10
|
|
|
11
|
-
The logging
|
|
11
|
+
The logging component.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/synchronised-storage-service",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.7",
|
|
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.
|
|
29
|
+
"@twin.org/synchronised-storage-models": "0.0.1-next.7",
|
|
30
30
|
"@twin.org/verifiable-storage-models": "next",
|
|
31
31
|
"@twin.org/web": "next"
|
|
32
32
|
},
|