@twin.org/synchronised-storage-models 0.0.1-next.9 → 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 (102) hide show
  1. package/dist/es/index.js +27 -0
  2. package/dist/es/index.js.map +1 -0
  3. package/dist/es/models/ISyncChange.js +2 -0
  4. package/dist/es/models/ISyncChange.js.map +1 -0
  5. package/dist/es/models/ISyncChangeSet.js +2 -0
  6. package/dist/es/models/ISyncChangeSet.js.map +1 -0
  7. package/dist/es/models/ISyncRequest.js +2 -0
  8. package/dist/es/models/ISyncRequest.js.map +1 -0
  9. package/dist/es/models/ISynchronisedEntity.js +2 -0
  10. package/dist/es/models/ISynchronisedEntity.js.map +1 -0
  11. package/dist/es/models/ISynchronisedEntityCore.js +4 -0
  12. package/dist/es/models/ISynchronisedEntityCore.js.map +1 -0
  13. package/dist/es/models/ISynchronisedStorageComponent.js +2 -0
  14. package/dist/es/models/ISynchronisedStorageComponent.js.map +1 -0
  15. package/dist/es/models/api/ISyncChangeSetRequest.js +2 -0
  16. package/dist/es/models/api/ISyncChangeSetRequest.js.map +1 -0
  17. package/dist/es/models/api/ISyncDecryptionKeyRequest.js +2 -0
  18. package/dist/es/models/api/ISyncDecryptionKeyRequest.js.map +1 -0
  19. package/dist/es/models/api/ISyncDecryptionKeyResponse.js +4 -0
  20. package/dist/es/models/api/ISyncDecryptionKeyResponse.js.map +1 -0
  21. package/dist/es/models/eventBus/ISyncBatchRequest.js +2 -0
  22. package/dist/es/models/eventBus/ISyncBatchRequest.js.map +1 -0
  23. package/dist/es/models/eventBus/ISyncBatchResponse.js +2 -0
  24. package/dist/es/models/eventBus/ISyncBatchResponse.js.map +1 -0
  25. package/dist/es/models/eventBus/ISyncItemChange.js +2 -0
  26. package/dist/es/models/eventBus/ISyncItemChange.js.map +1 -0
  27. package/dist/es/models/eventBus/ISyncItemRemove.js +4 -0
  28. package/dist/es/models/eventBus/ISyncItemRemove.js.map +1 -0
  29. package/dist/es/models/eventBus/ISyncItemRequest.js +4 -0
  30. package/dist/es/models/eventBus/ISyncItemRequest.js.map +1 -0
  31. package/dist/es/models/eventBus/ISyncItemResponse.js +2 -0
  32. package/dist/es/models/eventBus/ISyncItemResponse.js.map +1 -0
  33. package/dist/es/models/eventBus/ISyncItemSet.js +2 -0
  34. package/dist/es/models/eventBus/ISyncItemSet.js.map +1 -0
  35. package/dist/es/models/eventBus/ISyncRegisterStorageKey.js +4 -0
  36. package/dist/es/models/eventBus/ISyncRegisterStorageKey.js.map +1 -0
  37. package/dist/es/models/eventBus/ISyncReset.js +2 -0
  38. package/dist/es/models/eventBus/ISyncReset.js.map +1 -0
  39. package/dist/es/models/syncChangeOperation.js +17 -0
  40. package/dist/es/models/syncChangeOperation.js.map +1 -0
  41. package/dist/es/models/syncNodeIdMode.js +21 -0
  42. package/dist/es/models/syncNodeIdMode.js.map +1 -0
  43. package/dist/es/models/synchronisedStorageAssetTypes.js +26 -0
  44. package/dist/es/models/synchronisedStorageAssetTypes.js.map +1 -0
  45. package/dist/es/models/synchronisedStorageContexts.js +13 -0
  46. package/dist/es/models/synchronisedStorageContexts.js.map +1 -0
  47. package/dist/{esm/index.mjs → es/models/synchronisedStorageTopics.js} +2 -41
  48. package/dist/es/models/synchronisedStorageTopics.js.map +1 -0
  49. package/dist/es/models/synchronisedStorageTypes.js +17 -0
  50. package/dist/es/models/synchronisedStorageTypes.js.map +1 -0
  51. package/dist/types/index.d.ts +24 -19
  52. package/dist/types/models/ISyncChange.d.ts +4 -4
  53. package/dist/types/models/ISyncChangeSet.d.ts +19 -15
  54. package/dist/types/models/ISyncRequest.d.ts +19 -0
  55. package/dist/types/models/ISynchronisedEntity.d.ts +3 -6
  56. package/dist/types/models/ISynchronisedEntityCore.d.ts +9 -0
  57. package/dist/types/models/ISynchronisedStorageComponent.d.ts +6 -6
  58. package/dist/types/models/api/ISyncChangeSetRequest.d.ts +9 -1
  59. package/dist/types/models/api/ISyncDecryptionKeyRequest.d.ts +5 -11
  60. package/dist/types/models/eventBus/ISyncBatchRequest.d.ts +3 -3
  61. package/dist/types/models/eventBus/ISyncBatchResponse.d.ts +3 -3
  62. package/dist/types/models/eventBus/ISyncItemChange.d.ts +2 -2
  63. package/dist/types/models/eventBus/ISyncItemRemove.d.ts +1 -1
  64. package/dist/types/models/eventBus/ISyncItemResponse.d.ts +3 -3
  65. package/dist/types/models/eventBus/ISyncItemSet.d.ts +3 -3
  66. package/dist/types/models/eventBus/ISyncReset.d.ts +3 -3
  67. package/dist/types/models/{syncNodeIdentityMode.d.ts → syncNodeIdMode.d.ts} +2 -2
  68. package/dist/types/models/synchronisedStorageAssetTypes.d.ts +25 -0
  69. package/dist/types/models/synchronisedStorageContexts.d.ts +13 -0
  70. package/dist/types/models/synchronisedStorageTypes.d.ts +17 -0
  71. package/docs/changelog.md +73 -0
  72. package/docs/reference/index.md +10 -2
  73. package/docs/reference/interfaces/ISyncBatchRequest.md +2 -2
  74. package/docs/reference/interfaces/ISyncBatchResponse.md +2 -8
  75. package/docs/reference/interfaces/ISyncChange.md +2 -8
  76. package/docs/reference/interfaces/ISyncChangeSet.md +24 -22
  77. package/docs/reference/interfaces/ISyncChangeSetRequest.md +16 -0
  78. package/docs/reference/interfaces/ISyncDecryptionKeyRequest.md +7 -11
  79. package/docs/reference/interfaces/ISyncItemChange.md +2 -2
  80. package/docs/reference/interfaces/ISyncItemRemove.md +2 -2
  81. package/docs/reference/interfaces/ISyncItemResponse.md +2 -8
  82. package/docs/reference/interfaces/ISyncItemSet.md +2 -8
  83. package/docs/reference/interfaces/ISyncRequest.md +27 -0
  84. package/docs/reference/interfaces/ISyncReset.md +2 -2
  85. package/docs/reference/interfaces/ISynchronisedEntity.md +14 -6
  86. package/docs/reference/interfaces/ISynchronisedEntityCore.md +15 -0
  87. package/docs/reference/interfaces/ISynchronisedStorageComponent.md +11 -11
  88. package/docs/reference/type-aliases/SyncNodeIdMode.md +5 -0
  89. package/docs/reference/type-aliases/SynchronisedStorageAssetTypes.md +5 -0
  90. package/docs/reference/type-aliases/SynchronisedStorageContexts.md +5 -0
  91. package/docs/reference/type-aliases/SynchronisedStorageTypes.md +5 -0
  92. package/docs/reference/variables/SyncChangeOperation.md +1 -1
  93. package/docs/reference/variables/{SyncNodeIdentityMode.md → SyncNodeIdMode.md} +3 -3
  94. package/docs/reference/variables/SynchronisedStorageAssetTypes.md +31 -0
  95. package/docs/reference/variables/SynchronisedStorageContexts.md +13 -0
  96. package/docs/reference/variables/SynchronisedStorageTopics.md +1 -1
  97. package/docs/reference/variables/SynchronisedStorageTypes.md +19 -0
  98. package/locales/en.json +1 -3
  99. package/package.json +25 -9
  100. package/dist/cjs/index.cjs +0 -88
  101. package/docs/reference/type-aliases/SyncNodeIdentityMode.md +0 -5
  102. /package/dist/types/models/{eventBus/syncChangeOperation.d.ts → syncChangeOperation.d.ts} +0 -0
@@ -1,8 +1,16 @@
1
- import type { ISyncChangeSet } from "../ISyncChangeSet";
1
+ import type { HeaderTypes, MimeTypes } from "@twin.org/web";
2
+ import type { ISyncChangeSet } from "../ISyncChangeSet.js";
2
3
  /**
3
4
  * Request a trusted node to perform a sync request for a changeset.
4
5
  */
5
6
  export interface ISyncChangeSetRequest {
7
+ /**
8
+ * The headers which can be used to determine the response data type.
9
+ */
10
+ headers?: {
11
+ [HeaderTypes.Accept]?: typeof MimeTypes.JsonLd | typeof MimeTypes.Json;
12
+ [HeaderTypes.Authorization]?: string;
13
+ };
6
14
  /**
7
15
  * The body of the request.
8
16
  */
@@ -1,19 +1,13 @@
1
- import type { IProof } from "@twin.org/standards-w3c-did";
1
+ import type { HeaderTypes, MimeTypes } from "@twin.org/web";
2
2
  /**
3
3
  * Request for the decryption key for the synchronised storage.
4
4
  */
5
5
  export interface ISyncDecryptionKeyRequest {
6
6
  /**
7
- * The body of the request.
7
+ * The headers which can be used to determine the response data type.
8
8
  */
9
- body: {
10
- /**
11
- * The identity of the node making the request.
12
- */
13
- nodeIdentity: string;
14
- /**
15
- * The proof of the request.
16
- */
17
- proof: IProof;
9
+ headers?: {
10
+ [HeaderTypes.Accept]?: typeof MimeTypes.JsonLd | typeof MimeTypes.Json;
11
+ [HeaderTypes.Authorization]?: string;
18
12
  };
19
13
  }
@@ -1,4 +1,4 @@
1
- import type { SyncNodeIdentityMode } from "../syncNodeIdentityMode";
1
+ import type { SyncNodeIdMode } from "../syncNodeIdMode.js";
2
2
  /**
3
3
  * Request for a local batch.
4
4
  */
@@ -12,7 +12,7 @@ export interface ISyncBatchRequest {
12
12
  */
13
13
  batchSize: number;
14
14
  /**
15
- * Determines which entries are required, for local it will match the nodeIdentity, for remote it will not include matching nodeIdentity, for all it will include all entries.
15
+ * Determines which entries are required, for local it will match the nodeId, for remote it will not include matching nodeId, for all it will include all entries.
16
16
  */
17
- requestMode: SyncNodeIdentityMode;
17
+ requestMode: SyncNodeIdMode;
18
18
  }
@@ -1,8 +1,8 @@
1
- import type { ISynchronisedEntity } from "../ISynchronisedEntity";
1
+ import type { ISynchronisedEntity } from "../ISynchronisedEntity.js";
2
2
  /**
3
3
  * Response for a local batch.
4
4
  */
5
- export interface ISyncBatchResponse<T extends ISynchronisedEntity> {
5
+ export interface ISyncBatchResponse {
6
6
  /**
7
7
  * The key of the storage for the entities in the batch.
8
8
  */
@@ -10,7 +10,7 @@ export interface ISyncBatchResponse<T extends ISynchronisedEntity> {
10
10
  /**
11
11
  * The entities in the batch.
12
12
  */
13
- entities: T[];
13
+ entities: ISynchronisedEntity[];
14
14
  /**
15
15
  * Is this the last entry in the batch?
16
16
  */
@@ -1,4 +1,4 @@
1
- import type { SyncChangeOperation } from "./syncChangeOperation";
1
+ import type { SyncChangeOperation } from "../syncChangeOperation.js";
2
2
  /**
3
3
  * The payload for an item change.
4
4
  */
@@ -14,7 +14,7 @@ export interface ISyncItemChange {
14
14
  /**
15
15
  * The node performing the operation.
16
16
  */
17
- nodeIdentity: string;
17
+ nodeId: string;
18
18
  /**
19
19
  * The id of the item being changed.
20
20
  */
@@ -9,7 +9,7 @@ export interface ISyncItemRemove {
9
9
  /**
10
10
  * The node identity of the entity being removed.
11
11
  */
12
- nodeIdentity: string;
12
+ nodeId: string;
13
13
  /**
14
14
  * The entity being removed from the item set.
15
15
  */
@@ -1,8 +1,8 @@
1
- import type { ISynchronisedEntity } from "../ISynchronisedEntity";
1
+ import type { ISynchronisedEntity } from "../ISynchronisedEntity.js";
2
2
  /**
3
3
  * Response for a sync item request.
4
4
  */
5
- export interface ISyncItemResponse<T extends ISynchronisedEntity> {
5
+ export interface ISyncItemResponse {
6
6
  /**
7
7
  * The key of the storage for the entities in the batch.
8
8
  */
@@ -14,5 +14,5 @@ export interface ISyncItemResponse<T extends ISynchronisedEntity> {
14
14
  /**
15
15
  * The entity in the sync item response, undefined if not found.
16
16
  */
17
- entity?: T;
17
+ entity?: ISynchronisedEntity;
18
18
  }
@@ -1,8 +1,8 @@
1
- import type { ISynchronisedEntity } from "../ISynchronisedEntity";
1
+ import type { ISynchronisedEntity } from "../ISynchronisedEntity.js";
2
2
  /**
3
3
  * The payload for an item set.
4
4
  */
5
- export interface ISyncItemSet<T extends ISynchronisedEntity = ISynchronisedEntity> {
5
+ export interface ISyncItemSet {
6
6
  /**
7
7
  * The key of the storage being set.
8
8
  */
@@ -10,5 +10,5 @@ export interface ISyncItemSet<T extends ISynchronisedEntity = ISynchronisedEntit
10
10
  /**
11
11
  * The entity being set in the item set.
12
12
  */
13
- entity: T;
13
+ entity: ISynchronisedEntity;
14
14
  }
@@ -1,4 +1,4 @@
1
- import type { SyncNodeIdentityMode } from "../syncNodeIdentityMode";
1
+ import type { SyncNodeIdMode } from "../syncNodeIdMode.js";
2
2
  /**
3
3
  * Request to reset the local storage.
4
4
  */
@@ -8,7 +8,7 @@ export interface ISyncReset {
8
8
  */
9
9
  storageKey: string;
10
10
  /**
11
- * Reset mode, this will use the nodeIdentity in the entities to determine which are local/remote.
11
+ * Reset mode, this will use the nodeId in the entities to determine which are local/remote.
12
12
  */
13
- resetMode: SyncNodeIdentityMode;
13
+ resetMode: SyncNodeIdMode;
14
14
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The mode to determine how node identities are matched.
3
3
  */
4
- export declare const SyncNodeIdentityMode: {
4
+ export declare const SyncNodeIdMode: {
5
5
  /**
6
6
  * Match the local node identity.
7
7
  */
@@ -18,4 +18,4 @@ export declare const SyncNodeIdentityMode: {
18
18
  /**
19
19
  * The mode to determine how node identities are matched.
20
20
  */
21
- export type SyncNodeIdentityMode = (typeof SyncNodeIdentityMode)[keyof typeof SyncNodeIdentityMode];
21
+ export type SyncNodeIdMode = (typeof SyncNodeIdMode)[keyof typeof SyncNodeIdMode];
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The ODRL asset types for SynchronisedStorage.
3
+ */
4
+ export declare const SynchronisedStorageAssetTypes: {
5
+ /**
6
+ * Decryption Key.
7
+ */
8
+ readonly DecryptionKey: "decryption-key";
9
+ /**
10
+ * Decryption Key Actions.
11
+ */
12
+ readonly DecryptionKeyActions: readonly ["read"];
13
+ /**
14
+ * Change Set.
15
+ */
16
+ readonly ChangeSet: "change-set";
17
+ /**
18
+ * Change Set Actions.
19
+ */
20
+ readonly ChangeSetActions: readonly ["write"];
21
+ };
22
+ /**
23
+ * The ODRL asset types for SynchronisedStorage.
24
+ */
25
+ export type SynchronisedStorageAssetTypes = (typeof SynchronisedStorageAssetTypes)[keyof typeof SynchronisedStorageAssetTypes];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The LD Contexts concerning SynchronisedStorage.
3
+ */
4
+ export declare const SynchronisedStorageContexts: {
5
+ /**
6
+ * The SynchronisedStorage LD Context.
7
+ */
8
+ readonly ContextRoot: "https://schema.twindev.org/synchronised-storage";
9
+ };
10
+ /**
11
+ * The LD Contexts concerning SynchronisedStorage.
12
+ */
13
+ export type SynchronisedStorageContexts = (typeof SynchronisedStorageContexts)[keyof typeof SynchronisedStorageContexts];
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The types of Synchronised Storage data.
3
+ */
4
+ export declare const SynchronisedStorageTypes: {
5
+ /**
6
+ * Represents a synchronised storage request.
7
+ */
8
+ readonly SyncRequest: "SyncRequest";
9
+ /**
10
+ * Represents a synchronised storage change set.
11
+ */
12
+ readonly ChangeSet: "ChangeSet";
13
+ };
14
+ /**
15
+ * The types of Synchronised Storage data.
16
+ */
17
+ export type SynchronisedStorageTypes = (typeof SynchronisedStorageTypes)[keyof typeof SynchronisedStorageTypes];
package/docs/changelog.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.1](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.3-next.0...synchronised-storage-models-v0.0.3-next.1) (2025-11-12)
4
+
5
+
6
+ ### Features
7
+
8
+ * add async item requests to reduce storage overhead ([#3](https://github.com/twinfoundation/synchronised-storage/issues/3)) ([af4e17d](https://github.com/twinfoundation/synchronised-storage/commit/af4e17d826f0a8278fd60dc69aaa21fe6895425f))
9
+ * add context id features ([#24](https://github.com/twinfoundation/synchronised-storage/issues/24)) ([5266b18](https://github.com/twinfoundation/synchronised-storage/commit/5266b18088317c7dc274a209a79102a6fc88a8e4))
10
+ * add rights management integration ([56fff6b](https://github.com/twinfoundation/synchronised-storage/commit/56fff6b4074f7ffaa40920e0c1e9fc98ca669111))
11
+ * add rights management integration ([d003d33](https://github.com/twinfoundation/synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
12
+ * add validate-locales ([e3d7b98](https://github.com/twinfoundation/synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
13
+ * additional node identity checks ([76257c4](https://github.com/twinfoundation/synchronised-storage/commit/76257c4173303d484391f71f581fd0e214204029))
14
+ * blob storage connector instead of component ([#7](https://github.com/twinfoundation/synchronised-storage/issues/7)) ([ea27241](https://github.com/twinfoundation/synchronised-storage/commit/ea27241cf0810b52ab7a6be7346809d127b7109a))
15
+ * eslint migration to flat config ([f601c14](https://github.com/twinfoundation/synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
16
+ * initial commit ([16949b8](https://github.com/twinfoundation/synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
17
+ * sync testing ([#5](https://github.com/twinfoundation/synchronised-storage/issues/5)) ([f78d5ac](https://github.com/twinfoundation/synchronised-storage/commit/f78d5ac661b891f9912e0a81d028453f909a64b4))
18
+ * update framework core ([99f09cc](https://github.com/twinfoundation/synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
19
+ * update to in built vc auth mechanism ([411a371](https://github.com/twinfoundation/synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * missing dependency ([cf4427e](https://github.com/twinfoundation/synchronised-storage/commit/cf4427edf6668b90aae9a9c1faafff13dffc2fc7))
25
+
26
+ ## [0.0.1-next.16](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.1-next.15...synchronised-storage-models-v0.0.1-next.16) (2025-10-09)
27
+
28
+
29
+ ### Features
30
+
31
+ * add validate-locales ([e3d7b98](https://github.com/twinfoundation/synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
32
+
33
+ ## [0.0.1-next.15](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.1-next.14...synchronised-storage-models-v0.0.1-next.15) (2025-09-23)
34
+
35
+
36
+ ### Features
37
+
38
+ * add rights management integration ([56fff6b](https://github.com/twinfoundation/synchronised-storage/commit/56fff6b4074f7ffaa40920e0c1e9fc98ca669111))
39
+ * update to in built vc auth mechanism ([411a371](https://github.com/twinfoundation/synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
40
+
41
+ ## [0.0.1-next.14](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.1-next.13...synchronised-storage-models-v0.0.1-next.14) (2025-09-22)
42
+
43
+
44
+ ### Features
45
+
46
+ * add rights management integration ([d003d33](https://github.com/twinfoundation/synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
47
+
48
+ ## [0.0.1-next.13](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.1-next.12...synchronised-storage-models-v0.0.1-next.13) (2025-08-29)
49
+
50
+
51
+ ### Features
52
+
53
+ * eslint migration to flat config ([f601c14](https://github.com/twinfoundation/synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
54
+
55
+ ## [0.0.1-next.12](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.1-next.11...synchronised-storage-models-v0.0.1-next.12) (2025-08-21)
56
+
57
+
58
+ ### Features
59
+
60
+ * update framework core ([99f09cc](https://github.com/twinfoundation/synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
61
+
62
+ ## [0.0.1-next.11](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.1-next.10...synchronised-storage-models-v0.0.1-next.11) (2025-08-15)
63
+
64
+
65
+ ### Miscellaneous Chores
66
+
67
+ * **synchronised-storage-models:** Synchronize repo versions
68
+
69
+ ## [0.0.1-next.10](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.1-next.9...synchronised-storage-models-v0.0.1-next.10) (2025-08-15)
70
+
71
+
72
+ ### Miscellaneous Chores
73
+
74
+ * **synchronised-storage-models:** Synchronize repo versions
75
+
3
76
  ## [0.0.1-next.9](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-models-v0.0.1-next.8...synchronised-storage-models-v0.0.1-next.9) (2025-08-13)
4
77
 
5
78
 
@@ -4,7 +4,9 @@
4
4
 
5
5
  - [ISyncChange](interfaces/ISyncChange.md)
6
6
  - [ISyncChangeSet](interfaces/ISyncChangeSet.md)
7
+ - [ISyncRequest](interfaces/ISyncRequest.md)
7
8
  - [ISynchronisedEntity](interfaces/ISynchronisedEntity.md)
9
+ - [ISynchronisedEntityCore](interfaces/ISynchronisedEntityCore.md)
8
10
  - [ISynchronisedStorageComponent](interfaces/ISynchronisedStorageComponent.md)
9
11
  - [ISyncChangeSetRequest](interfaces/ISyncChangeSetRequest.md)
10
12
  - [ISyncDecryptionKeyRequest](interfaces/ISyncDecryptionKeyRequest.md)
@@ -22,11 +24,17 @@
22
24
  ## Type Aliases
23
25
 
24
26
  - [SyncChangeOperation](type-aliases/SyncChangeOperation.md)
25
- - [SyncNodeIdentityMode](type-aliases/SyncNodeIdentityMode.md)
27
+ - [SyncNodeIdMode](type-aliases/SyncNodeIdMode.md)
28
+ - [SynchronisedStorageAssetTypes](type-aliases/SynchronisedStorageAssetTypes.md)
29
+ - [SynchronisedStorageContexts](type-aliases/SynchronisedStorageContexts.md)
26
30
  - [SynchronisedStorageTopics](type-aliases/SynchronisedStorageTopics.md)
31
+ - [SynchronisedStorageTypes](type-aliases/SynchronisedStorageTypes.md)
27
32
 
28
33
  ## Variables
29
34
 
30
35
  - [SyncChangeOperation](variables/SyncChangeOperation.md)
31
- - [SyncNodeIdentityMode](variables/SyncNodeIdentityMode.md)
36
+ - [SyncNodeIdMode](variables/SyncNodeIdMode.md)
37
+ - [SynchronisedStorageAssetTypes](variables/SynchronisedStorageAssetTypes.md)
38
+ - [SynchronisedStorageContexts](variables/SynchronisedStorageContexts.md)
32
39
  - [SynchronisedStorageTopics](variables/SynchronisedStorageTopics.md)
40
+ - [SynchronisedStorageTypes](variables/SynchronisedStorageTypes.md)
@@ -22,6 +22,6 @@ The size of the batch.
22
22
 
23
23
  ### requestMode
24
24
 
25
- > **requestMode**: [`SyncNodeIdentityMode`](../type-aliases/SyncNodeIdentityMode.md)
25
+ > **requestMode**: [`SyncNodeIdMode`](../type-aliases/SyncNodeIdMode.md)
26
26
 
27
- Determines which entries are required, for local it will match the nodeIdentity, for remote it will not include matching nodeIdentity, for all it will include all entries.
27
+ Determines which entries are required, for local it will match the nodeId, for remote it will not include matching nodeId, for all it will include all entries.
@@ -1,13 +1,7 @@
1
- # Interface: ISyncBatchResponse\<T\>
1
+ # Interface: ISyncBatchResponse
2
2
 
3
3
  Response for a local batch.
4
4
 
5
- ## Type Parameters
6
-
7
- ### T
8
-
9
- `T` *extends* [`ISynchronisedEntity`](ISynchronisedEntity.md)
10
-
11
5
  ## Properties
12
6
 
13
7
  ### storageKey
@@ -20,7 +14,7 @@ The key of the storage for the entities in the batch.
20
14
 
21
15
  ### entities
22
16
 
23
- > **entities**: `T`[]
17
+ > **entities**: [`ISynchronisedEntity`](ISynchronisedEntity.md)[]
24
18
 
25
19
  The entities in the batch.
26
20
 
@@ -1,13 +1,7 @@
1
- # Interface: ISyncChange\<T\>
1
+ # Interface: ISyncChange
2
2
 
3
3
  The object definition for a sync change.
4
4
 
5
- ## Type Parameters
6
-
7
- ### T
8
-
9
- `T` *extends* [`ISynchronisedEntity`](ISynchronisedEntity.md) = [`ISynchronisedEntity`](ISynchronisedEntity.md)
10
-
11
5
  ## Properties
12
6
 
13
7
  ### operation
@@ -28,6 +22,6 @@ The item id.
28
22
 
29
23
  ### entity?
30
24
 
31
- > `optional` **entity**: `Omit`\<`T`, `"id"` \| `"nodeIdentity"`\>
25
+ > `optional` **entity**: [`ISynchronisedEntityCore`](ISynchronisedEntityCore.md)
32
26
 
33
27
  The entity to set.
@@ -1,28 +1,30 @@
1
- # Interface: ISyncChangeSet\<T\>
1
+ # Interface: ISyncChangeSet
2
2
 
3
3
  The object definition for a sync change set.
4
4
 
5
- ## Type Parameters
5
+ ## Properties
6
6
 
7
- ### T
7
+ ### @context
8
8
 
9
- `T` *extends* [`ISynchronisedEntity`](ISynchronisedEntity.md) = [`ISynchronisedEntity`](ISynchronisedEntity.md)
9
+ > **@context**: `"https://schema.twindev.org/synchronised-storage"`
10
10
 
11
- ## Properties
11
+ The LD Context for the change set.
12
12
 
13
- ### id
13
+ ***
14
14
 
15
- > **id**: `string`
15
+ ### type
16
16
 
17
- The id of the change set.
17
+ > **type**: `"ChangeSet"`
18
+
19
+ The LD Type for the change set.
18
20
 
19
21
  ***
20
22
 
21
- ### dateCreated
23
+ ### id
22
24
 
23
- > **dateCreated**: `string`
25
+ > **id**: `string`
24
26
 
25
- The date the change set was created.
27
+ The id of the change set.
26
28
 
27
29
  ***
28
30
 
@@ -34,32 +36,32 @@ The storage key of the change set. This is used to identify the entities being s
34
36
 
35
37
  ***
36
38
 
37
- ### dateModified
39
+ ### dateCreated
38
40
 
39
- > **dateModified**: `string`
41
+ > **dateCreated**: `string`
40
42
 
41
- The date the change set was last modified.
43
+ The date the change set was created.
42
44
 
43
45
  ***
44
46
 
45
- ### changes
47
+ ### dateModified
46
48
 
47
- > **changes**: [`ISyncChange`](ISyncChange.md)\<`T`\>[]
49
+ > **dateModified**: `string`
48
50
 
49
- The changes to apply after a snapshot.
51
+ The date the change set was last modified.
50
52
 
51
53
  ***
52
54
 
53
- ### nodeIdentity
55
+ ### nodeId
54
56
 
55
- > **nodeIdentity**: `string`
57
+ > **nodeId**: `string`
56
58
 
57
59
  The identity of the node that created the change set.
58
60
 
59
61
  ***
60
62
 
61
- ### proof?
63
+ ### changes
62
64
 
63
- > `optional` **proof**: `IProof`
65
+ > **changes**: [`ISyncChange`](ISyncChange.md)[]
64
66
 
65
- The proof for the change set.
67
+ The changes to apply after a snapshot.
@@ -4,6 +4,22 @@ Request a trusted node to perform a sync request for a changeset.
4
4
 
5
5
  ## Properties
6
6
 
7
+ ### headers?
8
+
9
+ > `optional` **headers**: `object`
10
+
11
+ The headers which can be used to determine the response data type.
12
+
13
+ #### accept?
14
+
15
+ > `optional` **accept**: `"application/ld+json"` \| `"application/json"`
16
+
17
+ #### authorization?
18
+
19
+ > `optional` **authorization**: `string`
20
+
21
+ ***
22
+
7
23
  ### body
8
24
 
9
25
  > **body**: [`ISyncChangeSet`](ISyncChangeSet.md)
@@ -4,20 +4,16 @@ Request for the decryption key for the synchronised storage.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### body
7
+ ### headers?
8
8
 
9
- > **body**: `object`
9
+ > `optional` **headers**: `object`
10
10
 
11
- The body of the request.
11
+ The headers which can be used to determine the response data type.
12
12
 
13
- #### nodeIdentity
13
+ #### accept?
14
14
 
15
- > **nodeIdentity**: `string`
15
+ > `optional` **accept**: `"application/ld+json"` \| `"application/json"`
16
16
 
17
- The identity of the node making the request.
17
+ #### authorization?
18
18
 
19
- #### proof
20
-
21
- > **proof**: `IProof`
22
-
23
- The proof of the request.
19
+ > `optional` **authorization**: `string`
@@ -20,9 +20,9 @@ The operation being performed on the item.
20
20
 
21
21
  ***
22
22
 
23
- ### nodeIdentity
23
+ ### nodeId
24
24
 
25
- > **nodeIdentity**: `string`
25
+ > **nodeId**: `string`
26
26
 
27
27
  The node performing the operation.
28
28
 
@@ -12,9 +12,9 @@ The key of the storage being removed.
12
12
 
13
13
  ***
14
14
 
15
- ### nodeIdentity
15
+ ### nodeId
16
16
 
17
- > **nodeIdentity**: `string`
17
+ > **nodeId**: `string`
18
18
 
19
19
  The node identity of the entity being removed.
20
20
 
@@ -1,13 +1,7 @@
1
- # Interface: ISyncItemResponse\<T\>
1
+ # Interface: ISyncItemResponse
2
2
 
3
3
  Response for a sync item request.
4
4
 
5
- ## Type Parameters
6
-
7
- ### T
8
-
9
- `T` *extends* [`ISynchronisedEntity`](ISynchronisedEntity.md)
10
-
11
5
  ## Properties
12
6
 
13
7
  ### storageKey
@@ -28,6 +22,6 @@ The id of the entity in the sync item response.
28
22
 
29
23
  ### entity?
30
24
 
31
- > `optional` **entity**: `T`
25
+ > `optional` **entity**: [`ISynchronisedEntity`](ISynchronisedEntity.md)
32
26
 
33
27
  The entity in the sync item response, undefined if not found.
@@ -1,13 +1,7 @@
1
- # Interface: ISyncItemSet\<T\>
1
+ # Interface: ISyncItemSet
2
2
 
3
3
  The payload for an item set.
4
4
 
5
- ## Type Parameters
6
-
7
- ### T
8
-
9
- `T` *extends* [`ISynchronisedEntity`](ISynchronisedEntity.md) = [`ISynchronisedEntity`](ISynchronisedEntity.md)
10
-
11
5
  ## Properties
12
6
 
13
7
  ### storageKey
@@ -20,6 +14,6 @@ The key of the storage being set.
20
14
 
21
15
  ### entity
22
16
 
23
- > **entity**: `T`
17
+ > **entity**: [`ISynchronisedEntity`](ISynchronisedEntity.md)
24
18
 
25
19
  The entity being set in the item set.
@@ -0,0 +1,27 @@
1
+ # Interface: ISyncRequest
2
+
3
+ The object definition for a sync request.
4
+
5
+ ## Properties
6
+
7
+ ### @context
8
+
9
+ > **@context**: `"https://schema.twindev.org/synchronised-storage"`
10
+
11
+ The LD Context for the request.
12
+
13
+ ***
14
+
15
+ ### type
16
+
17
+ > **type**: `"SyncRequest"`
18
+
19
+ The LD Type for the request.
20
+
21
+ ***
22
+
23
+ ### nodeId
24
+
25
+ > **nodeId**: `string`
26
+
27
+ The identity of the node that created the request.
@@ -14,6 +14,6 @@ The key of the storage for the entities in the batch.
14
14
 
15
15
  ### resetMode
16
16
 
17
- > **resetMode**: [`SyncNodeIdentityMode`](../type-aliases/SyncNodeIdentityMode.md)
17
+ > **resetMode**: [`SyncNodeIdMode`](../type-aliases/SyncNodeIdMode.md)
18
18
 
19
- Reset mode, this will use the nodeIdentity in the entities to determine which are local/remote.
19
+ Reset mode, this will use the nodeId in the entities to determine which are local/remote.