core-3nweb-client-lib 0.30.2 → 0.30.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api-defs/asmail.d.ts +9 -6
- package/build/core/app-files.d.ts +4 -4
- package/build/core/app-files.js +2 -2
- package/build/core/asmail/asmail-cap-ipc.d.ts +1 -1
- package/build/core/asmail/asmail-cap-ipc.js +2 -3
- package/build/core/asmail/config/common.d.ts +2 -2
- package/build/core/asmail/config/index.d.ts +1 -1
- package/build/core/asmail/config/invitations-anon.d.ts +1 -1
- package/build/core/asmail/config/invitations-anon.js +1 -2
- package/build/core/asmail/config/published-intro-key.d.ts +2 -2
- package/build/core/asmail/config/published-intro-key.js +1 -2
- package/build/core/asmail/delivery/common.d.ts +6 -6
- package/build/core/asmail/delivery/common.js +3 -3
- package/build/core/asmail/delivery/index.d.ts +4 -4
- package/build/core/asmail/delivery/msg.d.ts +4 -4
- package/build/core/asmail/delivery/msg.js +3 -3
- package/build/core/asmail/inbox/attachments/fs.d.ts +1 -1
- package/build/core/asmail/inbox/attachments/fs.js +1 -2
- package/build/core/asmail/inbox/inbox-events.d.ts +4 -3
- package/build/core/asmail/inbox/inbox-events.js +1 -1
- package/build/core/asmail/inbox/index.d.ts +2 -2
- package/build/core/asmail/inbox/index.js +7 -4
- package/build/core/asmail/inbox/msg-indexing/index.d.ts +2 -2
- package/build/core/asmail/inbox/msg-indexing/logs-n-entries.d.ts +3 -3
- package/build/core/asmail/inbox/msg-indexing/logs-n-entries.js +2 -2
- package/build/core/asmail/inbox/msg-indexing/sql-indexing.d.ts +1 -1
- package/build/core/asmail/inbox/msg-indexing/sql-indexing.js +1 -2
- package/build/core/asmail/inbox/msg-on-disk.d.ts +2 -2
- package/build/core/asmail/inbox/msg-on-disk.js +3 -3
- package/build/core/asmail/index.d.ts +3 -3
- package/build/core/asmail/key-verification.js +2 -3
- package/build/core/asmail/keyring/common.d.ts +1 -1
- package/build/core/asmail/keyring/common.js +7 -7
- package/build/core/asmail/keyring/correspondent-keys.d.ts +1 -1
- package/build/core/asmail/keyring/correspondent-keys.js +5 -5
- package/build/core/asmail/keyring/index.d.ts +3 -3
- package/build/core/asmail/keyring/index.js +2 -2
- package/build/core/asmail/keyring/keyring-storage.d.ts +1 -1
- package/build/core/asmail/keyring/keyring-storage.js +1 -2
- package/build/core/asmail/msg/attachments-container.d.ts +3 -3
- package/build/core/asmail/msg/attachments-container.js +7 -8
- package/build/core/asmail/msg/opener.js +2 -2
- package/build/core/asmail/msg/packer.d.ts +2 -2
- package/build/core/asmail/sending-params/index.d.ts +3 -3
- package/build/core/asmail/sending-params/own-params.d.ts +3 -3
- package/build/core/asmail/sending-params/params-from-others.d.ts +3 -3
- package/build/core/id-manager/index.d.ts +4 -4
- package/build/core/id-manager/key-storage.d.ts +1 -1
- package/build/core/id-manager/mailerid-cap-ipc.d.ts +1 -1
- package/build/core/id-manager/mailerid-cap-ipc.js +2 -3
- package/build/core/index.d.ts +3 -3
- package/build/core/startup/sign-in.d.ts +6 -6
- package/build/core/startup/sign-in.js +2 -2
- package/build/core/startup/sign-up.d.ts +1 -1
- package/build/core/startup/sign-up.js +6 -6
- package/build/core/startup/startup-cap.d.ts +2 -2
- package/build/core/startup/startup-cap.js +4 -5
- package/build/core/storage/common/obj-info-file.js +12 -13
- package/build/core/storage/common/utils.js +2 -3
- package/build/core/storage/index.d.ts +5 -5
- package/build/core/storage/index.js +2 -2
- package/build/core/storage/local/storage.d.ts +3 -3
- package/build/core/storage/storage-cap-ipc.d.ts +1 -1
- package/build/core/storage/storage-cap-ipc.js +3 -4
- package/build/core/storage/synced/obj-files.d.ts +1 -1
- package/build/core/storage/synced/obj-status.d.ts +2 -2
- package/build/core/storage/synced/obj-status.js +2 -2
- package/build/core/storage/synced/storage.d.ts +4 -4
- package/build/core/storage/synced/upload-header-file.js +3 -3
- package/build/core/storage/synced/upsyncer.d.ts +1 -1
- package/build/core/storage/system-folders/apps-data.d.ts +1 -1
- package/build/core/storage/system-folders/index.d.ts +2 -2
- package/build/core/storage/system-folders/index.js +4 -4
- package/build/core-ipc/bytes.d.ts +2 -2
- package/build/core-ipc/bytes.js +4 -5
- package/build/core-ipc/common-caps.d.ts +1 -1
- package/build/core-ipc/common-caps.js +3 -4
- package/build/core-ipc/file.d.ts +13 -14
- package/build/core-ipc/file.js +31 -31
- package/build/core-ipc/fs.d.ts +3 -3
- package/build/core-ipc/fs.js +6 -6
- package/build/core-ipc/generic.d.ts +4 -4
- package/build/core-ipc/generic.js +3 -4
- package/build/core-ipc/log-cap.d.ts +1 -1
- package/build/core-ipc/log-cap.js +2 -3
- package/build/core-ipc/startup-caps.d.ts +1 -1
- package/build/core-ipc/startup-caps.js +2 -3
- package/build/ipc-via-protobuf/connector.d.ts +6 -7
- package/build/ipc-via-protobuf/connector.js +3 -3
- package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -2
- package/build/ipc-via-protobuf/protobuf-msg.js +20 -20
- package/build/lib-client/3nstorage/exceptions.d.ts +1 -1
- package/build/lib-client/3nstorage/exceptions.js +9 -10
- package/build/lib-client/3nstorage/service.d.ts +2 -2
- package/build/lib-client/3nstorage/util/file-based-json.d.ts +3 -3
- package/build/lib-client/3nstorage/util/for-arrays.js +1 -2
- package/build/lib-client/3nstorage/xsp-fs/attrs.d.ts +1 -2
- package/build/lib-client/3nstorage/xsp-fs/common.d.ts +12 -12
- package/build/lib-client/3nstorage/xsp-fs/common.js +5 -5
- package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +4 -4
- package/build/lib-client/3nstorage/xsp-fs/file.d.ts +15 -15
- package/build/lib-client/3nstorage/xsp-fs/folder-node-serialization.js +2 -3
- package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +7 -7
- package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +27 -27
- package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +2 -2
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +7 -7
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +11 -11
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +2 -2
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +1 -2
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +3 -4
- package/build/lib-client/3nweb-signup.js +4 -5
- package/build/lib-client/asmail/recipient.d.ts +1 -1
- package/build/lib-client/asmail/recipient.js +4 -4
- package/build/lib-client/asmail/sender.d.ts +3 -3
- package/build/lib-client/asmail/sender.js +9 -9
- package/build/lib-client/cryptor/cryptor-in-worker.d.ts +2 -2
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.d.ts +2 -2
- package/build/lib-client/cryptor/cryptor.js +3 -3
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-client/cryptor/in-proc-js.js +1 -2
- package/build/lib-client/cryptor/in-proc-wasm.js +1 -2
- package/build/lib-client/cryptor/serialization-for-wasm.d.ts +1 -2
- package/build/lib-client/cryptor/serialization-for-wasm.js +6 -7
- package/build/lib-client/cryptor/wasm-mp1-modules.js +1 -2
- package/build/lib-client/cryptor-work-labels.js +1 -1
- package/build/lib-client/fs-utils/files-select.d.ts +3 -3
- package/build/lib-client/fs-utils/files-select.js +1 -2
- package/build/lib-client/fs-utils/files.d.ts +7 -7
- package/build/lib-client/fs-utils/files.js +7 -8
- package/build/lib-client/fs-utils/fs-collection.d.ts +1 -1
- package/build/lib-client/fs-utils/fs-collection.js +2 -3
- package/build/lib-client/fs-utils/fs-sync-utils.d.ts +5 -5
- package/build/lib-client/fs-utils/fs-sync-utils.js +4 -5
- package/build/lib-client/fs-utils/fs-view.d.ts +4 -4
- package/build/lib-client/fs-utils/fs-view.js +1 -2
- package/build/lib-client/key-derivation.js +3 -4
- package/build/lib-client/local-files/dev-file-sink.d.ts +2 -3
- package/build/lib-client/local-files/dev-file-src.d.ts +0 -1
- package/build/lib-client/local-files/device-fs.d.ts +18 -18
- package/build/lib-client/logging/log-to-file.d.ts +5 -5
- package/build/lib-client/logging/log-to-file.js +2 -2
- package/build/lib-client/mailer-id/login.js +2 -3
- package/build/lib-client/objs-on-disk/file-writing-proc.d.ts +1 -1
- package/build/lib-client/objs-on-disk/obj-folders.d.ts +1 -1
- package/build/lib-client/objs-on-disk/obj-folders.js +9 -5
- package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +1 -1
- package/build/lib-client/protobuf-type.d.ts +0 -1
- package/build/lib-client/request-utils.d.ts +2 -4
- package/build/lib-client/request-utils.js +6 -6
- package/build/lib-client/service-locator.d.ts +3 -4
- package/build/lib-client/service-locator.js +5 -6
- package/build/lib-client/user-with-mid-session.d.ts +1 -1
- package/build/lib-client/user-with-mid-session.js +17 -17
- package/build/lib-client/user-with-pkl-session.js +16 -16
- package/build/lib-client/ws-utils.js +1 -2
- package/build/lib-common/assert.js +1 -2
- package/build/lib-common/async-cryptor-wrap.js +4 -5
- package/build/lib-common/async-fs-node.d.ts +0 -3
- package/build/lib-common/async-fs-node.js +35 -35
- package/build/lib-common/async-iter.js +2 -3
- package/build/lib-common/big-endian.d.ts +0 -1
- package/build/lib-common/big-endian.js +10 -11
- package/build/lib-common/binding.js +1 -2
- package/build/lib-common/buffer-utils.d.ts +0 -1
- package/build/lib-common/buffer-utils.js +9 -9
- package/build/lib-common/byte-streaming/bytes-fifo-buffer.js +5 -5
- package/build/lib-common/byte-streaming/pipe.d.ts +2 -2
- package/build/lib-common/byte-streaming/pipe.js +1 -2
- package/build/lib-common/byte-streaming/wrapping.d.ts +2 -2
- package/build/lib-common/byte-streaming/wrapping.js +3 -4
- package/build/lib-common/bytes-equal.js +1 -2
- package/build/lib-common/canonical-address.js +3 -4
- package/build/lib-common/exceptions/error.js +3 -4
- package/build/lib-common/exceptions/file.d.ts +2 -2
- package/build/lib-common/exceptions/file.js +7 -7
- package/build/lib-common/exceptions/http.js +2 -3
- package/build/lib-common/exceptions/runtime.js +1 -2
- package/build/lib-common/ipc/generic-ipc.d.ts +3 -3
- package/build/lib-common/ipc/generic-ipc.js +11 -11
- package/build/lib-common/ipc/ws-ipc.js +2 -2
- package/build/lib-common/json-utils.js +4 -5
- package/build/lib-common/jwkeys.d.ts +1 -1
- package/build/lib-common/jwkeys.js +13 -13
- package/build/lib-common/mid-sigs-NaCl-Ed.d.ts +3 -3
- package/build/lib-common/mid-sigs-NaCl-Ed.js +5 -5
- package/build/lib-common/obj-streaming/sink-utils.d.ts +2 -2
- package/build/lib-common/obj-streaming/sink-utils.js +2 -3
- package/build/lib-common/obj-streaming/wrapping.js +1 -2
- package/build/lib-common/objs-on-disk/file-layout.d.ts +4 -5
- package/build/lib-common/objs-on-disk/obj-file.d.ts +0 -1
- package/build/lib-common/objs-on-disk/utils.d.ts +3 -5
- package/build/lib-common/objs-on-disk/utils.js +5 -6
- package/build/lib-common/objs-on-disk/v1-obj-file-format.d.ts +0 -1
- package/build/lib-common/objs-on-disk/v1-obj-file-format.js +1 -1
- package/build/lib-common/processes/deferred.js +1 -2
- package/build/lib-common/processes/sleep.js +1 -2
- package/build/lib-common/processes/synced.d.ts +1 -1
- package/build/lib-common/processes/synced.js +2 -2
- package/build/lib-common/processes/timeout.js +1 -2
- package/build/lib-common/random-node.js +10 -11
- package/build/lib-common/service-api/3nstorage/owner.js +19 -19
- package/build/lib-common/service-api/asmail/config.js +3 -3
- package/build/lib-common/service-api/asmail/delivery.js +8 -8
- package/build/lib-common/service-api/asmail/retrieval.js +11 -11
- package/build/lib-common/service-api/mailer-id/login.js +2 -2
- package/build/lib-common/service-api/mailer-id/provisioning.js +2 -2
- package/build/lib-common/service-api/pub-key-login.js +2 -2
- package/build/lib-common/service-api/web-socket-base.d.ts +1 -1
- package/build/lib-common/service-api/web-socket-base.js +3 -3
- package/build/lib-common/session-encryptor.js +1 -2
- package/build/lib-common/timed-cache.js +1 -2
- package/build/lib-common/user-admin-api/signup.js +4 -4
- package/build/lib-common/utils-for-observables.js +5 -5
- package/build/lib-sqlite-on-3nstorage/deferred.js +1 -2
- package/build/lib-sqlite-on-3nstorage/index.d.ts +5 -5
- package/build/lib-sqlite-on-3nstorage/index.js +2 -2
- package/build/lib-sqlite-on-3nstorage/synced.d.ts +1 -1
- package/build/lib-sqlite-on-3nstorage/synced.js +2 -2
- package/build/raw-3nweb-clients.d.ts +7 -7
- package/build/raw-3nweb-clients.js +2 -2
- package/package.json +2 -2
|
@@ -3,33 +3,33 @@ import { FileNode } from './file-node';
|
|
|
3
3
|
import { Storage } from './common';
|
|
4
4
|
import { LinkParameters } from '../../fs-utils/files';
|
|
5
5
|
import { NodeInFS } from './node-in-fs';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
6
|
+
type Stats = web3n.files.Stats;
|
|
7
|
+
type FS = web3n.files.FS;
|
|
8
|
+
type WritableFS = web3n.files.WritableFS;
|
|
9
|
+
type ReadonlyFS = web3n.files.ReadonlyFS;
|
|
10
|
+
type File = web3n.files.File;
|
|
11
|
+
type WritableFile = web3n.files.WritableFile;
|
|
12
|
+
type ReadonlyFile = web3n.files.ReadonlyFile;
|
|
13
|
+
type FSType = web3n.files.FSType;
|
|
14
|
+
type ListingEntry = web3n.files.ListingEntry;
|
|
15
|
+
type SymLink = web3n.files.SymLink;
|
|
16
|
+
type FolderEvent = web3n.files.FolderEvent;
|
|
17
|
+
type FileEvent = web3n.files.FileEvent;
|
|
18
|
+
type Observer<T> = web3n.Observer<T>;
|
|
19
|
+
type SelectCriteria = web3n.files.SelectCriteria;
|
|
20
|
+
type FSCollection = web3n.files.FSCollection;
|
|
21
|
+
type FileFlags = web3n.files.FileFlags;
|
|
22
|
+
type FileByteSource = web3n.files.FileByteSource;
|
|
23
|
+
type FileByteSink = web3n.files.FileByteSink;
|
|
24
|
+
type VersionedReadFlags = web3n.files.VersionedReadFlags;
|
|
25
|
+
type XAttrsChanges = web3n.files.XAttrsChanges;
|
|
26
|
+
type WritableFSSyncAPI = web3n.files.WritableFSSyncAPI;
|
|
27
|
+
type SyncStatus = web3n.files.SyncStatus;
|
|
28
|
+
type WritableFSVersionedAPI = web3n.files.WritableFSVersionedAPI;
|
|
29
|
+
type OptionsToAdopteRemote = web3n.files.OptionsToAdopteRemote;
|
|
30
|
+
type OptionsToAdoptRemoteItem = web3n.files.OptionsToAdoptRemoteItem;
|
|
31
|
+
type OptionsToUploadLocal = web3n.files.OptionsToUploadLocal;
|
|
32
|
+
type FolderDiff = web3n.files.FolderDiff;
|
|
33
33
|
export declare class XspFS implements WritableFS {
|
|
34
34
|
readonly writable: boolean;
|
|
35
35
|
name: string;
|
|
@@ -17,8 +17,8 @@ declare class LinkPersistance extends NodePersistance {
|
|
|
17
17
|
}>;
|
|
18
18
|
write(params: LinkParameters<any>, version: number, attrs: CommonAttrs, xattrs: XAttrs | undefined): Promise<Subscribe>;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
type SymLink = web3n.files.SymLink;
|
|
21
|
+
type XAttrsChanges = web3n.files.XAttrsChanges;
|
|
22
22
|
export declare class LinkNode extends NodeInFS<LinkPersistance> {
|
|
23
23
|
private linkParams;
|
|
24
24
|
constructor(storage: Storage, name: string, objId: string, version: number, parentId: string | undefined, key: Uint8Array);
|
|
@@ -3,13 +3,13 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { CommonAttrs, XAttrs } from './attrs';
|
|
4
4
|
import { NodePersistance } from './node-persistence';
|
|
5
5
|
import { ObjSource } from 'xsp-files';
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
export type FSEvent = web3n.files.FolderEvent | web3n.files.FileEvent;
|
|
7
|
+
type RemoteEvent = web3n.files.RemoteEvent;
|
|
8
|
+
type XAttrsChanges = web3n.files.XAttrsChanges;
|
|
9
|
+
type SyncStatus = web3n.files.SyncStatus;
|
|
10
|
+
type OptionsToAdopteRemote = web3n.files.OptionsToAdopteRemote;
|
|
11
|
+
type OptionsToUploadLocal = web3n.files.OptionsToUploadLocal;
|
|
12
|
+
type VersionedReadFlags = web3n.files.VersionedReadFlags;
|
|
13
13
|
export declare abstract class NodeInFS<P extends NodePersistance> implements Node {
|
|
14
14
|
protected readonly storage: Storage;
|
|
15
15
|
readonly type: NodeType;
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.NodeInFS = void 0;
|
|
20
|
+
exports.shouldReadCurrentVersion = shouldReadCurrentVersion;
|
|
20
21
|
/**
|
|
21
22
|
* Everything in this module is assumed to be inside of a file system
|
|
22
23
|
* reliance set.
|
|
@@ -32,6 +33,15 @@ const attrs_1 = require("./attrs");
|
|
|
32
33
|
const assert_1 = require("../../../lib-common/assert");
|
|
33
34
|
const runtime_1 = require("../../../lib-common/exceptions/runtime");
|
|
34
35
|
class NodeInFS {
|
|
36
|
+
get version() {
|
|
37
|
+
return this.currentVersion;
|
|
38
|
+
}
|
|
39
|
+
setCurrentVersion(newVersion) {
|
|
40
|
+
if (!Number.isInteger(newVersion)) {
|
|
41
|
+
throw new TypeError(`Version parameter must be an integer, but ${newVersion} is given`);
|
|
42
|
+
}
|
|
43
|
+
this.currentVersion = newVersion;
|
|
44
|
+
}
|
|
35
45
|
constructor(storage, type, name, objId, currentVersion, parentId) {
|
|
36
46
|
this.storage = storage;
|
|
37
47
|
this.type = type;
|
|
@@ -50,15 +60,6 @@ class NodeInFS {
|
|
|
50
60
|
this.events = undefined;
|
|
51
61
|
this.isInSyncedStorage = (0, common_1.isSyncedStorage)(this.storage);
|
|
52
62
|
}
|
|
53
|
-
get version() {
|
|
54
|
-
return this.currentVersion;
|
|
55
|
-
}
|
|
56
|
-
setCurrentVersion(newVersion) {
|
|
57
|
-
if (!Number.isInteger(newVersion)) {
|
|
58
|
-
throw new TypeError(`Version parameter must be an integer, but ${newVersion} is given`);
|
|
59
|
-
}
|
|
60
|
-
this.currentVersion = newVersion;
|
|
61
|
-
}
|
|
62
63
|
getObjSrcOfVersion(flags) {
|
|
63
64
|
if (flags) {
|
|
64
65
|
const { remoteVersion, archivedVersion } = flags;
|
|
@@ -446,5 +447,4 @@ function shouldReadCurrentVersion(flags) {
|
|
|
446
447
|
}
|
|
447
448
|
return true;
|
|
448
449
|
}
|
|
449
|
-
exports.shouldReadCurrentVersion = shouldReadCurrentVersion;
|
|
450
450
|
Object.freeze(exports);
|
|
@@ -35,8 +35,8 @@ export declare abstract class NodePersistance {
|
|
|
35
35
|
}>;
|
|
36
36
|
reencryptHeader(initHeader: Uint8Array, newVersion: number): Promise<Uint8Array>;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
type FileByteSource = web3n.files.FileByteSource;
|
|
39
|
+
type FileByteSink = web3n.files.FileByteSink;
|
|
40
40
|
export interface ReadonlyPayload {
|
|
41
41
|
getAttrs(): Attrs;
|
|
42
42
|
getXAttrs(): Promise<XAttrs>;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.makeReadonlyPayload =
|
|
19
|
+
exports.makeReadonlyPayload = makeReadonlyPayload;
|
|
20
20
|
const assert_1 = require("../../../lib-common/assert");
|
|
21
21
|
const file_1 = require("../../../lib-common/exceptions/file");
|
|
22
22
|
const synced_1 = require("../../../lib-common/processes/synced");
|
|
@@ -25,7 +25,6 @@ async function makeReadonlyPayload(src) {
|
|
|
25
25
|
const payload = await ReadonlyPayloadV1.makeFor(src);
|
|
26
26
|
return payload;
|
|
27
27
|
}
|
|
28
|
-
exports.makeReadonlyPayload = makeReadonlyPayload;
|
|
29
28
|
class ReadonlyPayloadV1 {
|
|
30
29
|
constructor(src, size, isEndless = false) {
|
|
31
30
|
this.src = src;
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.makeReadonlyPayload = makeReadonlyPayload;
|
|
20
|
+
exports.makeWritablePayload = makeWritablePayload;
|
|
21
|
+
exports.makeWritablePayloadFromBase = makeWritablePayloadFromBase;
|
|
20
22
|
const assert_1 = require("../../../lib-common/assert");
|
|
21
23
|
const big_endian_1 = require("../../../lib-common/big-endian");
|
|
22
24
|
const attrs_1 = require("./attrs");
|
|
@@ -27,16 +29,13 @@ async function makeReadonlyPayload(src) {
|
|
|
27
29
|
const payload = await ReadonlyPayloadV2.makeFor(src);
|
|
28
30
|
return payload;
|
|
29
31
|
}
|
|
30
|
-
exports.makeReadonlyPayload = makeReadonlyPayload;
|
|
31
32
|
async function makeWritablePayload(sink, attrs) {
|
|
32
33
|
return WritablePayloadV2.makeInitiallyEmpty(sink, attrs);
|
|
33
34
|
}
|
|
34
|
-
exports.makeWritablePayload = makeWritablePayload;
|
|
35
35
|
async function makeWritablePayloadFromBase(sink, base, baseSrc) {
|
|
36
36
|
const payload = await WritablePayloadV2.makeOnBase(sink, base, baseSrc);
|
|
37
37
|
return payload;
|
|
38
38
|
}
|
|
39
|
-
exports.makeWritablePayloadFromBase = makeWritablePayloadFromBase;
|
|
40
39
|
const EMPTY_SECTION = 'empty';
|
|
41
40
|
const CONTENT_SECTION = 'content';
|
|
42
41
|
const PAD_SECTION = 'pad';
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.checkAvailableDomains = checkAvailableDomains;
|
|
20
|
+
exports.checkAvailableAddressesForName = checkAvailableAddressesForName;
|
|
21
|
+
exports.addUser = addUser;
|
|
22
|
+
exports.sendActivationCheckRequest = sendActivationCheckRequest;
|
|
20
23
|
const request_utils_1 = require("./request-utils");
|
|
21
24
|
const api = require("../lib-common/user-admin-api/signup");
|
|
22
25
|
async function checkAvailableDomains(client, serviceUrl, signupToken) {
|
|
@@ -38,7 +41,6 @@ async function checkAvailableDomains(client, serviceUrl, signupToken) {
|
|
|
38
41
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
|
-
exports.checkAvailableDomains = checkAvailableDomains;
|
|
42
44
|
async function checkAvailableAddressesForName(client, serviceUrl, name, signupToken) {
|
|
43
45
|
const reqData = {
|
|
44
46
|
name, signupToken
|
|
@@ -60,7 +62,6 @@ async function checkAvailableAddressesForName(client, serviceUrl, name, signupTo
|
|
|
60
62
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
|
-
exports.checkAvailableAddressesForName = checkAvailableAddressesForName;
|
|
64
65
|
async function addUser(client, serviceUrl, userParams) {
|
|
65
66
|
const rep = await client.doJsonRequest({
|
|
66
67
|
method: api.addUser.method,
|
|
@@ -78,7 +79,6 @@ async function addUser(client, serviceUrl, userParams) {
|
|
|
78
79
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
exports.addUser = addUser;
|
|
82
82
|
async function sendActivationCheckRequest(client, serviceUrl, userId) {
|
|
83
83
|
const reqData = {
|
|
84
84
|
userId: userId
|
|
@@ -98,5 +98,4 @@ async function sendActivationCheckRequest(client, serviceUrl, userId) {
|
|
|
98
98
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
exports.sendActivationCheckRequest = sendActivationCheckRequest;
|
|
102
101
|
Object.freeze(exports);
|
|
@@ -5,7 +5,7 @@ import { NetClient } from '../request-utils';
|
|
|
5
5
|
import * as api from '../../lib-common/service-api/asmail/retrieval';
|
|
6
6
|
import { ServiceUser, IGetMailerIdSigner } from '../user-with-mid-session';
|
|
7
7
|
import { SubscribingClient } from '../../lib-common/ipc/ws-ipc';
|
|
8
|
-
|
|
8
|
+
type InboxException = web3n.asmail.InboxException;
|
|
9
9
|
export declare function makeMsgNotFoundException(msgId: string): InboxException;
|
|
10
10
|
export declare function makeObjNotFoundException(msgId: string, objId: string): InboxException;
|
|
11
11
|
export declare function makeMsgIsBrokenException(msgId: string): InboxException;
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.MailRecipient =
|
|
18
|
+
exports.MailRecipient = void 0;
|
|
19
|
+
exports.makeMsgNotFoundException = makeMsgNotFoundException;
|
|
20
|
+
exports.makeObjNotFoundException = makeObjNotFoundException;
|
|
21
|
+
exports.makeMsgIsBrokenException = makeMsgIsBrokenException;
|
|
19
22
|
/**
|
|
20
23
|
* This defines functions that implement ASMail reception protocol.
|
|
21
24
|
*/
|
|
@@ -33,7 +36,6 @@ function makeMsgNotFoundException(msgId) {
|
|
|
33
36
|
};
|
|
34
37
|
return exc;
|
|
35
38
|
}
|
|
36
|
-
exports.makeMsgNotFoundException = makeMsgNotFoundException;
|
|
37
39
|
function makeObjNotFoundException(msgId, objId) {
|
|
38
40
|
const exc = {
|
|
39
41
|
runtimeException: true,
|
|
@@ -44,7 +46,6 @@ function makeObjNotFoundException(msgId, objId) {
|
|
|
44
46
|
};
|
|
45
47
|
return exc;
|
|
46
48
|
}
|
|
47
|
-
exports.makeObjNotFoundException = makeObjNotFoundException;
|
|
48
49
|
function makeMsgIsBrokenException(msgId) {
|
|
49
50
|
const exc = {
|
|
50
51
|
runtimeException: true,
|
|
@@ -54,7 +55,6 @@ function makeMsgIsBrokenException(msgId) {
|
|
|
54
55
|
};
|
|
55
56
|
return exc;
|
|
56
57
|
}
|
|
57
|
-
exports.makeMsgIsBrokenException = makeMsgIsBrokenException;
|
|
58
58
|
class MailRecipient extends user_with_mid_session_1.ServiceUser {
|
|
59
59
|
constructor(user, getSigner, mainUrlGetter, net) {
|
|
60
60
|
super(user, {
|
|
@@ -5,9 +5,9 @@ import { NetClient } from '../request-utils';
|
|
|
5
5
|
import * as api from '../../lib-common/service-api/asmail/delivery';
|
|
6
6
|
import { user as mid } from '../../lib-common/mid-sigs-NaCl-Ed';
|
|
7
7
|
import { ServiceLocator } from '../service-locator';
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
8
|
+
export type FirstSaveReqOpts = api.PutObjFirstQueryOpts;
|
|
9
|
+
export type FollowingSaveReqOpts = api.PutObjSecondQueryOpts;
|
|
10
|
+
export type ServiceUrlGetter = (address: string) => Promise<string>;
|
|
11
11
|
export interface SessionInfo {
|
|
12
12
|
uri: string;
|
|
13
13
|
sessionId: string;
|
|
@@ -26,6 +26,15 @@ const url_1 = require("url");
|
|
|
26
26
|
const LIMIT_ON_MAX_CHUNK = 1024 * 1024;
|
|
27
27
|
const TOO_EARLY_RESTART_PERIOD = 5 * 60 * 1000;
|
|
28
28
|
class MailSender {
|
|
29
|
+
get deliveryURI() {
|
|
30
|
+
if (typeof this.uri !== 'string') {
|
|
31
|
+
throw new Error(`Delivery uri is not initialized.`);
|
|
32
|
+
}
|
|
33
|
+
return this.uri;
|
|
34
|
+
}
|
|
35
|
+
get serviceDomain() {
|
|
36
|
+
return (0, url_1.parse)(this.uri).hostname;
|
|
37
|
+
}
|
|
29
38
|
constructor(sender, recipient, invitation, net) {
|
|
30
39
|
this.sender = sender;
|
|
31
40
|
this.recipient = recipient;
|
|
@@ -41,15 +50,6 @@ class MailSender {
|
|
|
41
50
|
this.uri = undefined;
|
|
42
51
|
Object.seal(this);
|
|
43
52
|
}
|
|
44
|
-
get deliveryURI() {
|
|
45
|
-
if (typeof this.uri !== 'string') {
|
|
46
|
-
throw new Error(`Delivery uri is not initialized.`);
|
|
47
|
-
}
|
|
48
|
-
return this.uri;
|
|
49
|
-
}
|
|
50
|
-
get serviceDomain() {
|
|
51
|
-
return (0, url_1.parse)(this.uri).hostname;
|
|
52
|
-
}
|
|
53
53
|
/**
|
|
54
54
|
* This static method creates a fresh, as apposed to restarted, sender.
|
|
55
55
|
* Returned promise resolves to it.
|
|
@@ -3,13 +3,13 @@ export interface RequestMsg {
|
|
|
3
3
|
func: Func;
|
|
4
4
|
args: any[];
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type Func = 'scrypt' | 'box.calc_dhshared_key' | 'box.generate_pubkey' | 'sbox.open' | 'sbox.pack' | 'sbox.formatWN.open' | 'sbox.formatWN.pack' | 'sign.generate_keypair' | 'sign.signature' | 'sign.verify';
|
|
7
7
|
export interface ReplyMsg {
|
|
8
8
|
res?: any;
|
|
9
9
|
interim?: any;
|
|
10
10
|
err?: any;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type Code = (args: any[]) => {
|
|
13
13
|
res: any;
|
|
14
14
|
trans?: ArrayBuffer[];
|
|
15
15
|
};
|