@twin.org/synchronised-storage-models 0.0.1-next.13 → 0.0.1-next.14
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 +60 -0
- package/dist/esm/index.mjs +58 -1
- package/dist/types/index.d.ts +6 -1
- package/dist/types/models/ISyncChange.d.ts +4 -4
- package/dist/types/models/ISyncChangeSet.d.ts +13 -9
- package/dist/types/models/ISyncRequest.d.ts +19 -0
- package/dist/types/models/ISynchronisedEntity.d.ts +2 -5
- package/dist/types/models/ISynchronisedEntityCore.d.ts +9 -0
- package/dist/types/models/ISynchronisedStorageComponent.d.ts +4 -5
- package/dist/types/models/api/ISyncChangeSetRequest.d.ts +8 -0
- package/dist/types/models/api/ISyncDecryptionKeyRequest.d.ts +5 -11
- package/dist/types/models/eventBus/ISyncBatchResponse.d.ts +2 -2
- package/dist/types/models/eventBus/ISyncItemChange.d.ts +1 -1
- package/dist/types/models/eventBus/ISyncItemResponse.d.ts +2 -2
- package/dist/types/models/eventBus/ISyncItemSet.d.ts +2 -2
- package/dist/types/models/synchronisedStorageAssetTypes.d.ts +25 -0
- package/dist/types/models/synchronisedStorageContexts.d.ts +13 -0
- package/dist/types/models/synchronisedStorageTypes.d.ts +17 -0
- package/docs/changelog.md +7 -0
- package/docs/reference/index.md +8 -0
- package/docs/reference/interfaces/ISyncBatchResponse.md +2 -8
- package/docs/reference/interfaces/ISyncChange.md +2 -8
- package/docs/reference/interfaces/ISyncChangeSet.md +18 -16
- package/docs/reference/interfaces/ISyncChangeSetRequest.md +16 -0
- package/docs/reference/interfaces/ISyncDecryptionKeyRequest.md +7 -11
- package/docs/reference/interfaces/ISyncItemResponse.md +2 -8
- package/docs/reference/interfaces/ISyncItemSet.md +2 -8
- package/docs/reference/interfaces/ISyncRequest.md +27 -0
- package/docs/reference/interfaces/ISynchronisedEntity.md +14 -6
- package/docs/reference/interfaces/ISynchronisedEntityCore.md +15 -0
- package/docs/reference/interfaces/ISynchronisedStorageComponent.md +10 -10
- package/docs/reference/type-aliases/SynchronisedStorageAssetTypes.md +5 -0
- package/docs/reference/type-aliases/SynchronisedStorageContexts.md +5 -0
- package/docs/reference/type-aliases/SynchronisedStorageTypes.md +5 -0
- package/docs/reference/variables/SynchronisedStorageAssetTypes.md +31 -0
- package/docs/reference/variables/SynchronisedStorageContexts.md +13 -0
- package/docs/reference/variables/SynchronisedStorageTypes.md +19 -0
- package/locales/en.json +1 -3
- package/package.json +4 -2
- /package/dist/types/models/{eventBus/syncChangeOperation.d.ts → syncChangeOperation.d.ts} +0 -0
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var standardsW3cOdrl = require('@twin.org/standards-w3c-odrl');
|
|
4
|
+
|
|
3
5
|
// Copyright 2024 IOTA Stiftung.
|
|
4
6
|
// SPDX-License-Identifier: Apache-2.0.
|
|
5
7
|
/**
|
|
@@ -17,6 +19,44 @@ const SyncChangeOperation = {
|
|
|
17
19
|
Delete: "delete"
|
|
18
20
|
};
|
|
19
21
|
|
|
22
|
+
// Copyright 2024 IOTA Stiftung.
|
|
23
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
24
|
+
/**
|
|
25
|
+
* The ODRL asset types for SynchronisedStorage.
|
|
26
|
+
*/
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28
|
+
const SynchronisedStorageAssetTypes = {
|
|
29
|
+
/**
|
|
30
|
+
* Decryption Key.
|
|
31
|
+
*/
|
|
32
|
+
DecryptionKey: "decryption-key",
|
|
33
|
+
/**
|
|
34
|
+
* Decryption Key Actions.
|
|
35
|
+
*/
|
|
36
|
+
DecryptionKeyActions: [standardsW3cOdrl.ActionType.Read],
|
|
37
|
+
/**
|
|
38
|
+
* Change Set.
|
|
39
|
+
*/
|
|
40
|
+
ChangeSet: "change-set",
|
|
41
|
+
/**
|
|
42
|
+
* Change Set Actions.
|
|
43
|
+
*/
|
|
44
|
+
ChangeSetActions: [standardsW3cOdrl.ActionType.Write]
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Copyright 2024 IOTA Stiftung.
|
|
48
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
49
|
+
/**
|
|
50
|
+
* The LD Contexts concerning SynchronisedStorage.
|
|
51
|
+
*/
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
53
|
+
const SynchronisedStorageContexts = {
|
|
54
|
+
/**
|
|
55
|
+
* The SynchronisedStorage LD Context.
|
|
56
|
+
*/
|
|
57
|
+
ContextRoot: "https://schema.twindev.org/synchronised-storage"
|
|
58
|
+
};
|
|
59
|
+
|
|
20
60
|
// Copyright 2024 IOTA Stiftung.
|
|
21
61
|
// SPDX-License-Identifier: Apache-2.0.
|
|
22
62
|
/**
|
|
@@ -62,6 +102,23 @@ const SynchronisedStorageTopics = {
|
|
|
62
102
|
RemoteItemRemove: "synchronised-storage:remote-item-remove"
|
|
63
103
|
};
|
|
64
104
|
|
|
105
|
+
// Copyright 2024 IOTA Stiftung.
|
|
106
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
107
|
+
/**
|
|
108
|
+
* The types of Synchronised Storage data.
|
|
109
|
+
*/
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
111
|
+
const SynchronisedStorageTypes = {
|
|
112
|
+
/**
|
|
113
|
+
* Represents a synchronised storage request.
|
|
114
|
+
*/
|
|
115
|
+
SyncRequest: "SyncRequest",
|
|
116
|
+
/**
|
|
117
|
+
* Represents a synchronised storage change set.
|
|
118
|
+
*/
|
|
119
|
+
ChangeSet: "ChangeSet"
|
|
120
|
+
};
|
|
121
|
+
|
|
65
122
|
// Copyright 2024 IOTA Stiftung.
|
|
66
123
|
// SPDX-License-Identifier: Apache-2.0.
|
|
67
124
|
/**
|
|
@@ -85,4 +142,7 @@ const SyncNodeIdentityMode = {
|
|
|
85
142
|
|
|
86
143
|
exports.SyncChangeOperation = SyncChangeOperation;
|
|
87
144
|
exports.SyncNodeIdentityMode = SyncNodeIdentityMode;
|
|
145
|
+
exports.SynchronisedStorageAssetTypes = SynchronisedStorageAssetTypes;
|
|
146
|
+
exports.SynchronisedStorageContexts = SynchronisedStorageContexts;
|
|
88
147
|
exports.SynchronisedStorageTopics = SynchronisedStorageTopics;
|
|
148
|
+
exports.SynchronisedStorageTypes = SynchronisedStorageTypes;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ActionType } from '@twin.org/standards-w3c-odrl';
|
|
2
|
+
|
|
1
3
|
// Copyright 2024 IOTA Stiftung.
|
|
2
4
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
5
|
/**
|
|
@@ -15,6 +17,44 @@ const SyncChangeOperation = {
|
|
|
15
17
|
Delete: "delete"
|
|
16
18
|
};
|
|
17
19
|
|
|
20
|
+
// Copyright 2024 IOTA Stiftung.
|
|
21
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
22
|
+
/**
|
|
23
|
+
* The ODRL asset types for SynchronisedStorage.
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
26
|
+
const SynchronisedStorageAssetTypes = {
|
|
27
|
+
/**
|
|
28
|
+
* Decryption Key.
|
|
29
|
+
*/
|
|
30
|
+
DecryptionKey: "decryption-key",
|
|
31
|
+
/**
|
|
32
|
+
* Decryption Key Actions.
|
|
33
|
+
*/
|
|
34
|
+
DecryptionKeyActions: [ActionType.Read],
|
|
35
|
+
/**
|
|
36
|
+
* Change Set.
|
|
37
|
+
*/
|
|
38
|
+
ChangeSet: "change-set",
|
|
39
|
+
/**
|
|
40
|
+
* Change Set Actions.
|
|
41
|
+
*/
|
|
42
|
+
ChangeSetActions: [ActionType.Write]
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Copyright 2024 IOTA Stiftung.
|
|
46
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
47
|
+
/**
|
|
48
|
+
* The LD Contexts concerning SynchronisedStorage.
|
|
49
|
+
*/
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
51
|
+
const SynchronisedStorageContexts = {
|
|
52
|
+
/**
|
|
53
|
+
* The SynchronisedStorage LD Context.
|
|
54
|
+
*/
|
|
55
|
+
ContextRoot: "https://schema.twindev.org/synchronised-storage"
|
|
56
|
+
};
|
|
57
|
+
|
|
18
58
|
// Copyright 2024 IOTA Stiftung.
|
|
19
59
|
// SPDX-License-Identifier: Apache-2.0.
|
|
20
60
|
/**
|
|
@@ -60,6 +100,23 @@ const SynchronisedStorageTopics = {
|
|
|
60
100
|
RemoteItemRemove: "synchronised-storage:remote-item-remove"
|
|
61
101
|
};
|
|
62
102
|
|
|
103
|
+
// Copyright 2024 IOTA Stiftung.
|
|
104
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
105
|
+
/**
|
|
106
|
+
* The types of Synchronised Storage data.
|
|
107
|
+
*/
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
109
|
+
const SynchronisedStorageTypes = {
|
|
110
|
+
/**
|
|
111
|
+
* Represents a synchronised storage request.
|
|
112
|
+
*/
|
|
113
|
+
SyncRequest: "SyncRequest",
|
|
114
|
+
/**
|
|
115
|
+
* Represents a synchronised storage change set.
|
|
116
|
+
*/
|
|
117
|
+
ChangeSet: "ChangeSet"
|
|
118
|
+
};
|
|
119
|
+
|
|
63
120
|
// Copyright 2024 IOTA Stiftung.
|
|
64
121
|
// SPDX-License-Identifier: Apache-2.0.
|
|
65
122
|
/**
|
|
@@ -81,4 +138,4 @@ const SyncNodeIdentityMode = {
|
|
|
81
138
|
All: "all"
|
|
82
139
|
};
|
|
83
140
|
|
|
84
|
-
export { SyncChangeOperation, SyncNodeIdentityMode, SynchronisedStorageTopics };
|
|
141
|
+
export { SyncChangeOperation, SyncNodeIdentityMode, SynchronisedStorageAssetTypes, SynchronisedStorageContexts, SynchronisedStorageTopics, SynchronisedStorageTypes };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,10 +10,15 @@ export * from "./models/eventBus/ISyncItemResponse";
|
|
|
10
10
|
export * from "./models/eventBus/ISyncItemSet";
|
|
11
11
|
export * from "./models/eventBus/ISyncRegisterStorageKey";
|
|
12
12
|
export * from "./models/eventBus/ISyncReset";
|
|
13
|
-
export * from "./models/eventBus/syncChangeOperation";
|
|
14
13
|
export * from "./models/ISyncChange";
|
|
15
14
|
export * from "./models/ISyncChangeSet";
|
|
16
15
|
export * from "./models/ISynchronisedEntity";
|
|
16
|
+
export * from "./models/ISynchronisedEntityCore";
|
|
17
17
|
export * from "./models/ISynchronisedStorageComponent";
|
|
18
|
+
export * from "./models/ISyncRequest";
|
|
19
|
+
export * from "./models/syncChangeOperation";
|
|
20
|
+
export * from "./models/synchronisedStorageAssetTypes";
|
|
21
|
+
export * from "./models/synchronisedStorageContexts";
|
|
18
22
|
export * from "./models/synchronisedStorageTopics";
|
|
23
|
+
export * from "./models/synchronisedStorageTypes";
|
|
19
24
|
export * from "./models/syncNodeIdentityMode";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ISynchronisedEntityCore } from "./ISynchronisedEntityCore";
|
|
2
|
+
import type { SyncChangeOperation } from "./syncChangeOperation";
|
|
3
3
|
/**
|
|
4
4
|
* The object definition for a sync change.
|
|
5
5
|
*/
|
|
6
|
-
export interface ISyncChange
|
|
6
|
+
export interface ISyncChange {
|
|
7
7
|
/**
|
|
8
8
|
* Operation.
|
|
9
9
|
*/
|
|
@@ -15,5 +15,5 @@ export interface ISyncChange<T extends ISynchronisedEntity = ISynchronisedEntity
|
|
|
15
15
|
/**
|
|
16
16
|
* The entity to set.
|
|
17
17
|
*/
|
|
18
|
-
entity?:
|
|
18
|
+
entity?: ISynchronisedEntityCore;
|
|
19
19
|
}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import type { IProof } from "@twin.org/standards-w3c-did";
|
|
2
1
|
import type { ISyncChange } from "./ISyncChange";
|
|
3
|
-
import type {
|
|
2
|
+
import type { SynchronisedStorageContexts } from "./synchronisedStorageContexts";
|
|
3
|
+
import type { SynchronisedStorageTypes } from "./synchronisedStorageTypes";
|
|
4
4
|
/**
|
|
5
5
|
* The object definition for a sync change set.
|
|
6
6
|
*/
|
|
7
|
-
export interface ISyncChangeSet
|
|
7
|
+
export interface ISyncChangeSet {
|
|
8
|
+
/**
|
|
9
|
+
* The LD Context for the change set.
|
|
10
|
+
*/
|
|
11
|
+
"@context": typeof SynchronisedStorageContexts.ContextRoot;
|
|
12
|
+
/**
|
|
13
|
+
* The LD Type for the change set.
|
|
14
|
+
*/
|
|
15
|
+
type: typeof SynchronisedStorageTypes.ChangeSet;
|
|
8
16
|
/**
|
|
9
17
|
* The id of the change set.
|
|
10
18
|
*/
|
|
@@ -21,16 +29,12 @@ export interface ISyncChangeSet<T extends ISynchronisedEntity = ISynchronisedEnt
|
|
|
21
29
|
* The date the change set was last modified.
|
|
22
30
|
*/
|
|
23
31
|
dateModified: string;
|
|
24
|
-
/**
|
|
25
|
-
* The changes to apply after a snapshot.
|
|
26
|
-
*/
|
|
27
|
-
changes: ISyncChange<T>[];
|
|
28
32
|
/**
|
|
29
33
|
* The identity of the node that created the change set.
|
|
30
34
|
*/
|
|
31
35
|
nodeIdentity: string;
|
|
32
36
|
/**
|
|
33
|
-
* The
|
|
37
|
+
* The changes to apply after a snapshot.
|
|
34
38
|
*/
|
|
35
|
-
|
|
39
|
+
changes: ISyncChange[];
|
|
36
40
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SynchronisedStorageContexts } from "./synchronisedStorageContexts";
|
|
2
|
+
import type { SynchronisedStorageTypes } from "./synchronisedStorageTypes";
|
|
3
|
+
/**
|
|
4
|
+
* The object definition for a sync request.
|
|
5
|
+
*/
|
|
6
|
+
export interface ISyncRequest {
|
|
7
|
+
/**
|
|
8
|
+
* The LD Context for the request.
|
|
9
|
+
*/
|
|
10
|
+
"@context": typeof SynchronisedStorageContexts.ContextRoot;
|
|
11
|
+
/**
|
|
12
|
+
* The LD Type for the request.
|
|
13
|
+
*/
|
|
14
|
+
type: typeof SynchronisedStorageTypes.SyncRequest;
|
|
15
|
+
/**
|
|
16
|
+
* The identity of the node that created the request.
|
|
17
|
+
*/
|
|
18
|
+
nodeIdentity: string;
|
|
19
|
+
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
+
import type { ISynchronisedEntityCore } from "./ISynchronisedEntityCore";
|
|
1
2
|
/**
|
|
2
3
|
* The base definition for synchronised entries.
|
|
3
4
|
*/
|
|
4
|
-
export interface ISynchronisedEntity {
|
|
5
|
+
export interface ISynchronisedEntity extends ISynchronisedEntityCore {
|
|
5
6
|
/**
|
|
6
7
|
* The id of the entry.
|
|
7
8
|
*/
|
|
8
9
|
id: string;
|
|
9
|
-
/**
|
|
10
|
-
* The date the entry was modified
|
|
11
|
-
*/
|
|
12
|
-
dateModified: string;
|
|
13
10
|
/**
|
|
14
11
|
* The identity of the node that owns the entry.
|
|
15
12
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type { IProof } from "@twin.org/standards-w3c-did";
|
|
3
2
|
import type { ISyncChangeSet } from "./ISyncChangeSet";
|
|
4
3
|
/**
|
|
5
4
|
* Class for performing synchronised storage operations.
|
|
@@ -8,15 +7,15 @@ export interface ISynchronisedStorageComponent extends IComponent {
|
|
|
8
7
|
/**
|
|
9
8
|
* Get the decryption key for the synchronised storage.
|
|
10
9
|
* This is used to decrypt the data stored in the synchronised storage.
|
|
11
|
-
* @param
|
|
12
|
-
* @param proof The proof of the request so we know the request is from the specified node.
|
|
10
|
+
* @param proofToken The proof token to validate the request.
|
|
13
11
|
* @returns The decryption key.
|
|
14
12
|
*/
|
|
15
|
-
getDecryptionKey(
|
|
13
|
+
getDecryptionKey(proofToken: string): Promise<string>;
|
|
16
14
|
/**
|
|
17
15
|
* Synchronise a set of changes from an untrusted node, assumes this is a trusted node.
|
|
18
16
|
* @param syncChangeSet The change set to synchronise.
|
|
17
|
+
* @param proofToken The proof token to validate the request.
|
|
19
18
|
* @returns Nothing.
|
|
20
19
|
*/
|
|
21
|
-
syncChangeSet(syncChangeSet: ISyncChangeSet): Promise<void>;
|
|
20
|
+
syncChangeSet(syncChangeSet: ISyncChangeSet, proofToken: string): Promise<void>;
|
|
22
21
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
1
2
|
import type { ISyncChangeSet } from "../ISyncChangeSet";
|
|
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 {
|
|
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
|
|
7
|
+
* The headers which can be used to determine the response data type.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
}
|
|
@@ -2,7 +2,7 @@ import type { ISynchronisedEntity } from "../ISynchronisedEntity";
|
|
|
2
2
|
/**
|
|
3
3
|
* Response for a local batch.
|
|
4
4
|
*/
|
|
5
|
-
export interface ISyncBatchResponse
|
|
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:
|
|
13
|
+
entities: ISynchronisedEntity[];
|
|
14
14
|
/**
|
|
15
15
|
* Is this the last entry in the batch?
|
|
16
16
|
*/
|
|
@@ -2,7 +2,7 @@ import type { ISynchronisedEntity } from "../ISynchronisedEntity";
|
|
|
2
2
|
/**
|
|
3
3
|
* Response for a sync item request.
|
|
4
4
|
*/
|
|
5
|
-
export interface ISyncItemResponse
|
|
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?:
|
|
17
|
+
entity?: ISynchronisedEntity;
|
|
18
18
|
}
|
|
@@ -2,7 +2,7 @@ import type { ISynchronisedEntity } from "../ISynchronisedEntity";
|
|
|
2
2
|
/**
|
|
3
3
|
* The payload for an item set.
|
|
4
4
|
*/
|
|
5
|
-
export interface ISyncItemSet
|
|
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:
|
|
13
|
+
entity: ISynchronisedEntity;
|
|
14
14
|
}
|
|
@@ -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,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [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)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add rights management integration ([d003d33](https://github.com/twinfoundation/synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
|
|
9
|
+
|
|
3
10
|
## [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)
|
|
4
11
|
|
|
5
12
|
|
package/docs/reference/index.md
CHANGED
|
@@ -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)
|
|
@@ -23,10 +25,16 @@
|
|
|
23
25
|
|
|
24
26
|
- [SyncChangeOperation](type-aliases/SyncChangeOperation.md)
|
|
25
27
|
- [SyncNodeIdentityMode](type-aliases/SyncNodeIdentityMode.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
36
|
- [SyncNodeIdentityMode](variables/SyncNodeIdentityMode.md)
|
|
37
|
+
- [SynchronisedStorageAssetTypes](variables/SynchronisedStorageAssetTypes.md)
|
|
38
|
+
- [SynchronisedStorageContexts](variables/SynchronisedStorageContexts.md)
|
|
32
39
|
- [SynchronisedStorageTopics](variables/SynchronisedStorageTopics.md)
|
|
40
|
+
- [SynchronisedStorageTypes](variables/SynchronisedStorageTypes.md)
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
# Interface: ISyncBatchResponse
|
|
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**: `
|
|
17
|
+
> **entities**: [`ISynchronisedEntity`](ISynchronisedEntity.md)[]
|
|
24
18
|
|
|
25
19
|
The entities in the batch.
|
|
26
20
|
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
# Interface: ISyncChange
|
|
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**: `
|
|
25
|
+
> `optional` **entity**: [`ISynchronisedEntityCore`](ISynchronisedEntityCore.md)
|
|
32
26
|
|
|
33
27
|
The entity to set.
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
# Interface: ISyncChangeSet
|
|
1
|
+
# Interface: ISyncChangeSet
|
|
2
2
|
|
|
3
3
|
The object definition for a sync change set.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Properties
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### @context
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> **@context**: `"https://schema.twindev.org/synchronised-storage"`
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The LD Context for the change set.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### type
|
|
16
|
+
|
|
17
|
+
> **type**: `"ChangeSet"`
|
|
18
|
+
|
|
19
|
+
The LD Type for the change set.
|
|
20
|
+
|
|
21
|
+
***
|
|
12
22
|
|
|
13
23
|
### id
|
|
14
24
|
|
|
@@ -42,14 +52,6 @@ The date the change set was last modified.
|
|
|
42
52
|
|
|
43
53
|
***
|
|
44
54
|
|
|
45
|
-
### changes
|
|
46
|
-
|
|
47
|
-
> **changes**: [`ISyncChange`](ISyncChange.md)\<`T`\>[]
|
|
48
|
-
|
|
49
|
-
The changes to apply after a snapshot.
|
|
50
|
-
|
|
51
|
-
***
|
|
52
|
-
|
|
53
55
|
### nodeIdentity
|
|
54
56
|
|
|
55
57
|
> **nodeIdentity**: `string`
|
|
@@ -58,8 +60,8 @@ The identity of the node that created the change set.
|
|
|
58
60
|
|
|
59
61
|
***
|
|
60
62
|
|
|
61
|
-
###
|
|
63
|
+
### changes
|
|
62
64
|
|
|
63
|
-
>
|
|
65
|
+
> **changes**: [`ISyncChange`](ISyncChange.md)[]
|
|
64
66
|
|
|
65
|
-
The
|
|
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
|
+
> **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
|
+
> **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
|
-
###
|
|
7
|
+
### headers
|
|
8
8
|
|
|
9
|
-
> **
|
|
9
|
+
> **headers**: `object`
|
|
10
10
|
|
|
11
|
-
The
|
|
11
|
+
The headers which can be used to determine the response data type.
|
|
12
12
|
|
|
13
|
-
####
|
|
13
|
+
#### accept?
|
|
14
14
|
|
|
15
|
-
> **
|
|
15
|
+
> `optional` **accept**: `"application/ld+json"` \| `"application/json"`
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
#### authorization
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
> **proof**: `IProof`
|
|
22
|
-
|
|
23
|
-
The proof of the request.
|
|
19
|
+
> **authorization**: `string`
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
# Interface: ISyncItemResponse
|
|
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**: `
|
|
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
|
|
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**: `
|
|
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
|
+
### nodeIdentity
|
|
24
|
+
|
|
25
|
+
> **nodeIdentity**: `string`
|
|
26
|
+
|
|
27
|
+
The identity of the node that created the request.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
The base definition for synchronised entries.
|
|
4
4
|
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- [`ISynchronisedEntityCore`](ISynchronisedEntityCore.md)
|
|
8
|
+
|
|
5
9
|
## Properties
|
|
6
10
|
|
|
7
11
|
### id
|
|
@@ -12,16 +16,20 @@ The id of the entry.
|
|
|
12
16
|
|
|
13
17
|
***
|
|
14
18
|
|
|
15
|
-
###
|
|
19
|
+
### nodeIdentity
|
|
16
20
|
|
|
17
|
-
> **
|
|
21
|
+
> **nodeIdentity**: `string`
|
|
18
22
|
|
|
19
|
-
The
|
|
23
|
+
The identity of the node that owns the entry.
|
|
20
24
|
|
|
21
25
|
***
|
|
22
26
|
|
|
23
|
-
###
|
|
27
|
+
### dateModified
|
|
24
28
|
|
|
25
|
-
> **
|
|
29
|
+
> **dateModified**: `string`
|
|
26
30
|
|
|
27
|
-
The
|
|
31
|
+
The date the entry was modified.
|
|
32
|
+
|
|
33
|
+
#### Inherited from
|
|
34
|
+
|
|
35
|
+
[`ISynchronisedEntityCore`](ISynchronisedEntityCore.md).[`dateModified`](ISynchronisedEntityCore.md#datemodified)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Interface: ISynchronisedEntityCore
|
|
2
|
+
|
|
3
|
+
The base definition for synchronised entries.
|
|
4
|
+
|
|
5
|
+
## Extended by
|
|
6
|
+
|
|
7
|
+
- [`ISynchronisedEntity`](ISynchronisedEntity.md)
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### dateModified
|
|
12
|
+
|
|
13
|
+
> **dateModified**: `string`
|
|
14
|
+
|
|
15
|
+
The date the entry was modified.
|
|
@@ -10,24 +10,18 @@ Class for performing synchronised storage operations.
|
|
|
10
10
|
|
|
11
11
|
### getDecryptionKey()
|
|
12
12
|
|
|
13
|
-
> **getDecryptionKey**(`
|
|
13
|
+
> **getDecryptionKey**(`proofToken`): `Promise`\<`string`\>
|
|
14
14
|
|
|
15
15
|
Get the decryption key for the synchronised storage.
|
|
16
16
|
This is used to decrypt the data stored in the synchronised storage.
|
|
17
17
|
|
|
18
18
|
#### Parameters
|
|
19
19
|
|
|
20
|
-
#####
|
|
20
|
+
##### proofToken
|
|
21
21
|
|
|
22
22
|
`string`
|
|
23
23
|
|
|
24
|
-
The
|
|
25
|
-
|
|
26
|
-
##### proof
|
|
27
|
-
|
|
28
|
-
`IProof`
|
|
29
|
-
|
|
30
|
-
The proof of the request so we know the request is from the specified node.
|
|
24
|
+
The proof token to validate the request.
|
|
31
25
|
|
|
32
26
|
#### Returns
|
|
33
27
|
|
|
@@ -39,7 +33,7 @@ The decryption key.
|
|
|
39
33
|
|
|
40
34
|
### syncChangeSet()
|
|
41
35
|
|
|
42
|
-
> **syncChangeSet**(`syncChangeSet`): `Promise`\<`void`\>
|
|
36
|
+
> **syncChangeSet**(`syncChangeSet`, `proofToken`): `Promise`\<`void`\>
|
|
43
37
|
|
|
44
38
|
Synchronise a set of changes from an untrusted node, assumes this is a trusted node.
|
|
45
39
|
|
|
@@ -51,6 +45,12 @@ Synchronise a set of changes from an untrusted node, assumes this is a trusted n
|
|
|
51
45
|
|
|
52
46
|
The change set to synchronise.
|
|
53
47
|
|
|
48
|
+
##### proofToken
|
|
49
|
+
|
|
50
|
+
`string`
|
|
51
|
+
|
|
52
|
+
The proof token to validate the request.
|
|
53
|
+
|
|
54
54
|
#### Returns
|
|
55
55
|
|
|
56
56
|
`Promise`\<`void`\>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: SynchronisedStorageAssetTypes
|
|
2
|
+
|
|
3
|
+
> **SynchronisedStorageAssetTypes** = *typeof* [`SynchronisedStorageAssetTypes`](../variables/SynchronisedStorageAssetTypes.md)\[keyof *typeof* [`SynchronisedStorageAssetTypes`](../variables/SynchronisedStorageAssetTypes.md)\]
|
|
4
|
+
|
|
5
|
+
The ODRL asset types for SynchronisedStorage.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: SynchronisedStorageContexts
|
|
2
|
+
|
|
3
|
+
> **SynchronisedStorageContexts** = *typeof* [`SynchronisedStorageContexts`](../variables/SynchronisedStorageContexts.md)\[keyof *typeof* [`SynchronisedStorageContexts`](../variables/SynchronisedStorageContexts.md)\]
|
|
4
|
+
|
|
5
|
+
The LD Contexts concerning SynchronisedStorage.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: SynchronisedStorageTypes
|
|
2
|
+
|
|
3
|
+
> **SynchronisedStorageTypes** = *typeof* [`SynchronisedStorageTypes`](../variables/SynchronisedStorageTypes.md)\[keyof *typeof* [`SynchronisedStorageTypes`](../variables/SynchronisedStorageTypes.md)\]
|
|
4
|
+
|
|
5
|
+
The types of Synchronised Storage data.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Variable: SynchronisedStorageAssetTypes
|
|
2
|
+
|
|
3
|
+
> `const` **SynchronisedStorageAssetTypes**: `object`
|
|
4
|
+
|
|
5
|
+
The ODRL asset types for SynchronisedStorage.
|
|
6
|
+
|
|
7
|
+
## Type Declaration
|
|
8
|
+
|
|
9
|
+
### DecryptionKey
|
|
10
|
+
|
|
11
|
+
> `readonly` **DecryptionKey**: `"decryption-key"` = `"decryption-key"`
|
|
12
|
+
|
|
13
|
+
Decryption Key.
|
|
14
|
+
|
|
15
|
+
### DecryptionKeyActions
|
|
16
|
+
|
|
17
|
+
> `readonly` **DecryptionKeyActions**: readonly \[`"read"`\]
|
|
18
|
+
|
|
19
|
+
Decryption Key Actions.
|
|
20
|
+
|
|
21
|
+
### ChangeSet
|
|
22
|
+
|
|
23
|
+
> `readonly` **ChangeSet**: `"change-set"` = `"change-set"`
|
|
24
|
+
|
|
25
|
+
Change Set.
|
|
26
|
+
|
|
27
|
+
### ChangeSetActions
|
|
28
|
+
|
|
29
|
+
> `readonly` **ChangeSetActions**: readonly \[`"write"`\]
|
|
30
|
+
|
|
31
|
+
Change Set Actions.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Variable: SynchronisedStorageContexts
|
|
2
|
+
|
|
3
|
+
> `const` **SynchronisedStorageContexts**: `object`
|
|
4
|
+
|
|
5
|
+
The LD Contexts concerning SynchronisedStorage.
|
|
6
|
+
|
|
7
|
+
## Type Declaration
|
|
8
|
+
|
|
9
|
+
### ContextRoot
|
|
10
|
+
|
|
11
|
+
> `readonly` **ContextRoot**: `"https://schema.twindev.org/synchronised-storage"` = `"https://schema.twindev.org/synchronised-storage"`
|
|
12
|
+
|
|
13
|
+
The SynchronisedStorage LD Context.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: SynchronisedStorageTypes
|
|
2
|
+
|
|
3
|
+
> `const` **SynchronisedStorageTypes**: `object`
|
|
4
|
+
|
|
5
|
+
The types of Synchronised Storage data.
|
|
6
|
+
|
|
7
|
+
## Type Declaration
|
|
8
|
+
|
|
9
|
+
### SyncRequest
|
|
10
|
+
|
|
11
|
+
> `readonly` **SyncRequest**: `"SyncRequest"` = `"SyncRequest"`
|
|
12
|
+
|
|
13
|
+
Represents a synchronised storage request.
|
|
14
|
+
|
|
15
|
+
### ChangeSet
|
|
16
|
+
|
|
17
|
+
> `readonly` **ChangeSet**: `"ChangeSet"` = `"ChangeSet"`
|
|
18
|
+
|
|
19
|
+
Represents a synchronised storage change set.
|
package/locales/en.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/synchronised-storage-models",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.14",
|
|
4
4
|
"description": "Models which define the structure of the synchronised storage connectors and services",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
18
|
"@twin.org/entity": "next",
|
|
19
|
+
"@twin.org/identity-models": "next",
|
|
19
20
|
"@twin.org/nameof": "next",
|
|
20
|
-
"@twin.org/standards-w3c-did": "next"
|
|
21
|
+
"@twin.org/standards-w3c-did": "next",
|
|
22
|
+
"@twin.org/standards-w3c-odrl": "next"
|
|
21
23
|
},
|
|
22
24
|
"main": "./dist/cjs/index.cjs",
|
|
23
25
|
"module": "./dist/esm/index.mjs",
|
|
File without changes
|