core-3nweb-client-lib 0.37.2 → 0.37.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.
@@ -252,6 +252,10 @@ declare namespace web3n.asmail {
252
252
  }
253
253
 
254
254
  interface MsgInfo {
255
+ /**
256
+ * msgId is an identifier generated by user's ASMail server on message
257
+ * delivery to identify it in an inbox.
258
+ */
255
259
  msgId: string;
256
260
  msgType: string;
257
261
  deliveryTS: number;
@@ -265,6 +269,12 @@ declare namespace web3n.asmail {
265
269
  }
266
270
 
267
271
  interface OutgoingMessage extends MsgStruct {
272
+ /**
273
+ * msgId is an identifier generated by recipient's ASMail when message
274
+ * delivery process has started. Its purpose is to restart an interrupted
275
+ * delivery.
276
+ * (Do we even need it here, as core is responsible for restarts?)
277
+ */
268
278
  msgId?: string;
269
279
  attachments?: AttachmentsContainer;
270
280
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (C) 2016 - 2018, 2020, 2022 3NSoft Inc.
2
+ Copyright (C) 2016 - 2018, 2020, 2022, 2025 3NSoft Inc.
3
3
 
4
4
  This program is free software: you can redistribute it and/or modify it under
5
5
  the terms of the GNU General Public License as published by the Free Software
@@ -46,6 +46,8 @@ declare namespace web3n.files {
46
46
  isEndless?: true;
47
47
  storageClosed?: true;
48
48
  remoteNotSet?: true;
49
+ notLinkableFile?: true;
50
+ notLinkableFolder?: true;
49
51
  }
50
52
 
51
53
  interface exceptionCode {
@@ -657,9 +657,14 @@ class DeviceFS {
657
657
  }
658
658
  async link(path, target) {
659
659
  // do sanity checks
660
- if (!target ||
661
- (typeof target.getLinkParams !== 'function')) {
662
- throw new Error('Given target is not-linkable');
660
+ if (!target
661
+ || (typeof target.getLinkParams !== 'function')) {
662
+ if (target.listFolder) {
663
+ throw (0, file_1.makeFileException)('notLinkableFolder', target.name);
664
+ }
665
+ else {
666
+ throw (0, file_1.makeFileException)('notLinkableFile', target.name);
667
+ }
663
668
  }
664
669
  const params = await target.getLinkParams();
665
670
  // note, we could check (params.storageType !== 'device'), but, since we
@@ -339,9 +339,14 @@ class XspFS {
339
339
  throw new Error(`Cannot create link to ${params.storageType} from ${storage.type} storage.`);
340
340
  }
341
341
  async link(path, target) {
342
- if (!target ||
343
- (typeof target.getLinkParams !== 'function')) {
344
- throw new Error('Given target is not-linkable');
342
+ if (!target
343
+ || (typeof target.getLinkParams !== 'function')) {
344
+ if (target.listFolder) {
345
+ throw (0, file_1.makeFileException)('notLinkableFolder', target.name);
346
+ }
347
+ else {
348
+ throw (0, file_1.makeFileException)('notLinkableFile', target.name);
349
+ }
345
350
  }
346
351
  const params = await target.getLinkParams();
347
352
  this.ensureLinkingAllowedTo(params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.37.2",
3
+ "version": "0.37.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",