core-3nweb-client-lib 0.25.5 → 0.26.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 (112) hide show
  1. package/README.md +2 -2
  2. package/build/api-defs/files.d.ts +23 -20
  3. package/build/core/asmail/config/common.js +2 -2
  4. package/build/core/asmail/delivery/index.js +4 -3
  5. package/build/core/asmail/delivery/msg.js +5 -4
  6. package/build/core/asmail/delivery/per-recipient-wip.js +2 -2
  7. package/build/core/asmail/inbox/attachments/fs.js +6 -0
  8. package/build/core/asmail/inbox/cached-msgs.js +2 -2
  9. package/build/core/asmail/inbox/inbox-events.js +2 -1
  10. package/build/core/asmail/inbox/index.js +2 -2
  11. package/build/core/asmail/inbox/msg-downloader.js +2 -2
  12. package/build/core/asmail/inbox/msg-indexing.js +3 -3
  13. package/build/core/asmail/inbox/msg-on-disk.js +2 -2
  14. package/build/core/asmail/keyring/keyring-storage.js +2 -2
  15. package/build/core/asmail/sending-params/own-params.js +2 -2
  16. package/build/core/asmail/sending-params/params-from-others.js +2 -2
  17. package/build/core/id-manager.js +2 -2
  18. package/build/core/sign-in.d.ts +5 -4
  19. package/build/core/sign-in.js +9 -11
  20. package/build/core/sign-up.d.ts +1 -0
  21. package/build/core/sign-up.js +7 -3
  22. package/build/core/storage/common/json-saving.d.ts +21 -0
  23. package/build/core/storage/common/json-saving.js +82 -0
  24. package/build/core/storage/common/obj-info-file.d.ts +43 -0
  25. package/build/core/storage/common/obj-info-file.js +119 -3
  26. package/build/core/storage/index.js +1 -1
  27. package/build/core/storage/local/obj-files-gc.js +8 -6
  28. package/build/core/storage/local/obj-files.d.ts +3 -3
  29. package/build/core/storage/local/obj-files.js +9 -9
  30. package/build/core/storage/local/obj-status.d.ts +9 -25
  31. package/build/core/storage/local/obj-status.js +28 -110
  32. package/build/core/storage/local/storage.d.ts +8 -1
  33. package/build/core/storage/local/storage.js +10 -2
  34. package/build/core/storage/synced/downloader.js +6 -5
  35. package/build/core/storage/synced/obj-files-gc.d.ts +1 -0
  36. package/build/core/storage/synced/obj-files-gc.js +44 -5
  37. package/build/core/storage/synced/obj-files.d.ts +13 -20
  38. package/build/core/storage/synced/obj-files.js +70 -48
  39. package/build/core/storage/synced/obj-status.d.ts +74 -15
  40. package/build/core/storage/synced/obj-status.js +291 -107
  41. package/build/core/storage/synced/remote-events.js +32 -26
  42. package/build/core/storage/synced/storage.d.ts +11 -1
  43. package/build/core/storage/synced/storage.js +28 -3
  44. package/build/core/storage/synced/upsyncer.d.ts +8 -7
  45. package/build/core/storage/synced/upsyncer.js +211 -163
  46. package/build/ipc-via-protobuf/asmail-cap.js +17 -34
  47. package/build/ipc-via-protobuf/connector-clients-side.d.ts +2 -0
  48. package/build/ipc-via-protobuf/connector-clients-side.js +50 -12
  49. package/build/ipc-via-protobuf/file.js +26 -18
  50. package/build/ipc-via-protobuf/fs.js +33 -35
  51. package/build/ipc-via-protobuf/mailerid.js +3 -2
  52. package/build/ipc-via-protobuf/protobuf-msg.d.ts +2 -0
  53. package/build/ipc-via-protobuf/protobuf-msg.js +11 -1
  54. package/build/ipc-via-protobuf/startup-cap.js +5 -5
  55. package/build/lib-client/3nstorage/exceptions.d.ts +9 -8
  56. package/build/lib-client/3nstorage/exceptions.js +18 -9
  57. package/build/lib-client/3nstorage/service.js +10 -6
  58. package/build/lib-client/3nstorage/xsp-fs/common.d.ts +18 -4
  59. package/build/lib-client/3nstorage/xsp-fs/common.js +6 -1
  60. package/build/lib-client/3nstorage/xsp-fs/file-node.js +3 -3
  61. package/build/lib-client/3nstorage/xsp-fs/file.js +4 -1
  62. package/build/lib-client/3nstorage/xsp-fs/folder-node.js +27 -13
  63. package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +11 -6
  64. package/build/lib-client/3nstorage/xsp-fs/fs.js +189 -58
  65. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +4 -0
  66. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +51 -24
  67. package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +2 -2
  68. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +2 -2
  69. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +3 -3
  70. package/build/lib-client/cryptor/cryptor-in-worker.js +4 -4
  71. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  72. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  73. package/build/lib-client/cryptor/in-proc-wasm.js +2 -2
  74. package/build/lib-client/files.js +2 -0
  75. package/build/lib-client/fs-collection.js +3 -2
  76. package/build/lib-client/logging/log-to-file.js +4 -4
  77. package/build/lib-client/objs-on-disk/file-writing-proc.js +2 -2
  78. package/build/lib-client/objs-on-disk/obj-folders.js +2 -2
  79. package/build/lib-client/request-utils.js +2 -2
  80. package/build/lib-client/server-events.js +4 -3
  81. package/build/lib-client/ws-utils.js +2 -2
  82. package/build/lib-common/async-fs-node.js +4 -3
  83. package/build/lib-common/byte-streaming/wrapping.js +17 -17
  84. package/build/lib-common/exceptions/file.js +6 -1
  85. package/build/lib-common/ipc/generic-ipc.js +2 -2
  86. package/build/lib-common/json-utils.js +2 -1
  87. package/build/lib-common/objs-on-disk/obj-file.js +4 -3
  88. package/build/lib-common/objs-on-disk/utils.js +2 -2
  89. package/build/lib-common/processes/deferred.d.ts +6 -0
  90. package/build/lib-common/processes/deferred.js +30 -0
  91. package/build/lib-common/processes/labelled-exec-pools.d.ts +33 -0
  92. package/build/lib-common/processes/labelled-exec-pools.js +141 -0
  93. package/build/lib-common/processes/pressure.d.ts +7 -0
  94. package/build/lib-common/processes/pressure.js +56 -0
  95. package/build/lib-common/processes/sleep.d.ts +1 -0
  96. package/build/lib-common/processes/sleep.js +26 -0
  97. package/build/lib-common/{processes.d.ts → processes/synced.d.ts} +0 -40
  98. package/build/lib-common/{processes.js → processes/synced.js} +187 -204
  99. package/build/lib-common/processes/timeout.d.ts +1 -0
  100. package/build/lib-common/processes/timeout.js +51 -0
  101. package/build/lib-common/service-api/3nstorage/owner.d.ts +5 -4
  102. package/build/lib-common/service-api/3nstorage/owner.js +3 -2
  103. package/build/lib-common/utils-for-observables.d.ts +15 -1
  104. package/build/lib-common/utils-for-observables.js +68 -17
  105. package/build/protos/asmail.proto.js +404 -78
  106. package/build/protos/file.proto.js +370 -44
  107. package/build/protos/fs.proto.js +404 -78
  108. package/package.json +4 -4
  109. package/protos/file.proto +10 -2
  110. package/protos/fs.proto +2 -2
  111. package/build/core/storage/synced/upsync-status.d.ts +0 -41
  112. package/build/core/storage/synced/upsync-status.js +0 -158
@@ -1415,8 +1415,8 @@ $root.fs = (function() {
1415
1415
  * @property {common.IStringValue|null} [newName] FSEventMsg newName
1416
1416
  * @property {fs.IListingEntryMsg|null} [entry] FSEventMsg entry
1417
1417
  * @property {common.IUInt64Value|null} [current] FSEventMsg current
1418
- * @property {common.IUInt64Value|null} [lastSynced] FSEventMsg lastSynced
1419
- * @property {common.IUInt64Value|null} [remoteVersion] FSEventMsg remoteVersion
1418
+ * @property {common.IUInt64Value|null} [uploaded] FSEventMsg uploaded
1419
+ * @property {common.IUInt64Value|null} [moveLabel] FSEventMsg moveLabel
1420
1420
  */
1421
1421
 
1422
1422
  /**
@@ -1507,20 +1507,20 @@ $root.fs = (function() {
1507
1507
  FSEventMsg.prototype.current = null;
1508
1508
 
1509
1509
  /**
1510
- * FSEventMsg lastSynced.
1511
- * @member {common.IUInt64Value|null|undefined} lastSynced
1510
+ * FSEventMsg uploaded.
1511
+ * @member {common.IUInt64Value|null|undefined} uploaded
1512
1512
  * @memberof fs.FSEventMsg
1513
1513
  * @instance
1514
1514
  */
1515
- FSEventMsg.prototype.lastSynced = null;
1515
+ FSEventMsg.prototype.uploaded = null;
1516
1516
 
1517
1517
  /**
1518
- * FSEventMsg remoteVersion.
1519
- * @member {common.IUInt64Value|null|undefined} remoteVersion
1518
+ * FSEventMsg moveLabel.
1519
+ * @member {common.IUInt64Value|null|undefined} moveLabel
1520
1520
  * @memberof fs.FSEventMsg
1521
1521
  * @instance
1522
1522
  */
1523
- FSEventMsg.prototype.remoteVersion = null;
1523
+ FSEventMsg.prototype.moveLabel = null;
1524
1524
 
1525
1525
  /**
1526
1526
  * Creates a new FSEventMsg instance using the specified properties.
@@ -1564,10 +1564,10 @@ $root.fs = (function() {
1564
1564
  $root.fs.ListingEntryMsg.encode(message.entry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
1565
1565
  if (message.current != null && Object.hasOwnProperty.call(message, "current"))
1566
1566
  $root.common.UInt64Value.encode(message.current, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
1567
- if (message.lastSynced != null && Object.hasOwnProperty.call(message, "lastSynced"))
1568
- $root.common.UInt64Value.encode(message.lastSynced, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
1569
- if (message.remoteVersion != null && Object.hasOwnProperty.call(message, "remoteVersion"))
1570
- $root.common.UInt64Value.encode(message.remoteVersion, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
1567
+ if (message.uploaded != null && Object.hasOwnProperty.call(message, "uploaded"))
1568
+ $root.common.UInt64Value.encode(message.uploaded, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
1569
+ if (message.moveLabel != null && Object.hasOwnProperty.call(message, "moveLabel"))
1570
+ $root.common.UInt64Value.encode(message.moveLabel, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
1571
1571
  return writer;
1572
1572
  };
1573
1573
 
@@ -1630,10 +1630,10 @@ $root.fs = (function() {
1630
1630
  message.current = $root.common.UInt64Value.decode(reader, reader.uint32());
1631
1631
  break;
1632
1632
  case 15:
1633
- message.lastSynced = $root.common.UInt64Value.decode(reader, reader.uint32());
1633
+ message.uploaded = $root.common.UInt64Value.decode(reader, reader.uint32());
1634
1634
  break;
1635
1635
  case 16:
1636
- message.remoteVersion = $root.common.UInt64Value.decode(reader, reader.uint32());
1636
+ message.moveLabel = $root.common.UInt64Value.decode(reader, reader.uint32());
1637
1637
  break;
1638
1638
  default:
1639
1639
  reader.skipType(tag & 7);
@@ -1711,15 +1711,15 @@ $root.fs = (function() {
1711
1711
  if (error)
1712
1712
  return "current." + error;
1713
1713
  }
1714
- if (message.lastSynced != null && message.hasOwnProperty("lastSynced")) {
1715
- var error = $root.common.UInt64Value.verify(message.lastSynced);
1714
+ if (message.uploaded != null && message.hasOwnProperty("uploaded")) {
1715
+ var error = $root.common.UInt64Value.verify(message.uploaded);
1716
1716
  if (error)
1717
- return "lastSynced." + error;
1717
+ return "uploaded." + error;
1718
1718
  }
1719
- if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion")) {
1720
- var error = $root.common.UInt64Value.verify(message.remoteVersion);
1719
+ if (message.moveLabel != null && message.hasOwnProperty("moveLabel")) {
1720
+ var error = $root.common.UInt64Value.verify(message.moveLabel);
1721
1721
  if (error)
1722
- return "remoteVersion." + error;
1722
+ return "moveLabel." + error;
1723
1723
  }
1724
1724
  return null;
1725
1725
  };
@@ -1775,15 +1775,15 @@ $root.fs = (function() {
1775
1775
  throw TypeError(".fs.FSEventMsg.current: object expected");
1776
1776
  message.current = $root.common.UInt64Value.fromObject(object.current);
1777
1777
  }
1778
- if (object.lastSynced != null) {
1779
- if (typeof object.lastSynced !== "object")
1780
- throw TypeError(".fs.FSEventMsg.lastSynced: object expected");
1781
- message.lastSynced = $root.common.UInt64Value.fromObject(object.lastSynced);
1778
+ if (object.uploaded != null) {
1779
+ if (typeof object.uploaded !== "object")
1780
+ throw TypeError(".fs.FSEventMsg.uploaded: object expected");
1781
+ message.uploaded = $root.common.UInt64Value.fromObject(object.uploaded);
1782
1782
  }
1783
- if (object.remoteVersion != null) {
1784
- if (typeof object.remoteVersion !== "object")
1785
- throw TypeError(".fs.FSEventMsg.remoteVersion: object expected");
1786
- message.remoteVersion = $root.common.UInt64Value.fromObject(object.remoteVersion);
1783
+ if (object.moveLabel != null) {
1784
+ if (typeof object.moveLabel !== "object")
1785
+ throw TypeError(".fs.FSEventMsg.moveLabel: object expected");
1786
+ message.moveLabel = $root.common.UInt64Value.fromObject(object.moveLabel);
1787
1787
  }
1788
1788
  return message;
1789
1789
  };
@@ -1811,8 +1811,8 @@ $root.fs = (function() {
1811
1811
  object.newName = null;
1812
1812
  object.entry = null;
1813
1813
  object.current = null;
1814
- object.lastSynced = null;
1815
- object.remoteVersion = null;
1814
+ object.uploaded = null;
1815
+ object.moveLabel = null;
1816
1816
  }
1817
1817
  if (message.type != null && message.hasOwnProperty("type"))
1818
1818
  object.type = message.type;
@@ -1832,10 +1832,10 @@ $root.fs = (function() {
1832
1832
  object.entry = $root.fs.ListingEntryMsg.toObject(message.entry, options);
1833
1833
  if (message.current != null && message.hasOwnProperty("current"))
1834
1834
  object.current = $root.common.UInt64Value.toObject(message.current, options);
1835
- if (message.lastSynced != null && message.hasOwnProperty("lastSynced"))
1836
- object.lastSynced = $root.common.UInt64Value.toObject(message.lastSynced, options);
1837
- if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
1838
- object.remoteVersion = $root.common.UInt64Value.toObject(message.remoteVersion, options);
1835
+ if (message.uploaded != null && message.hasOwnProperty("uploaded"))
1836
+ object.uploaded = $root.common.UInt64Value.toObject(message.uploaded, options);
1837
+ if (message.moveLabel != null && message.hasOwnProperty("moveLabel"))
1838
+ object.moveLabel = $root.common.UInt64Value.toObject(message.moveLabel, options);
1839
1839
  return object;
1840
1840
  };
1841
1841
 
@@ -12042,6 +12042,7 @@ $root.file = (function() {
12042
12042
  * @property {common.IUInt64Value|null} [mtime] StatsMsg mtime
12043
12043
  * @property {common.IUInt64Value|null} [ctime] StatsMsg ctime
12044
12044
  * @property {common.IUInt64Value|null} [version] StatsMsg version
12045
+ * @property {file.StatsMsg.ISyncInfo|null} [sync] StatsMsg sync
12045
12046
  */
12046
12047
 
12047
12048
  /**
@@ -12123,6 +12124,14 @@ $root.file = (function() {
12123
12124
  */
12124
12125
  StatsMsg.prototype.version = null;
12125
12126
 
12127
+ /**
12128
+ * StatsMsg sync.
12129
+ * @member {file.StatsMsg.ISyncInfo|null|undefined} sync
12130
+ * @memberof file.StatsMsg
12131
+ * @instance
12132
+ */
12133
+ StatsMsg.prototype.sync = null;
12134
+
12126
12135
  /**
12127
12136
  * Creates a new StatsMsg instance using the specified properties.
12128
12137
  * @function create
@@ -12163,6 +12172,8 @@ $root.file = (function() {
12163
12172
  $root.common.UInt64Value.encode(message.ctime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
12164
12173
  if (message.version != null && Object.hasOwnProperty.call(message, "version"))
12165
12174
  $root.common.UInt64Value.encode(message.version, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
12175
+ if (message.sync != null && Object.hasOwnProperty.call(message, "sync"))
12176
+ $root.file.StatsMsg.SyncInfo.encode(message.sync, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
12166
12177
  return writer;
12167
12178
  };
12168
12179
 
@@ -12221,6 +12232,9 @@ $root.file = (function() {
12221
12232
  case 8:
12222
12233
  message.version = $root.common.UInt64Value.decode(reader, reader.uint32());
12223
12234
  break;
12235
+ case 9:
12236
+ message.sync = $root.file.StatsMsg.SyncInfo.decode(reader, reader.uint32());
12237
+ break;
12224
12238
  default:
12225
12239
  reader.skipType(tag & 7);
12226
12240
  break;
@@ -12294,6 +12308,11 @@ $root.file = (function() {
12294
12308
  if (error)
12295
12309
  return "version." + error;
12296
12310
  }
12311
+ if (message.sync != null && message.hasOwnProperty("sync")) {
12312
+ var error = $root.file.StatsMsg.SyncInfo.verify(message.sync);
12313
+ if (error)
12314
+ return "sync." + error;
12315
+ }
12297
12316
  return null;
12298
12317
  };
12299
12318
 
@@ -12346,6 +12365,11 @@ $root.file = (function() {
12346
12365
  throw TypeError(".file.StatsMsg.version: object expected");
12347
12366
  message.version = $root.common.UInt64Value.fromObject(object.version);
12348
12367
  }
12368
+ if (object.sync != null) {
12369
+ if (typeof object.sync !== "object")
12370
+ throw TypeError(".file.StatsMsg.sync: object expected");
12371
+ message.sync = $root.file.StatsMsg.SyncInfo.fromObject(object.sync);
12372
+ }
12349
12373
  return message;
12350
12374
  };
12351
12375
 
@@ -12371,6 +12395,7 @@ $root.file = (function() {
12371
12395
  object.mtime = null;
12372
12396
  object.ctime = null;
12373
12397
  object.version = null;
12398
+ object.sync = null;
12374
12399
  }
12375
12400
  if (message.isFile != null && message.hasOwnProperty("isFile"))
12376
12401
  object.isFile = $root.common.BooleanValue.toObject(message.isFile, options);
@@ -12388,6 +12413,8 @@ $root.file = (function() {
12388
12413
  object.ctime = $root.common.UInt64Value.toObject(message.ctime, options);
12389
12414
  if (message.version != null && message.hasOwnProperty("version"))
12390
12415
  object.version = $root.common.UInt64Value.toObject(message.version, options);
12416
+ if (message.sync != null && message.hasOwnProperty("sync"))
12417
+ object.sync = $root.file.StatsMsg.SyncInfo.toObject(message.sync, options);
12391
12418
  return object;
12392
12419
  };
12393
12420
 
@@ -12402,6 +12429,332 @@ $root.file = (function() {
12402
12429
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12403
12430
  };
12404
12431
 
12432
+ StatsMsg.SyncInfo = (function() {
12433
+
12434
+ /**
12435
+ * Properties of a SyncInfo.
12436
+ * @memberof file.StatsMsg
12437
+ * @interface ISyncInfo
12438
+ * @property {string|null} [state] SyncInfo state
12439
+ * @property {common.IUInt64Value|null} [latest] SyncInfo latest
12440
+ * @property {common.IUInt64Value|null} [remote] SyncInfo remote
12441
+ * @property {Array.<number|Long>|null} [conflictingRemote] SyncInfo conflictingRemote
12442
+ * @property {common.IBooleanValue|null} [deletedOnRemote] SyncInfo deletedOnRemote
12443
+ */
12444
+
12445
+ /**
12446
+ * Constructs a new SyncInfo.
12447
+ * @memberof file.StatsMsg
12448
+ * @classdesc Represents a SyncInfo.
12449
+ * @implements ISyncInfo
12450
+ * @constructor
12451
+ * @param {file.StatsMsg.ISyncInfo=} [properties] Properties to set
12452
+ */
12453
+ function SyncInfo(properties) {
12454
+ this.conflictingRemote = [];
12455
+ if (properties)
12456
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12457
+ if (properties[keys[i]] != null)
12458
+ this[keys[i]] = properties[keys[i]];
12459
+ }
12460
+
12461
+ /**
12462
+ * SyncInfo state.
12463
+ * @member {string} state
12464
+ * @memberof file.StatsMsg.SyncInfo
12465
+ * @instance
12466
+ */
12467
+ SyncInfo.prototype.state = "";
12468
+
12469
+ /**
12470
+ * SyncInfo latest.
12471
+ * @member {common.IUInt64Value|null|undefined} latest
12472
+ * @memberof file.StatsMsg.SyncInfo
12473
+ * @instance
12474
+ */
12475
+ SyncInfo.prototype.latest = null;
12476
+
12477
+ /**
12478
+ * SyncInfo remote.
12479
+ * @member {common.IUInt64Value|null|undefined} remote
12480
+ * @memberof file.StatsMsg.SyncInfo
12481
+ * @instance
12482
+ */
12483
+ SyncInfo.prototype.remote = null;
12484
+
12485
+ /**
12486
+ * SyncInfo conflictingRemote.
12487
+ * @member {Array.<number|Long>} conflictingRemote
12488
+ * @memberof file.StatsMsg.SyncInfo
12489
+ * @instance
12490
+ */
12491
+ SyncInfo.prototype.conflictingRemote = $util.emptyArray;
12492
+
12493
+ /**
12494
+ * SyncInfo deletedOnRemote.
12495
+ * @member {common.IBooleanValue|null|undefined} deletedOnRemote
12496
+ * @memberof file.StatsMsg.SyncInfo
12497
+ * @instance
12498
+ */
12499
+ SyncInfo.prototype.deletedOnRemote = null;
12500
+
12501
+ /**
12502
+ * Creates a new SyncInfo instance using the specified properties.
12503
+ * @function create
12504
+ * @memberof file.StatsMsg.SyncInfo
12505
+ * @static
12506
+ * @param {file.StatsMsg.ISyncInfo=} [properties] Properties to set
12507
+ * @returns {file.StatsMsg.SyncInfo} SyncInfo instance
12508
+ */
12509
+ SyncInfo.create = function create(properties) {
12510
+ return new SyncInfo(properties);
12511
+ };
12512
+
12513
+ /**
12514
+ * Encodes the specified SyncInfo message. Does not implicitly {@link file.StatsMsg.SyncInfo.verify|verify} messages.
12515
+ * @function encode
12516
+ * @memberof file.StatsMsg.SyncInfo
12517
+ * @static
12518
+ * @param {file.StatsMsg.ISyncInfo} message SyncInfo message or plain object to encode
12519
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12520
+ * @returns {$protobuf.Writer} Writer
12521
+ */
12522
+ SyncInfo.encode = function encode(message, writer) {
12523
+ if (!writer)
12524
+ writer = $Writer.create();
12525
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
12526
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.state);
12527
+ if (message.latest != null && Object.hasOwnProperty.call(message, "latest"))
12528
+ $root.common.UInt64Value.encode(message.latest, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
12529
+ if (message.remote != null && Object.hasOwnProperty.call(message, "remote"))
12530
+ $root.common.UInt64Value.encode(message.remote, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
12531
+ if (message.conflictingRemote != null && message.conflictingRemote.length) {
12532
+ writer.uint32(/* id 4, wireType 2 =*/34).fork();
12533
+ for (var i = 0; i < message.conflictingRemote.length; ++i)
12534
+ writer.uint64(message.conflictingRemote[i]);
12535
+ writer.ldelim();
12536
+ }
12537
+ if (message.deletedOnRemote != null && Object.hasOwnProperty.call(message, "deletedOnRemote"))
12538
+ $root.common.BooleanValue.encode(message.deletedOnRemote, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
12539
+ return writer;
12540
+ };
12541
+
12542
+ /**
12543
+ * Encodes the specified SyncInfo message, length delimited. Does not implicitly {@link file.StatsMsg.SyncInfo.verify|verify} messages.
12544
+ * @function encodeDelimited
12545
+ * @memberof file.StatsMsg.SyncInfo
12546
+ * @static
12547
+ * @param {file.StatsMsg.ISyncInfo} message SyncInfo message or plain object to encode
12548
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12549
+ * @returns {$protobuf.Writer} Writer
12550
+ */
12551
+ SyncInfo.encodeDelimited = function encodeDelimited(message, writer) {
12552
+ return this.encode(message, writer).ldelim();
12553
+ };
12554
+
12555
+ /**
12556
+ * Decodes a SyncInfo message from the specified reader or buffer.
12557
+ * @function decode
12558
+ * @memberof file.StatsMsg.SyncInfo
12559
+ * @static
12560
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12561
+ * @param {number} [length] Message length if known beforehand
12562
+ * @returns {file.StatsMsg.SyncInfo} SyncInfo
12563
+ * @throws {Error} If the payload is not a reader or valid buffer
12564
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12565
+ */
12566
+ SyncInfo.decode = function decode(reader, length) {
12567
+ if (!(reader instanceof $Reader))
12568
+ reader = $Reader.create(reader);
12569
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.file.StatsMsg.SyncInfo();
12570
+ while (reader.pos < end) {
12571
+ var tag = reader.uint32();
12572
+ switch (tag >>> 3) {
12573
+ case 1:
12574
+ message.state = reader.string();
12575
+ break;
12576
+ case 2:
12577
+ message.latest = $root.common.UInt64Value.decode(reader, reader.uint32());
12578
+ break;
12579
+ case 3:
12580
+ message.remote = $root.common.UInt64Value.decode(reader, reader.uint32());
12581
+ break;
12582
+ case 4:
12583
+ if (!(message.conflictingRemote && message.conflictingRemote.length))
12584
+ message.conflictingRemote = [];
12585
+ if ((tag & 7) === 2) {
12586
+ var end2 = reader.uint32() + reader.pos;
12587
+ while (reader.pos < end2)
12588
+ message.conflictingRemote.push(reader.uint64());
12589
+ } else
12590
+ message.conflictingRemote.push(reader.uint64());
12591
+ break;
12592
+ case 5:
12593
+ message.deletedOnRemote = $root.common.BooleanValue.decode(reader, reader.uint32());
12594
+ break;
12595
+ default:
12596
+ reader.skipType(tag & 7);
12597
+ break;
12598
+ }
12599
+ }
12600
+ return message;
12601
+ };
12602
+
12603
+ /**
12604
+ * Decodes a SyncInfo message from the specified reader or buffer, length delimited.
12605
+ * @function decodeDelimited
12606
+ * @memberof file.StatsMsg.SyncInfo
12607
+ * @static
12608
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12609
+ * @returns {file.StatsMsg.SyncInfo} SyncInfo
12610
+ * @throws {Error} If the payload is not a reader or valid buffer
12611
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12612
+ */
12613
+ SyncInfo.decodeDelimited = function decodeDelimited(reader) {
12614
+ if (!(reader instanceof $Reader))
12615
+ reader = new $Reader(reader);
12616
+ return this.decode(reader, reader.uint32());
12617
+ };
12618
+
12619
+ /**
12620
+ * Verifies a SyncInfo message.
12621
+ * @function verify
12622
+ * @memberof file.StatsMsg.SyncInfo
12623
+ * @static
12624
+ * @param {Object.<string,*>} message Plain object to verify
12625
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
12626
+ */
12627
+ SyncInfo.verify = function verify(message) {
12628
+ if (typeof message !== "object" || message === null)
12629
+ return "object expected";
12630
+ if (message.state != null && message.hasOwnProperty("state"))
12631
+ if (!$util.isString(message.state))
12632
+ return "state: string expected";
12633
+ if (message.latest != null && message.hasOwnProperty("latest")) {
12634
+ var error = $root.common.UInt64Value.verify(message.latest);
12635
+ if (error)
12636
+ return "latest." + error;
12637
+ }
12638
+ if (message.remote != null && message.hasOwnProperty("remote")) {
12639
+ var error = $root.common.UInt64Value.verify(message.remote);
12640
+ if (error)
12641
+ return "remote." + error;
12642
+ }
12643
+ if (message.conflictingRemote != null && message.hasOwnProperty("conflictingRemote")) {
12644
+ if (!Array.isArray(message.conflictingRemote))
12645
+ return "conflictingRemote: array expected";
12646
+ for (var i = 0; i < message.conflictingRemote.length; ++i)
12647
+ if (!$util.isInteger(message.conflictingRemote[i]) && !(message.conflictingRemote[i] && $util.isInteger(message.conflictingRemote[i].low) && $util.isInteger(message.conflictingRemote[i].high)))
12648
+ return "conflictingRemote: integer|Long[] expected";
12649
+ }
12650
+ if (message.deletedOnRemote != null && message.hasOwnProperty("deletedOnRemote")) {
12651
+ var error = $root.common.BooleanValue.verify(message.deletedOnRemote);
12652
+ if (error)
12653
+ return "deletedOnRemote." + error;
12654
+ }
12655
+ return null;
12656
+ };
12657
+
12658
+ /**
12659
+ * Creates a SyncInfo message from a plain object. Also converts values to their respective internal types.
12660
+ * @function fromObject
12661
+ * @memberof file.StatsMsg.SyncInfo
12662
+ * @static
12663
+ * @param {Object.<string,*>} object Plain object
12664
+ * @returns {file.StatsMsg.SyncInfo} SyncInfo
12665
+ */
12666
+ SyncInfo.fromObject = function fromObject(object) {
12667
+ if (object instanceof $root.file.StatsMsg.SyncInfo)
12668
+ return object;
12669
+ var message = new $root.file.StatsMsg.SyncInfo();
12670
+ if (object.state != null)
12671
+ message.state = String(object.state);
12672
+ if (object.latest != null) {
12673
+ if (typeof object.latest !== "object")
12674
+ throw TypeError(".file.StatsMsg.SyncInfo.latest: object expected");
12675
+ message.latest = $root.common.UInt64Value.fromObject(object.latest);
12676
+ }
12677
+ if (object.remote != null) {
12678
+ if (typeof object.remote !== "object")
12679
+ throw TypeError(".file.StatsMsg.SyncInfo.remote: object expected");
12680
+ message.remote = $root.common.UInt64Value.fromObject(object.remote);
12681
+ }
12682
+ if (object.conflictingRemote) {
12683
+ if (!Array.isArray(object.conflictingRemote))
12684
+ throw TypeError(".file.StatsMsg.SyncInfo.conflictingRemote: array expected");
12685
+ message.conflictingRemote = [];
12686
+ for (var i = 0; i < object.conflictingRemote.length; ++i)
12687
+ if ($util.Long)
12688
+ (message.conflictingRemote[i] = $util.Long.fromValue(object.conflictingRemote[i])).unsigned = true;
12689
+ else if (typeof object.conflictingRemote[i] === "string")
12690
+ message.conflictingRemote[i] = parseInt(object.conflictingRemote[i], 10);
12691
+ else if (typeof object.conflictingRemote[i] === "number")
12692
+ message.conflictingRemote[i] = object.conflictingRemote[i];
12693
+ else if (typeof object.conflictingRemote[i] === "object")
12694
+ message.conflictingRemote[i] = new $util.LongBits(object.conflictingRemote[i].low >>> 0, object.conflictingRemote[i].high >>> 0).toNumber(true);
12695
+ }
12696
+ if (object.deletedOnRemote != null) {
12697
+ if (typeof object.deletedOnRemote !== "object")
12698
+ throw TypeError(".file.StatsMsg.SyncInfo.deletedOnRemote: object expected");
12699
+ message.deletedOnRemote = $root.common.BooleanValue.fromObject(object.deletedOnRemote);
12700
+ }
12701
+ return message;
12702
+ };
12703
+
12704
+ /**
12705
+ * Creates a plain object from a SyncInfo message. Also converts values to other types if specified.
12706
+ * @function toObject
12707
+ * @memberof file.StatsMsg.SyncInfo
12708
+ * @static
12709
+ * @param {file.StatsMsg.SyncInfo} message SyncInfo
12710
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
12711
+ * @returns {Object.<string,*>} Plain object
12712
+ */
12713
+ SyncInfo.toObject = function toObject(message, options) {
12714
+ if (!options)
12715
+ options = {};
12716
+ var object = {};
12717
+ if (options.arrays || options.defaults)
12718
+ object.conflictingRemote = [];
12719
+ if (options.defaults) {
12720
+ object.state = "";
12721
+ object.latest = null;
12722
+ object.remote = null;
12723
+ object.deletedOnRemote = null;
12724
+ }
12725
+ if (message.state != null && message.hasOwnProperty("state"))
12726
+ object.state = message.state;
12727
+ if (message.latest != null && message.hasOwnProperty("latest"))
12728
+ object.latest = $root.common.UInt64Value.toObject(message.latest, options);
12729
+ if (message.remote != null && message.hasOwnProperty("remote"))
12730
+ object.remote = $root.common.UInt64Value.toObject(message.remote, options);
12731
+ if (message.conflictingRemote && message.conflictingRemote.length) {
12732
+ object.conflictingRemote = [];
12733
+ for (var j = 0; j < message.conflictingRemote.length; ++j)
12734
+ if (typeof message.conflictingRemote[j] === "number")
12735
+ object.conflictingRemote[j] = options.longs === String ? String(message.conflictingRemote[j]) : message.conflictingRemote[j];
12736
+ else
12737
+ object.conflictingRemote[j] = options.longs === String ? $util.Long.prototype.toString.call(message.conflictingRemote[j]) : options.longs === Number ? new $util.LongBits(message.conflictingRemote[j].low >>> 0, message.conflictingRemote[j].high >>> 0).toNumber(true) : message.conflictingRemote[j];
12738
+ }
12739
+ if (message.deletedOnRemote != null && message.hasOwnProperty("deletedOnRemote"))
12740
+ object.deletedOnRemote = $root.common.BooleanValue.toObject(message.deletedOnRemote, options);
12741
+ return object;
12742
+ };
12743
+
12744
+ /**
12745
+ * Converts this SyncInfo to JSON.
12746
+ * @function toJSON
12747
+ * @memberof file.StatsMsg.SyncInfo
12748
+ * @instance
12749
+ * @returns {Object.<string,*>} JSON object
12750
+ */
12751
+ SyncInfo.prototype.toJSON = function toJSON() {
12752
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12753
+ };
12754
+
12755
+ return SyncInfo;
12756
+ })();
12757
+
12405
12758
  return StatsMsg;
12406
12759
  })();
12407
12760
 
@@ -13262,8 +13615,7 @@ $root.file = (function() {
13262
13615
  * @property {common.IBooleanValue|null} [isRemote] FileEventMsg isRemote
13263
13616
  * @property {common.IUInt64Value|null} [newVersion] FileEventMsg newVersion
13264
13617
  * @property {common.IUInt64Value|null} [current] FileEventMsg current
13265
- * @property {common.IUInt64Value|null} [lastSynced] FileEventMsg lastSynced
13266
- * @property {common.IUInt64Value|null} [remoteVersion] FileEventMsg remoteVersion
13618
+ * @property {common.IUInt64Value|null} [uploaded] FileEventMsg uploaded
13267
13619
  */
13268
13620
 
13269
13621
  /**
@@ -13322,20 +13674,12 @@ $root.file = (function() {
13322
13674
  FileEventMsg.prototype.current = null;
13323
13675
 
13324
13676
  /**
13325
- * FileEventMsg lastSynced.
13326
- * @member {common.IUInt64Value|null|undefined} lastSynced
13327
- * @memberof file.FileEventMsg
13328
- * @instance
13329
- */
13330
- FileEventMsg.prototype.lastSynced = null;
13331
-
13332
- /**
13333
- * FileEventMsg remoteVersion.
13334
- * @member {common.IUInt64Value|null|undefined} remoteVersion
13677
+ * FileEventMsg uploaded.
13678
+ * @member {common.IUInt64Value|null|undefined} uploaded
13335
13679
  * @memberof file.FileEventMsg
13336
13680
  * @instance
13337
13681
  */
13338
- FileEventMsg.prototype.remoteVersion = null;
13682
+ FileEventMsg.prototype.uploaded = null;
13339
13683
 
13340
13684
  /**
13341
13685
  * Creates a new FileEventMsg instance using the specified properties.
@@ -13371,10 +13715,8 @@ $root.file = (function() {
13371
13715
  $root.common.UInt64Value.encode(message.newVersion, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
13372
13716
  if (message.current != null && Object.hasOwnProperty.call(message, "current"))
13373
13717
  $root.common.UInt64Value.encode(message.current, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
13374
- if (message.lastSynced != null && Object.hasOwnProperty.call(message, "lastSynced"))
13375
- $root.common.UInt64Value.encode(message.lastSynced, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
13376
- if (message.remoteVersion != null && Object.hasOwnProperty.call(message, "remoteVersion"))
13377
- $root.common.UInt64Value.encode(message.remoteVersion, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
13718
+ if (message.uploaded != null && Object.hasOwnProperty.call(message, "uploaded"))
13719
+ $root.common.UInt64Value.encode(message.uploaded, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
13378
13720
  return writer;
13379
13721
  };
13380
13722
 
@@ -13425,10 +13767,7 @@ $root.file = (function() {
13425
13767
  message.current = $root.common.UInt64Value.decode(reader, reader.uint32());
13426
13768
  break;
13427
13769
  case 15:
13428
- message.lastSynced = $root.common.UInt64Value.decode(reader, reader.uint32());
13429
- break;
13430
- case 16:
13431
- message.remoteVersion = $root.common.UInt64Value.decode(reader, reader.uint32());
13770
+ message.uploaded = $root.common.UInt64Value.decode(reader, reader.uint32());
13432
13771
  break;
13433
13772
  default:
13434
13773
  reader.skipType(tag & 7);
@@ -13486,15 +13825,10 @@ $root.file = (function() {
13486
13825
  if (error)
13487
13826
  return "current." + error;
13488
13827
  }
13489
- if (message.lastSynced != null && message.hasOwnProperty("lastSynced")) {
13490
- var error = $root.common.UInt64Value.verify(message.lastSynced);
13828
+ if (message.uploaded != null && message.hasOwnProperty("uploaded")) {
13829
+ var error = $root.common.UInt64Value.verify(message.uploaded);
13491
13830
  if (error)
13492
- return "lastSynced." + error;
13493
- }
13494
- if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion")) {
13495
- var error = $root.common.UInt64Value.verify(message.remoteVersion);
13496
- if (error)
13497
- return "remoteVersion." + error;
13831
+ return "uploaded." + error;
13498
13832
  }
13499
13833
  return null;
13500
13834
  };
@@ -13530,15 +13864,10 @@ $root.file = (function() {
13530
13864
  throw TypeError(".file.FileEventMsg.current: object expected");
13531
13865
  message.current = $root.common.UInt64Value.fromObject(object.current);
13532
13866
  }
13533
- if (object.lastSynced != null) {
13534
- if (typeof object.lastSynced !== "object")
13535
- throw TypeError(".file.FileEventMsg.lastSynced: object expected");
13536
- message.lastSynced = $root.common.UInt64Value.fromObject(object.lastSynced);
13537
- }
13538
- if (object.remoteVersion != null) {
13539
- if (typeof object.remoteVersion !== "object")
13540
- throw TypeError(".file.FileEventMsg.remoteVersion: object expected");
13541
- message.remoteVersion = $root.common.UInt64Value.fromObject(object.remoteVersion);
13867
+ if (object.uploaded != null) {
13868
+ if (typeof object.uploaded !== "object")
13869
+ throw TypeError(".file.FileEventMsg.uploaded: object expected");
13870
+ message.uploaded = $root.common.UInt64Value.fromObject(object.uploaded);
13542
13871
  }
13543
13872
  return message;
13544
13873
  };
@@ -13562,8 +13891,7 @@ $root.file = (function() {
13562
13891
  object.isRemote = null;
13563
13892
  object.newVersion = null;
13564
13893
  object.current = null;
13565
- object.lastSynced = null;
13566
- object.remoteVersion = null;
13894
+ object.uploaded = null;
13567
13895
  }
13568
13896
  if (message.type != null && message.hasOwnProperty("type"))
13569
13897
  object.type = message.type;
@@ -13575,10 +13903,8 @@ $root.file = (function() {
13575
13903
  object.newVersion = $root.common.UInt64Value.toObject(message.newVersion, options);
13576
13904
  if (message.current != null && message.hasOwnProperty("current"))
13577
13905
  object.current = $root.common.UInt64Value.toObject(message.current, options);
13578
- if (message.lastSynced != null && message.hasOwnProperty("lastSynced"))
13579
- object.lastSynced = $root.common.UInt64Value.toObject(message.lastSynced, options);
13580
- if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
13581
- object.remoteVersion = $root.common.UInt64Value.toObject(message.remoteVersion, options);
13906
+ if (message.uploaded != null && message.hasOwnProperty("uploaded"))
13907
+ object.uploaded = $root.common.UInt64Value.toObject(message.uploaded, options);
13582
13908
  return object;
13583
13909
  };
13584
13910