@twin.org/synchronised-storage-service 0.0.1-next.3 → 0.0.1-next.4

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 (34) hide show
  1. package/dist/cjs/index.cjs +641 -176
  2. package/dist/esm/index.mjs +642 -178
  3. package/dist/types/entities/syncSnapshotEntry.d.ts +1 -2
  4. package/dist/types/helpers/blobStorageHelper.d.ts +33 -0
  5. package/dist/types/helpers/changeSetHelper.d.ts +19 -7
  6. package/dist/types/helpers/localSyncStateHelper.d.ts +8 -23
  7. package/dist/types/helpers/remoteSyncStateHelper.d.ts +15 -11
  8. package/dist/types/helpers/versions.d.ts +3 -0
  9. package/dist/types/index.d.ts +0 -2
  10. package/dist/types/models/ISyncPointerStore.d.ts +4 -0
  11. package/dist/types/models/ISyncSnapshot.d.ts +5 -1
  12. package/dist/types/models/ISyncState.d.ts +4 -0
  13. package/dist/types/models/ISynchronisedStorageServiceConfig.d.ts +12 -6
  14. package/dist/types/models/ISynchronisedStorageServiceConstructorOptions.d.ts +6 -2
  15. package/dist/types/synchronisedStorageRoutes.d.ts +9 -1
  16. package/dist/types/synchronisedStorageService.d.ts +13 -4
  17. package/docs/architecture.md +125 -0
  18. package/docs/changelog.md +15 -0
  19. package/docs/open-api/spec.json +244 -18
  20. package/docs/reference/classes/SyncSnapshotEntry.md +1 -1
  21. package/docs/reference/classes/SynchronisedStorageService.md +38 -5
  22. package/docs/reference/functions/synchronisedStorageGetDecryptionKeyRequest.md +31 -0
  23. package/docs/reference/index.md +1 -2
  24. package/docs/reference/interfaces/ISyncPointerStore.md +8 -0
  25. package/docs/reference/interfaces/ISyncSnapshot.md +10 -2
  26. package/docs/reference/interfaces/ISyncState.md +8 -0
  27. package/docs/reference/interfaces/ISynchronisedStorageServiceConfig.md +30 -10
  28. package/docs/reference/interfaces/ISynchronisedStorageServiceConstructorOptions.md +11 -3
  29. package/locales/en.json +46 -18
  30. package/package.json +3 -2
  31. package/dist/types/models/ISyncChange.d.ts +0 -18
  32. package/dist/types/models/ISyncChangeSet.d.ts +0 -36
  33. package/docs/reference/interfaces/ISyncChange.md +0 -33
  34. package/docs/reference/interfaces/ISyncChangeSet.md +0 -65
@@ -1,18 +0,0 @@
1
- import type { ISynchronisedEntity, SyncChangeOperation } from "@twin.org/synchronised-storage-models";
2
- /**
3
- * The object definition for a sync change.
4
- */
5
- export interface ISyncChange<T extends ISynchronisedEntity = ISynchronisedEntity> {
6
- /**
7
- * Operation.
8
- */
9
- operation: SyncChangeOperation;
10
- /**
11
- * The item id.
12
- */
13
- id: string;
14
- /**
15
- * The entity to set.
16
- */
17
- entity?: T;
18
- }
@@ -1,36 +0,0 @@
1
- import type { IProof } from "@twin.org/standards-w3c-did";
2
- import type { ISynchronisedEntity } from "@twin.org/synchronised-storage-models";
3
- import type { ISyncChange } from "./ISyncChange";
4
- /**
5
- * The object definition for a sync change set.
6
- */
7
- export interface ISyncChangeSet<T extends ISynchronisedEntity = ISynchronisedEntity> {
8
- /**
9
- * The id of the snapshot.
10
- */
11
- id: string;
12
- /**
13
- * The date the change set was created.
14
- */
15
- dateCreated: string;
16
- /**
17
- * The storage key of the change set. This is used to identify the entities being synchronised.
18
- */
19
- storageKey: string;
20
- /**
21
- * The date the change set was last modified.
22
- */
23
- dateModified?: string;
24
- /**
25
- * The changes to apply after a snapshot.
26
- */
27
- changes: ISyncChange<T>[];
28
- /**
29
- * The identity of the node that created the change set.
30
- */
31
- nodeIdentity: string;
32
- /**
33
- * The proof for the change set.
34
- */
35
- proof?: IProof;
36
- }
@@ -1,33 +0,0 @@
1
- # Interface: ISyncChange\<T\>
2
-
3
- The object definition for a sync change.
4
-
5
- ## Type Parameters
6
-
7
- ### T
8
-
9
- `T` *extends* `ISynchronisedEntity` = `ISynchronisedEntity`
10
-
11
- ## Properties
12
-
13
- ### operation
14
-
15
- > **operation**: `SyncChangeOperation`
16
-
17
- Operation.
18
-
19
- ***
20
-
21
- ### id
22
-
23
- > **id**: `string`
24
-
25
- The item id.
26
-
27
- ***
28
-
29
- ### entity?
30
-
31
- > `optional` **entity**: `T`
32
-
33
- The entity to set.
@@ -1,65 +0,0 @@
1
- # Interface: ISyncChangeSet\<T\>
2
-
3
- The object definition for a sync change set.
4
-
5
- ## Type Parameters
6
-
7
- ### T
8
-
9
- `T` *extends* `ISynchronisedEntity` = `ISynchronisedEntity`
10
-
11
- ## Properties
12
-
13
- ### id
14
-
15
- > **id**: `string`
16
-
17
- The id of the snapshot.
18
-
19
- ***
20
-
21
- ### dateCreated
22
-
23
- > **dateCreated**: `string`
24
-
25
- The date the change set was created.
26
-
27
- ***
28
-
29
- ### storageKey
30
-
31
- > **storageKey**: `string`
32
-
33
- The storage key of the change set. This is used to identify the entities being synchronised.
34
-
35
- ***
36
-
37
- ### dateModified?
38
-
39
- > `optional` **dateModified**: `string`
40
-
41
- The date the change set was last modified.
42
-
43
- ***
44
-
45
- ### changes
46
-
47
- > **changes**: [`ISyncChange`](ISyncChange.md)\<`T`\>[]
48
-
49
- The changes to apply after a snapshot.
50
-
51
- ***
52
-
53
- ### nodeIdentity
54
-
55
- > **nodeIdentity**: `string`
56
-
57
- The identity of the node that created the change set.
58
-
59
- ***
60
-
61
- ### proof?
62
-
63
- > `optional` **proof**: `IProof`
64
-
65
- The proof for the change set.