core-3nweb-client-lib 0.24.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/build/ipc-via-protobuf/asmail-cap.js +17 -18
  2. package/build/ipc-via-protobuf/bytes.js +10 -11
  3. package/build/ipc-via-protobuf/connector.d.ts +2 -1
  4. package/build/ipc-via-protobuf/connector.js +4 -2
  5. package/build/ipc-via-protobuf/file.d.ts +1 -1
  6. package/build/ipc-via-protobuf/file.js +30 -31
  7. package/build/ipc-via-protobuf/fs.d.ts +1 -1
  8. package/build/ipc-via-protobuf/fs.js +37 -38
  9. package/build/ipc-via-protobuf/log-cap.js +4 -5
  10. package/build/ipc-via-protobuf/mailerid.js +5 -7
  11. package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -2
  12. package/build/ipc-via-protobuf/protobuf-msg.js +9 -24
  13. package/build/ipc-via-protobuf/startup-cap.js +10 -11
  14. package/build/ipc-via-protobuf/storage-cap.js +7 -8
  15. package/build/lib-client/cryptor/cryptor-in-worker.js +7 -20
  16. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  17. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  18. package/build/lib-client/cryptor/in-proc-wasm.js +7 -20
  19. package/build/lib-client/{protobuf-loader.d.ts → protobuf-type.d.ts} +2 -4
  20. package/build/lib-client/{protobuf-loader.js → protobuf-type.js} +3 -43
  21. package/build/lib-index.d.ts +0 -1
  22. package/build/protos/asmail.proto.js +22296 -0
  23. package/build/protos/bytes.proto.js +3614 -0
  24. package/build/protos/common.proto.js +1863 -0
  25. package/build/protos/cryptor.proto.js +1667 -0
  26. package/build/protos/file.proto.js +7264 -0
  27. package/build/protos/fs.proto.js +17142 -0
  28. package/build/protos/ipc.proto.js +2349 -0
  29. package/build/protos/logger.proto.js +2112 -0
  30. package/build/protos/mailerid.proto.js +2249 -0
  31. package/build/protos/startup.proto.js +3291 -0
  32. package/build/protos/storage.proto.js +2689 -0
  33. package/package.json +2 -2
  34. package/{build/ipc-via-protobuf/protos → protos}/asmail.proto +0 -0
  35. package/{build/ipc-via-protobuf/protos → protos}/bytes.proto +0 -0
  36. package/{build/ipc-via-protobuf/protos → protos}/common.proto +0 -0
  37. package/{build/ipc-via-protobuf/protos → protos}/file.proto +0 -0
  38. package/{build/ipc-via-protobuf/protos → protos}/fs.proto +0 -0
  39. package/{build/ipc-via-protobuf/protos → protos}/ipc.proto +0 -0
  40. package/{build/ipc-via-protobuf/protos → protos}/logger.proto +0 -0
  41. package/{build/ipc-via-protobuf/protos → protos}/mailerid.proto +0 -0
  42. package/{build/ipc-via-protobuf/protos → protos}/startup.proto +0 -0
  43. package/{build/ipc-via-protobuf/protos → protos}/storage.proto +0 -0
  44. package/build/api-defs/asmail.d.ts +0 -292
  45. package/build/api-defs/common-caps.d.ts +0 -81
  46. package/build/api-defs/files.d.ts +0 -1037
  47. package/build/api-defs/mailerid.d.ts +0 -29
  48. package/build/api-defs/startup.d.ts +0 -121
  49. package/build/api-defs/storage.d.ts +0 -69
  50. package/build/api-defs/web3n.d.ts +0 -50
  51. package/build/ipc-via-protobuf/proto-defs.js +0 -1092
  52. package/build/lib-client/cryptor/proto-defs.js +0 -50
  53. package/build/lib-client/cryptor/protos/cryptor.proto +0 -45
@@ -1,29 +0,0 @@
1
- /*
2
- Copyright (C) 2020 3NSoft Inc.
3
-
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU General Public License as published by the Free Software
6
- Foundation, either version 3 of the License, or (at your option) any later
7
- version.
8
-
9
- This program is distributed in the hope that it will be useful, but
10
- WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
- See the GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License along with
15
- this program. If not, see <http://www.gnu.org/licenses/>.
16
- */
17
-
18
-
19
- declare namespace web3n.mailerid {
20
-
21
- interface Service {
22
-
23
- getUserId(): Promise<string>;
24
-
25
- login(serviceUrl: string): Promise<string>;
26
-
27
- }
28
-
29
- }
@@ -1,121 +0,0 @@
1
- /*
2
- Copyright (C) 2016 - 2017, 2020 3NSoft Inc.
3
-
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU General Public License as published by the Free Software
6
- Foundation, either version 3 of the License, or (at your option) any later
7
- version.
8
-
9
- This program is distributed in the hope that it will be useful, but
10
- WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
- See the GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License along with
15
- this program. If not, see <http://www.gnu.org/licenses/>.
16
- */
17
-
18
-
19
- declare namespace web3n.startup {
20
-
21
- /**
22
- * This is a collection of functions, that are are used by startup
23
- * functionality, when user creates new account in 3NWeb domains.
24
- */
25
- interface SignUpService {
26
-
27
- /**
28
- * @param name is a part of address that comes before @domain
29
- * @param signupToken
30
- * @return a promise, resolvable to an array of available 3NWeb addresses
31
- * with a given name part of the address.
32
- * Array will be empty, when there are no available addresses for a given
33
- * name.
34
- */
35
- getAvailableAddresses(
36
- name: string, signupToken?: string
37
- ): Promise<string[]>;
38
-
39
- /**
40
- * @param userId
41
- * @param signupToken
42
- * @return a promise, resolvable to flag that indicates whether an account
43
- * for given user has been created (true value), or not (false value).
44
- */
45
- addUser(userId: string, signupToken?: string): Promise<boolean>;
46
-
47
- /**
48
- * @param userId
49
- * @return a promise, resolvable to flag that indicates whether given user
50
- * account is active (true value), or not (false value).
51
- */
52
- isActivated(userId: string): Promise<boolean>;
53
-
54
- /**
55
- * This returns a promise, resolvable when MailerId login and storage
56
- * secret keys, have been derived from a password.
57
- * @param pass
58
- * @param progressCB is a callback for progress notification
59
- */
60
- createUserParams(
61
- pass: string,
62
- progressCB: (progress: number) => void
63
- ): Promise<void>;
64
-
65
- }
66
-
67
- /**
68
- * This is a collection of functions, that are are used by startup
69
- * functionality, when user signs into existing account, whether already
70
- * cached on this device, or not.
71
- */
72
- interface SignInService {
73
-
74
- /**
75
- * This returns an array of users, whose storages are found on a disk.
76
- */
77
- getUsersOnDisk(): Promise<string[]>;
78
-
79
- /**
80
- * This starts a login process, when application is started without user
81
- * storage on a disk.
82
- * It returns a promise, resolvable either to true, if provisioning has
83
- * started, or to false, if given address is not known to the MailerId
84
- * server.
85
- * @param address
86
- */
87
- startLoginToRemoteStorage(address: string): Promise<boolean>;
88
-
89
- /**
90
- * This completes login and setup of user's storage on a disk.
91
- * It returns a promise, resolvable either to true, when provisioning is
92
- * done, or to false, when given password is incorrect.
93
- * @param pass is a MailerId login password
94
- * @param progressCB is a callback for progress notification
95
- */
96
- completeLoginAndLocalSetup(
97
- pass: string,
98
- progressCB: (progress: number) => void
99
- ): Promise<boolean>;
100
-
101
- /**
102
- * This method initializes core to run from an existing on a disk storage.
103
- * It returns a promise, resolvable either to true, when password opens
104
- * storage, and to false, when given password is incorrect.
105
- * @param address is user' address.
106
- * @param pass is user's password.
107
- * @param progressCB is a callback for progress notification
108
- */
109
- useExistingStorage(
110
- address: string, pass: string,
111
- progressCB: (progress: number) => void
112
- ): Promise<boolean>;
113
-
114
- }
115
-
116
- interface W3N {
117
- signIn: startup.SignInService;
118
- signUp: startup.SignUpService;
119
- }
120
-
121
- }
@@ -1,69 +0,0 @@
1
- /*
2
- Copyright (C) 2016 - 2017, 2021 3NSoft Inc.
3
-
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU General Public License as published by the Free Software
6
- Foundation, either version 3 of the License, or (at your option) any later
7
- version.
8
-
9
- This program is distributed in the hope that it will be useful, but
10
- WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
- See the GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License along with
15
- this program. If not, see <http://www.gnu.org/licenses/>.
16
- */
17
-
18
- /**
19
- * This is a namespace for things used by storage and any file functionality.
20
- */
21
- declare namespace web3n.storage {
22
-
23
- interface Service {
24
-
25
- /**
26
- * This returns a promise of an app's fs in local storage.
27
- * @param appName is a reversed domain. If omitted, this app's main
28
- * domain is assumed.
29
- */
30
- getAppLocalFS(appName?: string): Promise<files.WritableFS>;
31
-
32
- /**
33
- * This returns a promise of an app's fs in synced storage.
34
- * @param appName is a reversed domain. If omitted, this app's main
35
- * domain is assumed.
36
- */
37
- getAppSyncedFS(appName?: string): Promise<files.WritableFS>;
38
-
39
- /**
40
- * This returns a promise, resolvable to user fs. It will be either
41
- * writable or readonly, depending on app's manifest setting.
42
- * @param type is a type of fs requested, like synced, local, or device.
43
- * @param path is an optional to get more specific fs.
44
- */
45
- getUserFS?: (type: StorageType, path?: string) => Promise<files.FSItem>;
46
-
47
- /**
48
- * This returns a promise, resolvable to system fs. It will be either
49
- * writable or readonly, depending on app's manifest setting.
50
- * @param type is a type of fs requested, like synced, local, or device.
51
- * @param path is an optional to get more specific fs.
52
- */
53
- getSysFS?: (type: StorageType, path?: string) => Promise<files.FSItem>;
54
-
55
- }
56
-
57
- type StorageType = 'device'|'synced'|'local';
58
- type StorageUse = 'user'|'system'|'app';
59
-
60
- interface StorageException extends web3n.RuntimeException {
61
- type: 'storage';
62
- appName?: string;
63
- badAppName?: boolean;
64
- notAllowedToOpenFS?: boolean;
65
- storageType?: StorageType;
66
- storageSegment: StorageUse;
67
- }
68
-
69
- }
@@ -1,50 +0,0 @@
1
- /*
2
- Copyright (C) 2016 - 2018, 2020 3NSoft Inc.
3
-
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU General Public License as published by the Free Software
6
- Foundation, either version 3 of the License, or (at your option) any later
7
- version.
8
-
9
- This program is distributed in the hope that it will be useful, but
10
- WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
- See the GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License along with
15
- this program. If not, see <http://www.gnu.org/licenses/>.
16
- */
17
-
18
- /// <reference path="asmail.d.ts" />
19
- /// <reference path="common-caps.d.ts" />
20
- /// <reference path="files.d.ts" />
21
- /// <reference path="mailerid.d.ts" />
22
- /// <reference path="startup.d.ts" />
23
- /// <reference path="storage.d.ts" />
24
-
25
-
26
- declare namespace web3n {
27
-
28
- interface RuntimeException {
29
- runtimeException: true;
30
- type?: string;
31
- cause?: any;
32
- message?: string;
33
- }
34
-
35
- interface EncryptionException {
36
- failedCipherVerification?: true;
37
- failedSignatureVerification?: true;
38
- }
39
-
40
- interface AsyncIterator<T> {
41
- next(): Promise<IteratorResult<T>>;
42
- }
43
-
44
- interface Observer<T> {
45
- next?: (value: T) => void;
46
- error?: (err: any) => void;
47
- complete?: () => void;
48
- }
49
-
50
- }