core-3nweb-client-lib 0.26.1 → 0.27.3
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/build/api-defs/asmail.d.ts +1 -1
- package/build/api-defs/files.d.ts +281 -75
- package/build/core/app-files.js +7 -7
- package/build/core/asmail/config/common.js +2 -2
- package/build/core/asmail/config/index.js +2 -2
- package/build/core/asmail/config/published-intro-key.js +1 -1
- package/build/core/asmail/delivery/common.js +7 -7
- package/build/core/asmail/delivery/index.js +5 -5
- package/build/core/asmail/delivery/msg.js +4 -4
- package/build/core/asmail/delivery/per-recipient-wip.js +1 -1
- package/build/core/asmail/inbox/attachments/fs.d.ts +2 -1
- package/build/core/asmail/inbox/attachments/fs.js +9 -4
- package/build/core/asmail/inbox/cached-msgs.js +1 -1
- package/build/core/asmail/inbox/inbox-events.js +4 -4
- package/build/core/asmail/inbox/index.js +10 -10
- package/build/core/asmail/inbox/msg-downloader.js +1 -1
- package/build/core/asmail/inbox/msg-indexing.js +1 -1
- package/build/core/asmail/inbox/msg-on-disk.js +5 -5
- package/build/core/asmail/index.d.ts +3 -3
- package/build/core/asmail/index.js +13 -8
- package/build/core/asmail/key-verification.js +5 -5
- package/build/core/asmail/keyring/common.js +7 -6
- package/build/core/asmail/keyring/correspondent-keys.js +8 -7
- package/build/core/asmail/keyring/id-to-email-map.js +2 -1
- package/build/core/asmail/keyring/index.d.ts +7 -8
- package/build/core/asmail/keyring/index.js +15 -14
- package/build/core/asmail/keyring/keyring-storage.js +2 -1
- package/build/core/asmail/msg/opener.js +3 -3
- package/build/core/asmail/msg/packer.js +13 -13
- package/build/core/asmail/sending-params/own-params.js +2 -2
- package/build/core/asmail/sending-params/params-from-others.js +1 -1
- package/build/core/id-manager/index.d.ts +43 -0
- package/build/core/{id-manager.js → id-manager/index.js} +36 -114
- package/build/core/id-manager/key-storage.d.ts +21 -0
- package/build/core/id-manager/key-storage.js +96 -0
- package/build/core/index.d.ts +2 -1
- package/build/core/index.js +31 -33
- package/build/core/sign-in.d.ts +1 -2
- package/build/core/sign-in.js +8 -17
- package/build/core/sign-up.d.ts +2 -0
- package/build/core/sign-up.js +11 -10
- package/build/core/storage/common/json-saving.js +2 -2
- package/build/core/storage/common/obj-info-file.d.ts +12 -4
- package/build/core/storage/common/obj-info-file.js +66 -34
- package/build/core/storage/common/utils.d.ts +2 -0
- package/build/core/storage/common/utils.js +32 -0
- package/build/core/storage/index.d.ts +5 -17
- package/build/core/storage/index.js +78 -119
- package/build/core/storage/local/obj-files-gc.d.ts +2 -0
- package/build/core/storage/local/obj-files-gc.js +49 -37
- package/build/core/storage/local/obj-files.d.ts +4 -7
- package/build/core/storage/local/obj-files.js +7 -10
- package/build/core/storage/local/obj-status.d.ts +12 -6
- package/build/core/storage/local/obj-status.js +24 -9
- package/build/core/storage/local/storage.d.ts +10 -7
- package/build/core/storage/local/storage.js +29 -18
- package/build/core/storage/synced/downloader.js +1 -1
- package/build/core/storage/synced/obj-files-gc.d.ts +1 -0
- package/build/core/storage/synced/obj-files-gc.js +76 -39
- package/build/core/storage/synced/obj-files.d.ts +50 -36
- package/build/core/storage/synced/obj-files.js +201 -162
- package/build/core/storage/synced/obj-status.d.ts +99 -86
- package/build/core/storage/synced/obj-status.js +520 -251
- package/build/core/storage/synced/remote-events.d.ts +11 -12
- package/build/core/storage/synced/remote-events.js +73 -56
- package/build/core/storage/synced/storage.d.ts +24 -10
- package/build/core/storage/synced/storage.js +147 -47
- package/build/core/storage/synced/upload-header-file.d.ts +4 -0
- package/build/core/storage/synced/upload-header-file.js +64 -0
- package/build/core/storage/synced/upsyncer.d.ts +12 -7
- package/build/core/storage/synced/upsyncer.js +210 -280
- package/build/core/storage/system-folders/apps-data.d.ts +16 -0
- package/build/core/storage/system-folders/apps-data.js +110 -0
- package/build/core/storage/system-folders/index.d.ts +18 -0
- package/build/core/storage/system-folders/index.js +77 -0
- package/build/core-ipc/common-caps.js +3 -3
- package/build/core-ipc/generic.js +8 -8
- package/build/core-ipc/startup-caps.js +2 -2
- package/build/cryptors.js +6 -2
- package/build/ipc-via-protobuf/asmail-cap.js +58 -57
- package/build/ipc-via-protobuf/bytes.js +16 -17
- package/build/ipc-via-protobuf/connector-clients-side.d.ts +1 -0
- package/build/ipc-via-protobuf/connector-clients-side.js +14 -15
- package/build/ipc-via-protobuf/connector-services-side.js +10 -10
- package/build/ipc-via-protobuf/connector.js +4 -4
- package/build/ipc-via-protobuf/file.d.ts +48 -12
- package/build/ipc-via-protobuf/file.js +474 -126
- package/build/ipc-via-protobuf/fs.d.ts +8 -0
- package/build/ipc-via-protobuf/fs.js +577 -142
- package/build/ipc-via-protobuf/log-cap.js +2 -2
- package/build/ipc-via-protobuf/mailerid.js +3 -3
- package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -0
- package/build/ipc-via-protobuf/protobuf-msg.js +11 -7
- package/build/ipc-via-protobuf/startup-cap.js +21 -21
- package/build/ipc-via-protobuf/storage-cap.js +12 -12
- package/build/ipc.js +7 -2
- package/build/lib-client/3nstorage/exceptions.d.ts +16 -1
- package/build/lib-client/3nstorage/exceptions.js +21 -3
- package/build/lib-client/3nstorage/service.d.ts +21 -3
- package/build/lib-client/3nstorage/service.js +128 -46
- package/build/lib-client/3nstorage/util/file-based-json.d.ts +2 -1
- package/build/lib-client/3nstorage/util/file-based-json.js +3 -2
- package/build/lib-client/3nstorage/util/for-arrays.d.ts +1 -0
- package/build/lib-client/3nstorage/util/for-arrays.js +32 -0
- package/build/lib-client/3nstorage/xsp-fs/attrs.js +17 -17
- package/build/lib-client/3nstorage/xsp-fs/common.d.ts +44 -19
- package/build/lib-client/3nstorage/xsp-fs/common.js +30 -19
- package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +1 -0
- package/build/lib-client/3nstorage/xsp-fs/file-node.js +17 -13
- package/build/lib-client/3nstorage/xsp-fs/file.d.ts +31 -6
- package/build/lib-client/3nstorage/xsp-fs/file.js +73 -25
- package/build/lib-client/3nstorage/xsp-fs/folder-node-serialization.js +4 -4
- package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +32 -13
- package/build/lib-client/3nstorage/xsp-fs/folder-node.js +752 -192
- package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +35 -4
- package/build/lib-client/3nstorage/xsp-fs/fs.js +236 -119
- package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +1 -0
- package/build/lib-client/3nstorage/xsp-fs/link-node.js +7 -2
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +30 -29
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +232 -127
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +1 -1
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +17 -18
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +3 -3
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +53 -53
- package/build/lib-client/3nweb-signup.js +4 -4
- package/build/lib-client/asmail/recipient.js +15 -15
- package/build/lib-client/asmail/sender.js +22 -22
- package/build/lib-client/asmail/service-config.js +3 -3
- package/build/lib-client/cryptor/cryptor-in-worker.js +18 -16
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.js +4 -2
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-client/cryptor/in-proc-js.js +1 -1
- package/build/lib-client/cryptor/in-proc-wasm.js +6 -6
- package/build/lib-client/cryptor/worker-js.js +2 -2
- package/build/lib-client/cryptor/worker-wasm.js +2 -2
- package/build/lib-client/files-select.js +1 -1
- package/build/lib-client/files.d.ts +1 -1
- package/build/lib-client/files.js +71 -6
- package/build/lib-client/fs-collection.js +1 -1
- package/build/lib-client/fs-sync-utils.d.ts +5 -0
- package/build/lib-client/fs-sync-utils.js +61 -0
- package/build/lib-client/fs-view.d.ts +14 -0
- package/build/lib-client/fs-view.js +33 -0
- package/build/lib-client/key-derivation.js +1 -1
- package/build/lib-client/local-files/dev-file-sink.js +9 -9
- package/build/lib-client/local-files/dev-file-src.js +2 -2
- package/build/lib-client/local-files/device-fs.d.ts +1 -1
- package/build/lib-client/local-files/device-fs.js +56 -54
- package/build/lib-client/logging/log-to-file.d.ts +1 -1
- package/build/lib-client/logging/log-to-file.js +7 -7
- package/build/lib-client/mailer-id/login.js +7 -7
- package/build/lib-client/mailer-id/provisioner.js +12 -12
- package/build/lib-client/objs-on-disk/file-writing-proc.js +3 -3
- package/build/lib-client/objs-on-disk/obj-folders.js +31 -31
- package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +13 -2
- package/build/lib-client/objs-on-disk/obj-on-disk.js +24 -9
- package/build/lib-client/request-utils.d.ts +1 -0
- package/build/lib-client/request-utils.js +13 -13
- package/build/lib-client/server-events.d.ts +3 -3
- package/build/lib-client/server-events.js +9 -8
- package/build/lib-client/service-locator.js +10 -10
- package/build/lib-client/user-with-mid-session.d.ts +2 -1
- package/build/lib-client/user-with-mid-session.js +14 -8
- package/build/lib-client/user-with-pkl-session.js +25 -25
- package/build/lib-client/ws-utils.js +2 -2
- package/build/lib-common/async-cryptor-wrap.js +4 -4
- package/build/lib-common/async-fs-node.d.ts +5 -3
- package/build/lib-common/async-fs-node.js +17 -17
- package/build/lib-common/byte-streaming/pipe.js +1 -1
- package/build/lib-common/byte-streaming/wrapping.js +13 -13
- package/build/lib-common/canonical-address.js +1 -1
- package/build/lib-common/exceptions/error.d.ts +1 -0
- package/build/lib-common/exceptions/error.js +7 -6
- package/build/lib-common/exceptions/file.d.ts +4 -2
- package/build/lib-common/exceptions/file.js +24 -54
- package/build/lib-common/ipc/generic-ipc.js +5 -4
- package/build/lib-common/ipc/ws-ipc.js +2 -2
- package/build/lib-common/mid-sigs-NaCl-Ed.js +14 -14
- package/build/lib-common/objs-on-disk/file-layout.d.ts +19 -0
- package/build/lib-common/objs-on-disk/file-layout.js +130 -12
- package/build/lib-common/objs-on-disk/obj-file.d.ts +13 -2
- package/build/lib-common/objs-on-disk/obj-file.js +96 -35
- package/build/lib-common/objs-on-disk/utils.d.ts +1 -0
- package/build/lib-common/objs-on-disk/utils.js +3 -3
- package/build/lib-common/objs-on-disk/v1-obj-file-format.js +14 -14
- package/build/lib-common/processes/labelled-exec-pools.d.ts +1 -1
- package/build/lib-common/processes/labelled-exec-pools.js +1 -1
- package/build/lib-common/processes/pressure.js +2 -2
- package/build/lib-common/processes/synced.js +1 -1
- package/build/lib-common/processes/timeout.js +2 -2
- package/build/lib-common/random-node.js +7 -7
- package/build/lib-common/service-api/3nstorage/owner.d.ts +101 -42
- package/build/lib-common/service-api/3nstorage/owner.js +83 -40
- package/build/lib-common/service-api/asmail/delivery.js +2 -2
- package/build/lib-common/service-api/asmail/retrieval.js +1 -1
- package/build/lib-common/timed-cache.d.ts +1 -0
- package/build/lib-common/timed-non-weak-cache.d.ts +1 -0
- package/build/lib-common/timed-non-weak-cache.js +11 -0
- package/build/lib-common/utils-for-observables.js +4 -4
- package/build/lib-common/weak-cache.d.ts +1 -0
- package/build/lib-common/weak-cache.js +12 -1
- package/build/lib-index.d.ts +2 -1
- package/build/lib-index.js +10 -7
- package/build/protos/asmail.proto.js +12955 -7496
- package/build/protos/file.proto.js +4867 -2744
- package/build/protos/fs.proto.js +9227 -3768
- package/package.json +7 -5
- package/protos/file.proto +91 -19
- package/protos/fs.proto +107 -8
- package/build/core/id-manager.d.ts +0 -46
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core-3nweb-client-lib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.3",
|
|
4
4
|
"description": "3NWeb client core library, embeddable into different environments",
|
|
5
5
|
"main": "build/lib-index.js",
|
|
6
6
|
"types": "build/lib-index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "bash packing/protos-to-node-module.sh && tsc -p ts-code && bash packing/copy-api.sh && bash packing/build-wasm-cryptor.sh",
|
|
9
|
+
"build-only-ts": "tsc -p ts-code",
|
|
9
10
|
"test": "node build/tests/jasmine.js"
|
|
10
11
|
},
|
|
11
12
|
"repository": {
|
|
@@ -30,15 +31,16 @@
|
|
|
30
31
|
"protobufjs": "^6.11.3",
|
|
31
32
|
"punycode": "^2.1.1",
|
|
32
33
|
"rxjs": "^6.5.2",
|
|
34
|
+
"tsuml2": "^0.6.1",
|
|
33
35
|
"ws": "^7.4.6",
|
|
34
36
|
"xsp-files": "^4.0.0"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
39
|
"@types/jasmine": "^3.9.1",
|
|
38
|
-
"@types/node": "^
|
|
39
|
-
"@types/ws": "^4.
|
|
40
|
+
"@types/node": "^16.11.7",
|
|
41
|
+
"@types/ws": "^7.4.7",
|
|
40
42
|
"jasmine": "^3.9.0",
|
|
41
|
-
"spec-3nweb-server": "^1.
|
|
42
|
-
"typescript": "^
|
|
43
|
+
"spec-3nweb-server": "^1.6.3",
|
|
44
|
+
"typescript": "^4.7.4"
|
|
43
45
|
}
|
|
44
46
|
}
|
package/protos/file.proto
CHANGED
|
@@ -13,6 +13,22 @@ message File {
|
|
|
13
13
|
// impl is a reference to object with methods of either
|
|
14
14
|
// ReadonlyFile or WritableFile
|
|
15
15
|
common.ObjectReference impl = 5;
|
|
16
|
+
bool is_synced = 6;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
message SyncStatusMsg {
|
|
21
|
+
string state = 1;
|
|
22
|
+
SyncVersionsBranchMsg local = 2;
|
|
23
|
+
SyncVersionsBranchMsg synced = 3;
|
|
24
|
+
SyncVersionsBranchMsg remote = 4;
|
|
25
|
+
common.BooleanValue exists_in_synced_parent = 5;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message SyncVersionsBranchMsg {
|
|
29
|
+
common.UInt64Value latest = 1;
|
|
30
|
+
repeated uint64 archived = 2;
|
|
31
|
+
common.BooleanValue is_archived = 3;
|
|
16
32
|
}
|
|
17
33
|
|
|
18
34
|
|
|
@@ -22,14 +38,6 @@ message File {
|
|
|
22
38
|
// Request body is empty
|
|
23
39
|
// Reply body is StatsMsg
|
|
24
40
|
message StatsMsg {
|
|
25
|
-
message SyncInfo {
|
|
26
|
-
string state = 1;
|
|
27
|
-
common.UInt64Value latest = 2;
|
|
28
|
-
common.UInt64Value remote = 3;
|
|
29
|
-
repeated uint64 conflicting_remote = 4;
|
|
30
|
-
common.BooleanValue deleted_on_remote = 5;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
41
|
common.BooleanValue is_file = 1;
|
|
34
42
|
common.BooleanValue is_folder = 2;
|
|
35
43
|
common.BooleanValue is_link = 3;
|
|
@@ -38,7 +46,7 @@ message StatsMsg {
|
|
|
38
46
|
common.UInt64Value mtime = 6;
|
|
39
47
|
common.UInt64Value ctime = 7;
|
|
40
48
|
common.UInt64Value version = 8;
|
|
41
|
-
|
|
49
|
+
SyncStatusMsg sync = 9;
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
// --- ReadonlyFile.getXAttr ---
|
|
@@ -85,10 +93,10 @@ message ReadBytesReplyBody {
|
|
|
85
93
|
message FileEventMsg {
|
|
86
94
|
string type = 1;
|
|
87
95
|
string path = 2;
|
|
88
|
-
common.
|
|
96
|
+
common.StringValue src = 3;
|
|
89
97
|
common.UInt64Value new_version = 4;
|
|
90
|
-
common.UInt64Value
|
|
91
|
-
common.UInt64Value
|
|
98
|
+
common.UInt64Value removed_arch_ver = 5;
|
|
99
|
+
common.UInt64Value archived_version = 6;
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
|
|
@@ -139,6 +147,13 @@ message VersionedGetByteSourceReplyBody {
|
|
|
139
147
|
common.ObjectReference src = 2;
|
|
140
148
|
}
|
|
141
149
|
|
|
150
|
+
// --- ReadonlyFileVersionedAPI.listVersions ---
|
|
151
|
+
// Request body is empty
|
|
152
|
+
message ListVersionsReplyBody {
|
|
153
|
+
common.UInt64Value current = 1;
|
|
154
|
+
repeated uint64 archived = 2;
|
|
155
|
+
}
|
|
156
|
+
|
|
142
157
|
|
|
143
158
|
// ==== WritableFile referable as impl object (extends ReadonlyFile) ====
|
|
144
159
|
|
|
@@ -148,14 +163,15 @@ message UpdateXAttrsRequestBody {
|
|
|
148
163
|
XAttrsChanges changes = 1;
|
|
149
164
|
}
|
|
150
165
|
|
|
166
|
+
message NameAndXAttrValue {
|
|
167
|
+
string xa_name = 1;
|
|
168
|
+
common.StringValue str = 2;
|
|
169
|
+
common.StringValue json = 3;
|
|
170
|
+
common.BytesValue bytes = 4;
|
|
171
|
+
}
|
|
172
|
+
|
|
151
173
|
message XAttrsChanges {
|
|
152
|
-
|
|
153
|
-
string xa_name = 1;
|
|
154
|
-
common.StringValue str = 2;
|
|
155
|
-
common.StringValue json = 3;
|
|
156
|
-
common.BytesValue bytes = 4;
|
|
157
|
-
}
|
|
158
|
-
repeated NameAndAttrValue set = 1;
|
|
174
|
+
repeated NameAndXAttrValue set = 1;
|
|
159
175
|
repeated string remove = 2;
|
|
160
176
|
}
|
|
161
177
|
|
|
@@ -223,3 +239,59 @@ message VersionedGetByteSinkReplyBody {
|
|
|
223
239
|
// --- WritableFileVersionedAPI.copy ---
|
|
224
240
|
// Request body is CopyRequestBody
|
|
225
241
|
// Reply body is common.UInt64Value
|
|
242
|
+
|
|
243
|
+
// --- WritableFileVersionedAPI.archiveCurrent ---
|
|
244
|
+
// Reply body is common.UInt64Value
|
|
245
|
+
message ArchiveCurrentRequestBody {
|
|
246
|
+
common.UInt64Value version = 1;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
// ==== ReadonlyFileSyncAPI referable object ====
|
|
251
|
+
|
|
252
|
+
// --- ReadonlyFileSyncAPI.status ---
|
|
253
|
+
// Request body is empty
|
|
254
|
+
// Reply body is SyncStatusMsg
|
|
255
|
+
|
|
256
|
+
// --- ReadonlyFileSyncAPI.updateStatusInfo ---
|
|
257
|
+
// Request body is PathOnlyRequestBody
|
|
258
|
+
// Reply body is SyncState
|
|
259
|
+
|
|
260
|
+
// --- ReadonlyFileSyncAPI.isRemoteVersionOnDisk ---
|
|
261
|
+
message FileSyncIsOnDiskRequestBody {
|
|
262
|
+
uint64 version = 1;
|
|
263
|
+
}
|
|
264
|
+
message FileSyncIsOnDiskReplyBody {
|
|
265
|
+
string status = 1;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// --- ReadonlyFileSyncAPI.download ---
|
|
269
|
+
// Reply has only status and body is empty
|
|
270
|
+
message FileSyncDownloadRequestBody {
|
|
271
|
+
uint64 version = 1;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// --- ReadonlyFileSyncAPI.adoptRemote ---
|
|
275
|
+
// Reply has only status and body is empty
|
|
276
|
+
message AdoptRemoteRequestBody {
|
|
277
|
+
OptionsToAdopteRemote opts = 1;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
message OptionsToAdopteRemote {
|
|
281
|
+
common.BooleanValue drop_local_ver = 1;
|
|
282
|
+
common.UInt64Value remote_version = 2;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
// ==== WritableFileSyncAPI referable object ====
|
|
287
|
+
|
|
288
|
+
// --- WritableFileSyncAPI.upload ---
|
|
289
|
+
// Reply has only status and body is empty
|
|
290
|
+
message FileSyncUploadRequestBody {
|
|
291
|
+
OptionsToUploadLocal opts = 1;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
message OptionsToUploadLocal {
|
|
295
|
+
common.UInt64Value local_version = 1;
|
|
296
|
+
common.UInt64Value upload_version = 2;
|
|
297
|
+
}
|
package/protos/fs.proto
CHANGED
|
@@ -14,6 +14,7 @@ message FS {
|
|
|
14
14
|
// impl is a reference to object with methods of either
|
|
15
15
|
// ReadonlyFS or WritableFS
|
|
16
16
|
common.ObjectReference impl = 5;
|
|
17
|
+
bool is_synced = 6;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
|
|
@@ -78,15 +79,15 @@ message SymLinkTargetReplyBody {
|
|
|
78
79
|
message FSEventMsg {
|
|
79
80
|
string type = 1;
|
|
80
81
|
string path = 2;
|
|
81
|
-
common.
|
|
82
|
+
common.StringValue src = 3;
|
|
82
83
|
common.UInt64Value new_version = 4;
|
|
83
|
-
common.StringValue name =
|
|
84
|
-
common.StringValue old_name =
|
|
85
|
-
common.StringValue new_name =
|
|
86
|
-
ListingEntryMsg entry =
|
|
87
|
-
common.UInt64Value
|
|
88
|
-
common.UInt64Value
|
|
89
|
-
common.UInt64Value
|
|
84
|
+
common.StringValue name = 5;
|
|
85
|
+
common.StringValue old_name = 6;
|
|
86
|
+
common.StringValue new_name = 7;
|
|
87
|
+
ListingEntryMsg entry = 8;
|
|
88
|
+
common.UInt64Value move_label = 9;
|
|
89
|
+
common.UInt64Value removed_arch_ver = 10;
|
|
90
|
+
common.UInt64Value archived_version = 11;
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
// --- ReadonlyFS.watchFile ---
|
|
@@ -96,6 +97,10 @@ message FSEventMsg {
|
|
|
96
97
|
// --- ReadonlyFS.watchTree ---
|
|
97
98
|
// Its an observable call, and initial request is PathOnlyRequestBody
|
|
98
99
|
// Observer expects FSEventMsg in next.
|
|
100
|
+
message WatchTreeRequestBody {
|
|
101
|
+
string path = 1;
|
|
102
|
+
common.UInt32Value depth = 2;
|
|
103
|
+
}
|
|
99
104
|
|
|
100
105
|
// --- ReadonlyFS.close ---
|
|
101
106
|
// Request body is empty
|
|
@@ -256,6 +261,10 @@ message VersionedListFolderReplyBody {
|
|
|
256
261
|
// Request body is PathOnlyRequestBody
|
|
257
262
|
// Reply body is file.VersionedGetByteSourceReplyBody
|
|
258
263
|
|
|
264
|
+
// --- ReadonlyFSVersionedAPI.getByteSource ---
|
|
265
|
+
// Request body is PathOnlyRequestBody
|
|
266
|
+
// Reply body is file.ListVersionsReplyBody
|
|
267
|
+
|
|
259
268
|
|
|
260
269
|
// ==== WritableFS referable as impl object (extends ReadonlyFS) ====
|
|
261
270
|
|
|
@@ -430,3 +439,93 @@ message VersionedGetByteSinkRequestBody {
|
|
|
430
439
|
VersionedFileFlags flags = 2;
|
|
431
440
|
}
|
|
432
441
|
|
|
442
|
+
// --- WritableFSVersionedAPI.archiveCurrent ---
|
|
443
|
+
// Reply body is common.UInt64Value
|
|
444
|
+
message ArchiveCurrentRequestBody {
|
|
445
|
+
string path = 1;
|
|
446
|
+
common.UInt64Value version = 2;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
// ==== ReadonlyFSSyncAPI referable object ====
|
|
451
|
+
|
|
452
|
+
// --- ReadonlyFSSyncAPI.status ---
|
|
453
|
+
// Request body is PathOnlyRequestBody
|
|
454
|
+
// Reply body is file.SyncState
|
|
455
|
+
|
|
456
|
+
// --- ReadonlyFSSyncAPI.updateStatusInfo ---
|
|
457
|
+
// Request body is PathOnlyRequestBody
|
|
458
|
+
// Reply body is file.SyncState
|
|
459
|
+
|
|
460
|
+
// --- ReadonlyFSSyncAPI.isRemoteVersionOnDisk ---
|
|
461
|
+
message FSSyncIsOnDiskRequestBody {
|
|
462
|
+
string path = 1;
|
|
463
|
+
uint64 version = 2;
|
|
464
|
+
}
|
|
465
|
+
message FSSyncIsOnDiskReplyBody {
|
|
466
|
+
string status = 1;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// --- ReadonlyFSSyncAPI.download ---
|
|
470
|
+
// Reply has only status and body is empty
|
|
471
|
+
message FSSyncDownloadRequestBody {
|
|
472
|
+
string path = 1;
|
|
473
|
+
uint64 version = 2;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// --- ReadonlyFSSyncAPI.adoptRemote ---
|
|
477
|
+
// Reply has only status and body is empty
|
|
478
|
+
message AdoptRemoteRequestBody {
|
|
479
|
+
string path = 1;
|
|
480
|
+
file.OptionsToAdopteRemote opts = 2;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// --- ReadonlyFSSyncAPI.diffCurrentAndRemote ---
|
|
484
|
+
message DiffCurrentAndRemoteRequestBody {
|
|
485
|
+
string path = 1;
|
|
486
|
+
common.UInt64Value remote_version = 2;
|
|
487
|
+
}
|
|
488
|
+
message DiffCurrentAndRemoteReplyBody {
|
|
489
|
+
FolderDiff diff = 1;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
message FolderDiff {
|
|
493
|
+
message TimeStamps {
|
|
494
|
+
uint64 current = 1;
|
|
495
|
+
common.UInt64Value remote = 2;
|
|
496
|
+
}
|
|
497
|
+
message XAttrs {
|
|
498
|
+
repeated file.NameAndXAttrValue in_current = 1;
|
|
499
|
+
repeated file.NameAndXAttrValue in_remote = 2;
|
|
500
|
+
repeated string name_overlaps = 3;
|
|
501
|
+
}
|
|
502
|
+
uint64 current_version = 1;
|
|
503
|
+
common.UInt64Value remote_version = 2;
|
|
504
|
+
repeated ListingEntryMsg in_current = 3;
|
|
505
|
+
repeated ListingEntryMsg in_remote = 4;
|
|
506
|
+
repeated string name_overlaps = 5;
|
|
507
|
+
TimeStamps ctime = 6;
|
|
508
|
+
TimeStamps mtime = 7;
|
|
509
|
+
XAttrs xattrs = 8;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
// ==== WritableFSSyncAPI referable object ====
|
|
514
|
+
|
|
515
|
+
// --- WritableFSSyncAPI.upload ---
|
|
516
|
+
// Reply has only status and body is empty
|
|
517
|
+
message FSSyncUploadRequestBody {
|
|
518
|
+
string path = 1;
|
|
519
|
+
file.OptionsToUploadLocal opts = 2;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// --- WritableFSSyncAPI.adoptRemoteFolderItem ---
|
|
523
|
+
message AdoptRemoteFolderItemRequestBody {
|
|
524
|
+
message Options {
|
|
525
|
+
common.UInt64Value local_version = 1;
|
|
526
|
+
common.UInt64Value upload_version = 2;
|
|
527
|
+
}
|
|
528
|
+
string path = 1;
|
|
529
|
+
string item_name = 2;
|
|
530
|
+
Options opts = 3;
|
|
531
|
+
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { user as mid } from '../lib-common/mid-sigs-NaCl-Ed';
|
|
2
|
-
import { JsonKey } from '../lib-common/jwkeys';
|
|
3
|
-
import { GenerateKey } from './sign-in';
|
|
4
|
-
import { LogError, LogWarning } from '../lib-client/logging/log-to-file';
|
|
5
|
-
import { NetClient } from '../lib-client/request-utils';
|
|
6
|
-
import { ServiceLocator } from '../lib-client/service-locator';
|
|
7
|
-
declare type WritableFS = web3n.files.WritableFS;
|
|
8
|
-
/**
|
|
9
|
-
* This function completes provisioning process, returning a promise, resolvable
|
|
10
|
-
* to either true, when all is done, or to false, when challenge reply is not
|
|
11
|
-
* accepted by the server.
|
|
12
|
-
*/
|
|
13
|
-
export interface CompleteProvisioning {
|
|
14
|
-
keyParams: any;
|
|
15
|
-
complete(defaultSKey: Uint8Array): Promise<boolean>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* This returns a promise, resolvable to mailerId signer.
|
|
19
|
-
*/
|
|
20
|
-
export declare type GetSigner = () => Promise<mid.MailerIdSigner>;
|
|
21
|
-
export declare class IdManager {
|
|
22
|
-
private makeNet;
|
|
23
|
-
private midServiceFor;
|
|
24
|
-
private readonly logError;
|
|
25
|
-
private readonly logWarning;
|
|
26
|
-
private address;
|
|
27
|
-
private signer;
|
|
28
|
-
private localFS;
|
|
29
|
-
private syncedFS;
|
|
30
|
-
private provisioningProc;
|
|
31
|
-
private constructor();
|
|
32
|
-
static initInOneStepWithoutStore(address: string, midLoginKey: GenerateKey | Uint8Array, resolver: ServiceLocator, makeNet: () => NetClient, logError: LogError, logWarning: LogWarning): Promise<IdManager | undefined>;
|
|
33
|
-
static initWithoutStore(address: string, resolver: ServiceLocator, makeNet: () => NetClient, logError: LogError, logWarning: LogWarning): Promise<((midLoginKey: GenerateKey | Uint8Array) => Promise<IdManager | undefined>) | undefined>;
|
|
34
|
-
static initFromLocalStore(address: string, localFS: WritableFS, resolver: ServiceLocator, makeNet: () => NetClient, logError: LogError, logWarning: LogWarning): Promise<IdManager | undefined>;
|
|
35
|
-
private ensureLocalCacheOfKeys;
|
|
36
|
-
private getSavedKey;
|
|
37
|
-
setStorages(localFS: WritableFS | undefined, syncedFS: WritableFS, keysToSave?: JsonKey[]): Promise<void>;
|
|
38
|
-
private provisionWithGivenKey;
|
|
39
|
-
private provisionUsingSavedKey;
|
|
40
|
-
getId(): string;
|
|
41
|
-
getSigner: GetSigner;
|
|
42
|
-
isProvisionedAndValid(): boolean;
|
|
43
|
-
makeMailerIdCAP(): Service;
|
|
44
|
-
}
|
|
45
|
-
declare type Service = web3n.mailerid.Service;
|
|
46
|
-
export {};
|