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.
Files changed (222) hide show
  1. package/build/api-defs/asmail.d.ts +9 -6
  2. package/build/core/app-files.d.ts +4 -4
  3. package/build/core/app-files.js +2 -2
  4. package/build/core/asmail/asmail-cap-ipc.d.ts +1 -1
  5. package/build/core/asmail/asmail-cap-ipc.js +2 -3
  6. package/build/core/asmail/config/common.d.ts +2 -2
  7. package/build/core/asmail/config/index.d.ts +1 -1
  8. package/build/core/asmail/config/invitations-anon.d.ts +1 -1
  9. package/build/core/asmail/config/invitations-anon.js +1 -2
  10. package/build/core/asmail/config/published-intro-key.d.ts +2 -2
  11. package/build/core/asmail/config/published-intro-key.js +1 -2
  12. package/build/core/asmail/delivery/common.d.ts +6 -6
  13. package/build/core/asmail/delivery/common.js +3 -3
  14. package/build/core/asmail/delivery/index.d.ts +4 -4
  15. package/build/core/asmail/delivery/msg.d.ts +4 -4
  16. package/build/core/asmail/delivery/msg.js +3 -3
  17. package/build/core/asmail/inbox/attachments/fs.d.ts +1 -1
  18. package/build/core/asmail/inbox/attachments/fs.js +1 -2
  19. package/build/core/asmail/inbox/inbox-events.d.ts +4 -3
  20. package/build/core/asmail/inbox/inbox-events.js +1 -1
  21. package/build/core/asmail/inbox/index.d.ts +2 -2
  22. package/build/core/asmail/inbox/index.js +7 -4
  23. package/build/core/asmail/inbox/msg-indexing/index.d.ts +2 -2
  24. package/build/core/asmail/inbox/msg-indexing/logs-n-entries.d.ts +3 -3
  25. package/build/core/asmail/inbox/msg-indexing/logs-n-entries.js +2 -2
  26. package/build/core/asmail/inbox/msg-indexing/sql-indexing.d.ts +1 -1
  27. package/build/core/asmail/inbox/msg-indexing/sql-indexing.js +1 -2
  28. package/build/core/asmail/inbox/msg-on-disk.d.ts +2 -2
  29. package/build/core/asmail/inbox/msg-on-disk.js +3 -3
  30. package/build/core/asmail/index.d.ts +3 -3
  31. package/build/core/asmail/key-verification.js +2 -3
  32. package/build/core/asmail/keyring/common.d.ts +1 -1
  33. package/build/core/asmail/keyring/common.js +7 -7
  34. package/build/core/asmail/keyring/correspondent-keys.d.ts +1 -1
  35. package/build/core/asmail/keyring/correspondent-keys.js +5 -5
  36. package/build/core/asmail/keyring/index.d.ts +3 -3
  37. package/build/core/asmail/keyring/index.js +2 -2
  38. package/build/core/asmail/keyring/keyring-storage.d.ts +1 -1
  39. package/build/core/asmail/keyring/keyring-storage.js +1 -2
  40. package/build/core/asmail/msg/attachments-container.d.ts +3 -3
  41. package/build/core/asmail/msg/attachments-container.js +7 -8
  42. package/build/core/asmail/msg/opener.js +2 -2
  43. package/build/core/asmail/msg/packer.d.ts +2 -2
  44. package/build/core/asmail/sending-params/index.d.ts +3 -3
  45. package/build/core/asmail/sending-params/own-params.d.ts +3 -3
  46. package/build/core/asmail/sending-params/params-from-others.d.ts +3 -3
  47. package/build/core/id-manager/index.d.ts +4 -4
  48. package/build/core/id-manager/key-storage.d.ts +1 -1
  49. package/build/core/id-manager/mailerid-cap-ipc.d.ts +1 -1
  50. package/build/core/id-manager/mailerid-cap-ipc.js +2 -3
  51. package/build/core/index.d.ts +3 -3
  52. package/build/core/startup/sign-in.d.ts +6 -6
  53. package/build/core/startup/sign-in.js +2 -2
  54. package/build/core/startup/sign-up.d.ts +1 -1
  55. package/build/core/startup/sign-up.js +6 -6
  56. package/build/core/startup/startup-cap.d.ts +2 -2
  57. package/build/core/startup/startup-cap.js +4 -5
  58. package/build/core/storage/common/obj-info-file.js +12 -13
  59. package/build/core/storage/common/utils.js +2 -3
  60. package/build/core/storage/index.d.ts +5 -5
  61. package/build/core/storage/index.js +2 -2
  62. package/build/core/storage/local/storage.d.ts +3 -3
  63. package/build/core/storage/storage-cap-ipc.d.ts +1 -1
  64. package/build/core/storage/storage-cap-ipc.js +3 -4
  65. package/build/core/storage/synced/obj-files.d.ts +1 -1
  66. package/build/core/storage/synced/obj-status.d.ts +2 -2
  67. package/build/core/storage/synced/obj-status.js +2 -2
  68. package/build/core/storage/synced/storage.d.ts +4 -4
  69. package/build/core/storage/synced/upload-header-file.js +3 -3
  70. package/build/core/storage/synced/upsyncer.d.ts +1 -1
  71. package/build/core/storage/system-folders/apps-data.d.ts +1 -1
  72. package/build/core/storage/system-folders/index.d.ts +2 -2
  73. package/build/core/storage/system-folders/index.js +4 -4
  74. package/build/core-ipc/bytes.d.ts +2 -2
  75. package/build/core-ipc/bytes.js +4 -5
  76. package/build/core-ipc/common-caps.d.ts +1 -1
  77. package/build/core-ipc/common-caps.js +3 -4
  78. package/build/core-ipc/file.d.ts +13 -14
  79. package/build/core-ipc/file.js +31 -31
  80. package/build/core-ipc/fs.d.ts +3 -3
  81. package/build/core-ipc/fs.js +6 -6
  82. package/build/core-ipc/generic.d.ts +4 -4
  83. package/build/core-ipc/generic.js +3 -4
  84. package/build/core-ipc/log-cap.d.ts +1 -1
  85. package/build/core-ipc/log-cap.js +2 -3
  86. package/build/core-ipc/startup-caps.d.ts +1 -1
  87. package/build/core-ipc/startup-caps.js +2 -3
  88. package/build/ipc-via-protobuf/connector.d.ts +6 -7
  89. package/build/ipc-via-protobuf/connector.js +3 -3
  90. package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -2
  91. package/build/ipc-via-protobuf/protobuf-msg.js +20 -20
  92. package/build/lib-client/3nstorage/exceptions.d.ts +1 -1
  93. package/build/lib-client/3nstorage/exceptions.js +9 -10
  94. package/build/lib-client/3nstorage/service.d.ts +2 -2
  95. package/build/lib-client/3nstorage/util/file-based-json.d.ts +3 -3
  96. package/build/lib-client/3nstorage/util/for-arrays.js +1 -2
  97. package/build/lib-client/3nstorage/xsp-fs/attrs.d.ts +1 -2
  98. package/build/lib-client/3nstorage/xsp-fs/common.d.ts +12 -12
  99. package/build/lib-client/3nstorage/xsp-fs/common.js +5 -5
  100. package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +4 -4
  101. package/build/lib-client/3nstorage/xsp-fs/file.d.ts +15 -15
  102. package/build/lib-client/3nstorage/xsp-fs/folder-node-serialization.js +2 -3
  103. package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +7 -7
  104. package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +27 -27
  105. package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +2 -2
  106. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +7 -7
  107. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +11 -11
  108. package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +2 -2
  109. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +1 -2
  110. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +3 -4
  111. package/build/lib-client/3nweb-signup.js +4 -5
  112. package/build/lib-client/asmail/recipient.d.ts +1 -1
  113. package/build/lib-client/asmail/recipient.js +4 -4
  114. package/build/lib-client/asmail/sender.d.ts +3 -3
  115. package/build/lib-client/asmail/sender.js +9 -9
  116. package/build/lib-client/cryptor/cryptor-in-worker.d.ts +2 -2
  117. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  118. package/build/lib-client/cryptor/cryptor.d.ts +2 -2
  119. package/build/lib-client/cryptor/cryptor.js +3 -3
  120. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  121. package/build/lib-client/cryptor/in-proc-js.js +1 -2
  122. package/build/lib-client/cryptor/in-proc-wasm.js +1 -2
  123. package/build/lib-client/cryptor/serialization-for-wasm.d.ts +1 -2
  124. package/build/lib-client/cryptor/serialization-for-wasm.js +6 -7
  125. package/build/lib-client/cryptor/wasm-mp1-modules.js +1 -2
  126. package/build/lib-client/cryptor-work-labels.js +1 -1
  127. package/build/lib-client/fs-utils/files-select.d.ts +3 -3
  128. package/build/lib-client/fs-utils/files-select.js +1 -2
  129. package/build/lib-client/fs-utils/files.d.ts +7 -7
  130. package/build/lib-client/fs-utils/files.js +7 -8
  131. package/build/lib-client/fs-utils/fs-collection.d.ts +1 -1
  132. package/build/lib-client/fs-utils/fs-collection.js +2 -3
  133. package/build/lib-client/fs-utils/fs-sync-utils.d.ts +5 -5
  134. package/build/lib-client/fs-utils/fs-sync-utils.js +4 -5
  135. package/build/lib-client/fs-utils/fs-view.d.ts +4 -4
  136. package/build/lib-client/fs-utils/fs-view.js +1 -2
  137. package/build/lib-client/key-derivation.js +3 -4
  138. package/build/lib-client/local-files/dev-file-sink.d.ts +2 -3
  139. package/build/lib-client/local-files/dev-file-src.d.ts +0 -1
  140. package/build/lib-client/local-files/device-fs.d.ts +18 -18
  141. package/build/lib-client/logging/log-to-file.d.ts +5 -5
  142. package/build/lib-client/logging/log-to-file.js +2 -2
  143. package/build/lib-client/mailer-id/login.js +2 -3
  144. package/build/lib-client/objs-on-disk/file-writing-proc.d.ts +1 -1
  145. package/build/lib-client/objs-on-disk/obj-folders.d.ts +1 -1
  146. package/build/lib-client/objs-on-disk/obj-folders.js +9 -5
  147. package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +1 -1
  148. package/build/lib-client/protobuf-type.d.ts +0 -1
  149. package/build/lib-client/request-utils.d.ts +2 -4
  150. package/build/lib-client/request-utils.js +6 -6
  151. package/build/lib-client/service-locator.d.ts +3 -4
  152. package/build/lib-client/service-locator.js +5 -6
  153. package/build/lib-client/user-with-mid-session.d.ts +1 -1
  154. package/build/lib-client/user-with-mid-session.js +17 -17
  155. package/build/lib-client/user-with-pkl-session.js +16 -16
  156. package/build/lib-client/ws-utils.js +1 -2
  157. package/build/lib-common/assert.js +1 -2
  158. package/build/lib-common/async-cryptor-wrap.js +4 -5
  159. package/build/lib-common/async-fs-node.d.ts +0 -3
  160. package/build/lib-common/async-fs-node.js +35 -35
  161. package/build/lib-common/async-iter.js +2 -3
  162. package/build/lib-common/big-endian.d.ts +0 -1
  163. package/build/lib-common/big-endian.js +10 -11
  164. package/build/lib-common/binding.js +1 -2
  165. package/build/lib-common/buffer-utils.d.ts +0 -1
  166. package/build/lib-common/buffer-utils.js +9 -9
  167. package/build/lib-common/byte-streaming/bytes-fifo-buffer.js +5 -5
  168. package/build/lib-common/byte-streaming/pipe.d.ts +2 -2
  169. package/build/lib-common/byte-streaming/pipe.js +1 -2
  170. package/build/lib-common/byte-streaming/wrapping.d.ts +2 -2
  171. package/build/lib-common/byte-streaming/wrapping.js +3 -4
  172. package/build/lib-common/bytes-equal.js +1 -2
  173. package/build/lib-common/canonical-address.js +3 -4
  174. package/build/lib-common/exceptions/error.js +3 -4
  175. package/build/lib-common/exceptions/file.d.ts +2 -2
  176. package/build/lib-common/exceptions/file.js +7 -7
  177. package/build/lib-common/exceptions/http.js +2 -3
  178. package/build/lib-common/exceptions/runtime.js +1 -2
  179. package/build/lib-common/ipc/generic-ipc.d.ts +3 -3
  180. package/build/lib-common/ipc/generic-ipc.js +11 -11
  181. package/build/lib-common/ipc/ws-ipc.js +2 -2
  182. package/build/lib-common/json-utils.js +4 -5
  183. package/build/lib-common/jwkeys.d.ts +1 -1
  184. package/build/lib-common/jwkeys.js +13 -13
  185. package/build/lib-common/mid-sigs-NaCl-Ed.d.ts +3 -3
  186. package/build/lib-common/mid-sigs-NaCl-Ed.js +5 -5
  187. package/build/lib-common/obj-streaming/sink-utils.d.ts +2 -2
  188. package/build/lib-common/obj-streaming/sink-utils.js +2 -3
  189. package/build/lib-common/obj-streaming/wrapping.js +1 -2
  190. package/build/lib-common/objs-on-disk/file-layout.d.ts +4 -5
  191. package/build/lib-common/objs-on-disk/obj-file.d.ts +0 -1
  192. package/build/lib-common/objs-on-disk/utils.d.ts +3 -5
  193. package/build/lib-common/objs-on-disk/utils.js +5 -6
  194. package/build/lib-common/objs-on-disk/v1-obj-file-format.d.ts +0 -1
  195. package/build/lib-common/objs-on-disk/v1-obj-file-format.js +1 -1
  196. package/build/lib-common/processes/deferred.js +1 -2
  197. package/build/lib-common/processes/sleep.js +1 -2
  198. package/build/lib-common/processes/synced.d.ts +1 -1
  199. package/build/lib-common/processes/synced.js +2 -2
  200. package/build/lib-common/processes/timeout.js +1 -2
  201. package/build/lib-common/random-node.js +10 -11
  202. package/build/lib-common/service-api/3nstorage/owner.js +19 -19
  203. package/build/lib-common/service-api/asmail/config.js +3 -3
  204. package/build/lib-common/service-api/asmail/delivery.js +8 -8
  205. package/build/lib-common/service-api/asmail/retrieval.js +11 -11
  206. package/build/lib-common/service-api/mailer-id/login.js +2 -2
  207. package/build/lib-common/service-api/mailer-id/provisioning.js +2 -2
  208. package/build/lib-common/service-api/pub-key-login.js +2 -2
  209. package/build/lib-common/service-api/web-socket-base.d.ts +1 -1
  210. package/build/lib-common/service-api/web-socket-base.js +3 -3
  211. package/build/lib-common/session-encryptor.js +1 -2
  212. package/build/lib-common/timed-cache.js +1 -2
  213. package/build/lib-common/user-admin-api/signup.js +4 -4
  214. package/build/lib-common/utils-for-observables.js +5 -5
  215. package/build/lib-sqlite-on-3nstorage/deferred.js +1 -2
  216. package/build/lib-sqlite-on-3nstorage/index.d.ts +5 -5
  217. package/build/lib-sqlite-on-3nstorage/index.js +2 -2
  218. package/build/lib-sqlite-on-3nstorage/synced.d.ts +1 -1
  219. package/build/lib-sqlite-on-3nstorage/synced.js +2 -2
  220. package/build/raw-3nweb-clients.d.ts +7 -7
  221. package/build/raw-3nweb-clients.js +2 -2
  222. 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
- declare type Stats = web3n.files.Stats;
7
- declare type FS = web3n.files.FS;
8
- declare type WritableFS = web3n.files.WritableFS;
9
- declare type ReadonlyFS = web3n.files.ReadonlyFS;
10
- declare type File = web3n.files.File;
11
- declare type WritableFile = web3n.files.WritableFile;
12
- declare type ReadonlyFile = web3n.files.ReadonlyFile;
13
- declare type FSType = web3n.files.FSType;
14
- declare type ListingEntry = web3n.files.ListingEntry;
15
- declare type SymLink = web3n.files.SymLink;
16
- declare type FolderEvent = web3n.files.FolderEvent;
17
- declare type FileEvent = web3n.files.FileEvent;
18
- declare type Observer<T> = web3n.Observer<T>;
19
- declare type SelectCriteria = web3n.files.SelectCriteria;
20
- declare type FSCollection = web3n.files.FSCollection;
21
- declare type FileFlags = web3n.files.FileFlags;
22
- declare type FileByteSource = web3n.files.FileByteSource;
23
- declare type FileByteSink = web3n.files.FileByteSink;
24
- declare type VersionedReadFlags = web3n.files.VersionedReadFlags;
25
- declare type XAttrsChanges = web3n.files.XAttrsChanges;
26
- declare type WritableFSSyncAPI = web3n.files.WritableFSSyncAPI;
27
- declare type SyncStatus = web3n.files.SyncStatus;
28
- declare type WritableFSVersionedAPI = web3n.files.WritableFSVersionedAPI;
29
- declare type OptionsToAdopteRemote = web3n.files.OptionsToAdopteRemote;
30
- declare type OptionsToAdoptRemoteItem = web3n.files.OptionsToAdoptRemoteItem;
31
- declare type OptionsToUploadLocal = web3n.files.OptionsToUploadLocal;
32
- declare type FolderDiff = web3n.files.FolderDiff;
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
- declare type SymLink = web3n.files.SymLink;
21
- declare type XAttrsChanges = web3n.files.XAttrsChanges;
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 declare type FSEvent = web3n.files.FolderEvent | web3n.files.FileEvent;
7
- declare type RemoteEvent = web3n.files.RemoteEvent;
8
- declare type XAttrsChanges = web3n.files.XAttrsChanges;
9
- declare type SyncStatus = web3n.files.SyncStatus;
10
- declare type OptionsToAdopteRemote = web3n.files.OptionsToAdopteRemote;
11
- declare type OptionsToUploadLocal = web3n.files.OptionsToUploadLocal;
12
- declare type VersionedReadFlags = web3n.files.VersionedReadFlags;
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.shouldReadCurrentVersion = exports.NodeInFS = void 0;
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
- declare type FileByteSource = web3n.files.FileByteSource;
39
- declare type FileByteSink = web3n.files.FileByteSink;
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 = void 0;
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.makeWritablePayloadFromBase = exports.makeWritablePayload = exports.makeReadonlyPayload = void 0;
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.sendActivationCheckRequest = exports.addUser = exports.checkAvailableAddressesForName = exports.checkAvailableDomains = void 0;
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
- declare type InboxException = web3n.asmail.InboxException;
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 = exports.makeMsgIsBrokenException = exports.makeObjNotFoundException = exports.makeMsgNotFoundException = void 0;
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 declare type FirstSaveReqOpts = api.PutObjFirstQueryOpts;
9
- export declare type FollowingSaveReqOpts = api.PutObjSecondQueryOpts;
10
- export declare type ServiceUrlGetter = (address: string) => Promise<string>;
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 declare 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';
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 declare type Code = (args: any[]) => {
12
+ export type Code = (args: any[]) => {
13
13
  res: any;
14
14
  trans?: ArrayBuffer[];
15
15
  };