@twin.org/synchronised-storage-models 0.0.3-next.9 → 0.9.0-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.
- package/README.md +2 -2
- package/dist/es/index.js +0 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/ISyncChange.js.map +1 -1
- package/dist/es/models/ISyncChangeSet.js.map +1 -1
- package/dist/es/models/ISyncRequest.js.map +1 -1
- package/dist/es/models/ISynchronisedEntity.js.map +1 -1
- package/dist/es/models/ISynchronisedEntityCore.js.map +1 -1
- package/dist/es/models/ISynchronisedStorageComponent.js.map +1 -1
- package/dist/es/models/eventBus/ISyncItemRequest.js.map +1 -1
- package/dist/es/models/eventBus/ISyncItemResponse.js.map +1 -1
- package/dist/es/models/eventBus/ISyncReset.js.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/models/ISyncChange.d.ts +2 -2
- package/dist/types/models/ISyncChangeSet.d.ts +5 -5
- package/dist/types/models/ISyncRequest.d.ts +1 -1
- package/dist/types/models/ISynchronisedEntity.d.ts +1 -1
- package/dist/types/models/ISynchronisedEntityCore.d.ts +1 -1
- package/dist/types/models/ISynchronisedStorageComponent.d.ts +1 -1
- package/dist/types/models/eventBus/ISyncItemRequest.d.ts +1 -1
- package/dist/types/models/eventBus/ISyncItemResponse.d.ts +1 -1
- package/dist/types/models/eventBus/ISyncReset.d.ts +1 -1
- package/docs/changelog.md +133 -58
- package/docs/examples.md +61 -1
- package/docs/reference/index.md +0 -2
- package/docs/reference/interfaces/ISyncBatchRequest.md +3 -3
- package/docs/reference/interfaces/ISyncBatchResponse.md +3 -3
- package/docs/reference/interfaces/ISyncChange.md +4 -6
- package/docs/reference/interfaces/ISyncChangeSet.md +8 -13
- package/docs/reference/interfaces/ISyncChangeSetRequest.md +5 -5
- package/docs/reference/interfaces/ISyncDecryptionKeyRequest.md +4 -4
- package/docs/reference/interfaces/ISyncDecryptionKeyResponse.md +1 -1
- package/docs/reference/interfaces/ISyncItemChange.md +4 -4
- package/docs/reference/interfaces/ISyncItemRemove.md +3 -3
- package/docs/reference/interfaces/ISyncItemRequest.md +3 -3
- package/docs/reference/interfaces/ISyncItemResponse.md +5 -5
- package/docs/reference/interfaces/ISyncItemSet.md +2 -2
- package/docs/reference/interfaces/ISyncRegisterStorageKey.md +1 -1
- package/docs/reference/interfaces/ISyncRequest.md +3 -4
- package/docs/reference/interfaces/ISyncReset.md +3 -3
- package/docs/reference/interfaces/ISynchronisedEntity.md +3 -5
- package/docs/reference/interfaces/ISynchronisedEntityCore.md +1 -2
- package/docs/reference/interfaces/ISynchronisedStorageComponent.md +3 -3
- package/docs/reference/variables/SyncChangeOperation.md +2 -2
- package/docs/reference/variables/SyncNodeIdMode.md +3 -3
- package/docs/reference/variables/SynchronisedStorageContexts.md +3 -3
- package/docs/reference/variables/SynchronisedStorageTopics.md +9 -9
- package/docs/reference/variables/SynchronisedStorageTypes.md +2 -2
- package/package.json +8 -10
- package/dist/es/models/synchronisedStorageAssetTypes.js +0 -26
- package/dist/es/models/synchronisedStorageAssetTypes.js.map +0 -1
- package/dist/types/models/synchronisedStorageAssetTypes.d.ts +0 -25
- package/docs/reference/type-aliases/SynchronisedStorageAssetTypes.md +0 -5
- package/docs/reference/variables/SynchronisedStorageAssetTypes.md +0 -31
|
@@ -6,55 +6,55 @@ The topics for synchronised storage event bus notifications.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### RegisterStorageKey
|
|
9
|
+
### RegisterStorageKey {#registerstoragekey}
|
|
10
10
|
|
|
11
11
|
> `readonly` **RegisterStorageKey**: `"synchronised-storage:register-storage-key"` = `"synchronised-storage:register-storage-key"`
|
|
12
12
|
|
|
13
13
|
Register a storage key for the synchronised storage.
|
|
14
14
|
|
|
15
|
-
### LocalItemChange
|
|
15
|
+
### LocalItemChange {#localitemchange}
|
|
16
16
|
|
|
17
17
|
> `readonly` **LocalItemChange**: `"synchronised-storage:local-item-change"` = `"synchronised-storage:local-item-change"`
|
|
18
18
|
|
|
19
19
|
An item was changed in the storage by the local node.
|
|
20
20
|
|
|
21
|
-
### LocalItemRequest
|
|
21
|
+
### LocalItemRequest {#localitemrequest}
|
|
22
22
|
|
|
23
23
|
> `readonly` **LocalItemRequest**: `"synchronised-storage:local-item-request"` = `"synchronised-storage:local-item-request"`
|
|
24
24
|
|
|
25
25
|
A request has been made for a local item.
|
|
26
26
|
|
|
27
|
-
### LocalItemResponse
|
|
27
|
+
### LocalItemResponse {#localitemresponse}
|
|
28
28
|
|
|
29
29
|
> `readonly` **LocalItemResponse**: `"synchronised-storage:local-item-response"` = `"synchronised-storage:local-item-response"`
|
|
30
30
|
|
|
31
31
|
A response to a local item request.
|
|
32
32
|
|
|
33
|
-
### Reset
|
|
33
|
+
### Reset {#reset}
|
|
34
34
|
|
|
35
35
|
> `readonly` **Reset**: `"synchronised-storage:reset"` = `"synchronised-storage:reset"`
|
|
36
36
|
|
|
37
37
|
Reset the storage.
|
|
38
38
|
|
|
39
|
-
### BatchRequest
|
|
39
|
+
### BatchRequest {#batchrequest}
|
|
40
40
|
|
|
41
41
|
> `readonly` **BatchRequest**: `"synchronised-storage:batch-request"` = `"synchronised-storage:batch-request"`
|
|
42
42
|
|
|
43
43
|
A request has been made for a batch.
|
|
44
44
|
|
|
45
|
-
### BatchResponse
|
|
45
|
+
### BatchResponse {#batchresponse}
|
|
46
46
|
|
|
47
47
|
> `readonly` **BatchResponse**: `"synchronised-storage:batch-response"` = `"synchronised-storage:batch-response"`
|
|
48
48
|
|
|
49
49
|
A response to a batch.
|
|
50
50
|
|
|
51
|
-
### RemoteItemSet
|
|
51
|
+
### RemoteItemSet {#remoteitemset}
|
|
52
52
|
|
|
53
53
|
> `readonly` **RemoteItemSet**: `"synchronised-storage:remote-item-set"` = `"synchronised-storage:remote-item-set"`
|
|
54
54
|
|
|
55
55
|
An item was set in the storage by the remote node.
|
|
56
56
|
|
|
57
|
-
### RemoteItemRemove
|
|
57
|
+
### RemoteItemRemove {#remoteitemremove}
|
|
58
58
|
|
|
59
59
|
> `readonly` **RemoteItemRemove**: `"synchronised-storage:remote-item-remove"` = `"synchronised-storage:remote-item-remove"`
|
|
60
60
|
|
|
@@ -6,13 +6,13 @@ The types of Synchronised Storage data.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### SyncRequest
|
|
9
|
+
### SyncRequest {#syncrequest}
|
|
10
10
|
|
|
11
11
|
> `readonly` **SyncRequest**: `"SyncRequest"` = `"SyncRequest"`
|
|
12
12
|
|
|
13
13
|
Represents a synchronised storage request.
|
|
14
14
|
|
|
15
|
-
### ChangeSet
|
|
15
|
+
### ChangeSet {#changeset}
|
|
16
16
|
|
|
17
17
|
> `readonly` **ChangeSet**: `"ChangeSet"` = `"ChangeSet"`
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/synchronised-storage-models",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.9.0-next.1",
|
|
4
|
+
"description": "Shared models, constants, and schemas for synchronised storage messages and contracts.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/iotaledger/twin-synchronised-storage.git",
|
|
8
8
|
"directory": "packages/synchronised-storage-models"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "next",
|
|
18
|
-
"@twin.org/entity": "next",
|
|
19
|
-
"@twin.org/identity-models": "next",
|
|
20
|
-
"@twin.org/nameof": "next"
|
|
21
|
-
"@twin.org/standards-w3c-did": "next",
|
|
22
|
-
"@twin.org/standards-w3c-odrl": "next"
|
|
17
|
+
"@twin.org/core": "0.9.0-next.1",
|
|
18
|
+
"@twin.org/entity": "0.9.0-next.1",
|
|
19
|
+
"@twin.org/identity-models": "0.9.0-next.1",
|
|
20
|
+
"@twin.org/nameof": "0.9.0-next.1"
|
|
23
21
|
},
|
|
24
22
|
"main": "./dist/es/index.js",
|
|
25
23
|
"types": "./dist/types/index.d.ts",
|
|
@@ -49,7 +47,7 @@
|
|
|
49
47
|
"schemas"
|
|
50
48
|
],
|
|
51
49
|
"bugs": {
|
|
52
|
-
"url": "git+https://github.com/
|
|
50
|
+
"url": "git+https://github.com/iotaledger/twin-synchronised-storage/issues"
|
|
53
51
|
},
|
|
54
52
|
"homepage": "https://twindev.org"
|
|
55
53
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 IOTA Stiftung.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
-
import { ActionType } from "@twin.org/standards-w3c-odrl";
|
|
4
|
-
/**
|
|
5
|
-
* The ODRL asset types for SynchronisedStorage.
|
|
6
|
-
*/
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8
|
-
export const SynchronisedStorageAssetTypes = {
|
|
9
|
-
/**
|
|
10
|
-
* Decryption Key.
|
|
11
|
-
*/
|
|
12
|
-
DecryptionKey: "decryption-key",
|
|
13
|
-
/**
|
|
14
|
-
* Decryption Key Actions.
|
|
15
|
-
*/
|
|
16
|
-
DecryptionKeyActions: [ActionType.Read],
|
|
17
|
-
/**
|
|
18
|
-
* Change Set.
|
|
19
|
-
*/
|
|
20
|
-
ChangeSet: "change-set",
|
|
21
|
-
/**
|
|
22
|
-
* Change Set Actions.
|
|
23
|
-
*/
|
|
24
|
-
ChangeSetActions: [ActionType.Write]
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=synchronisedStorageAssetTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"synchronisedStorageAssetTypes.js","sourceRoot":"","sources":["../../../src/models/synchronisedStorageAssetTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC5C;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,oBAAoB,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;IAEvC;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,gBAAgB,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;CAC3B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ActionType } from \"@twin.org/standards-w3c-odrl\";\n\n/**\n * The ODRL asset types for SynchronisedStorage.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const SynchronisedStorageAssetTypes = {\n\t/**\n\t * Decryption Key.\n\t */\n\tDecryptionKey: \"decryption-key\",\n\n\t/**\n\t * Decryption Key Actions.\n\t */\n\tDecryptionKeyActions: [ActionType.Read],\n\n\t/**\n\t * Change Set.\n\t */\n\tChangeSet: \"change-set\",\n\n\t/**\n\t * Change Set Actions.\n\t */\n\tChangeSetActions: [ActionType.Write]\n} as const;\n\n/**\n * The ODRL asset types for SynchronisedStorage.\n */\nexport type SynchronisedStorageAssetTypes =\n\t(typeof SynchronisedStorageAssetTypes)[keyof typeof SynchronisedStorageAssetTypes];\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
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];
|
|
@@ -1,5 +0,0 @@
|
|
|
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.
|
|
@@ -1,31 +0,0 @@
|
|
|
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.
|