core-3nweb-client-lib 0.25.6 → 0.26.0

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 (108) 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 +15 -32
  47. package/build/ipc-via-protobuf/connector-clients-side.js +2 -2
  48. package/build/ipc-via-protobuf/file.js +22 -14
  49. package/build/ipc-via-protobuf/fs.js +31 -33
  50. package/build/ipc-via-protobuf/startup-cap.js +5 -5
  51. package/build/lib-client/3nstorage/exceptions.d.ts +9 -8
  52. package/build/lib-client/3nstorage/exceptions.js +18 -9
  53. package/build/lib-client/3nstorage/service.js +10 -6
  54. package/build/lib-client/3nstorage/xsp-fs/common.d.ts +18 -4
  55. package/build/lib-client/3nstorage/xsp-fs/common.js +6 -1
  56. package/build/lib-client/3nstorage/xsp-fs/file-node.js +3 -3
  57. package/build/lib-client/3nstorage/xsp-fs/file.js +4 -1
  58. package/build/lib-client/3nstorage/xsp-fs/folder-node.js +27 -13
  59. package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +11 -6
  60. package/build/lib-client/3nstorage/xsp-fs/fs.js +189 -58
  61. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +4 -0
  62. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +51 -24
  63. package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +2 -2
  64. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +2 -2
  65. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +3 -3
  66. package/build/lib-client/cryptor/cryptor-in-worker.js +4 -4
  67. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  68. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  69. package/build/lib-client/cryptor/in-proc-wasm.js +2 -2
  70. package/build/lib-client/files.js +2 -0
  71. package/build/lib-client/fs-collection.js +3 -2
  72. package/build/lib-client/logging/log-to-file.js +4 -4
  73. package/build/lib-client/objs-on-disk/file-writing-proc.js +2 -2
  74. package/build/lib-client/objs-on-disk/obj-folders.js +2 -2
  75. package/build/lib-client/request-utils.js +2 -2
  76. package/build/lib-client/server-events.js +4 -3
  77. package/build/lib-client/ws-utils.js +2 -2
  78. package/build/lib-common/async-fs-node.js +4 -3
  79. package/build/lib-common/byte-streaming/wrapping.js +17 -17
  80. package/build/lib-common/exceptions/file.js +6 -1
  81. package/build/lib-common/ipc/generic-ipc.js +2 -2
  82. package/build/lib-common/json-utils.js +2 -1
  83. package/build/lib-common/objs-on-disk/obj-file.js +4 -3
  84. package/build/lib-common/objs-on-disk/utils.js +2 -2
  85. package/build/lib-common/processes/deferred.d.ts +6 -0
  86. package/build/lib-common/processes/deferred.js +30 -0
  87. package/build/lib-common/processes/labelled-exec-pools.d.ts +33 -0
  88. package/build/lib-common/processes/labelled-exec-pools.js +141 -0
  89. package/build/lib-common/processes/pressure.d.ts +7 -0
  90. package/build/lib-common/processes/pressure.js +56 -0
  91. package/build/lib-common/processes/sleep.d.ts +1 -0
  92. package/build/lib-common/processes/sleep.js +26 -0
  93. package/build/lib-common/{processes.d.ts → processes/synced.d.ts} +0 -40
  94. package/build/lib-common/{processes.js → processes/synced.js} +187 -204
  95. package/build/lib-common/processes/timeout.d.ts +1 -0
  96. package/build/lib-common/processes/timeout.js +51 -0
  97. package/build/lib-common/service-api/3nstorage/owner.d.ts +5 -4
  98. package/build/lib-common/service-api/3nstorage/owner.js +3 -2
  99. package/build/lib-common/utils-for-observables.d.ts +15 -1
  100. package/build/lib-common/utils-for-observables.js +68 -17
  101. package/build/protos/asmail.proto.js +404 -78
  102. package/build/protos/file.proto.js +370 -44
  103. package/build/protos/fs.proto.js +404 -78
  104. package/package.json +4 -4
  105. package/protos/file.proto +10 -2
  106. package/protos/fs.proto +2 -2
  107. package/build/core/storage/synced/upsync-status.d.ts +0 -41
  108. package/build/core/storage/synced/upsync-status.js +0 -158
@@ -7318,6 +7318,7 @@ $root.file = (function() {
7318
7318
  * @property {common.IUInt64Value|null} [mtime] StatsMsg mtime
7319
7319
  * @property {common.IUInt64Value|null} [ctime] StatsMsg ctime
7320
7320
  * @property {common.IUInt64Value|null} [version] StatsMsg version
7321
+ * @property {file.StatsMsg.ISyncInfo|null} [sync] StatsMsg sync
7321
7322
  */
7322
7323
 
7323
7324
  /**
@@ -7399,6 +7400,14 @@ $root.file = (function() {
7399
7400
  */
7400
7401
  StatsMsg.prototype.version = null;
7401
7402
 
7403
+ /**
7404
+ * StatsMsg sync.
7405
+ * @member {file.StatsMsg.ISyncInfo|null|undefined} sync
7406
+ * @memberof file.StatsMsg
7407
+ * @instance
7408
+ */
7409
+ StatsMsg.prototype.sync = null;
7410
+
7402
7411
  /**
7403
7412
  * Creates a new StatsMsg instance using the specified properties.
7404
7413
  * @function create
@@ -7439,6 +7448,8 @@ $root.file = (function() {
7439
7448
  $root.common.UInt64Value.encode(message.ctime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
7440
7449
  if (message.version != null && Object.hasOwnProperty.call(message, "version"))
7441
7450
  $root.common.UInt64Value.encode(message.version, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
7451
+ if (message.sync != null && Object.hasOwnProperty.call(message, "sync"))
7452
+ $root.file.StatsMsg.SyncInfo.encode(message.sync, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
7442
7453
  return writer;
7443
7454
  };
7444
7455
 
@@ -7497,6 +7508,9 @@ $root.file = (function() {
7497
7508
  case 8:
7498
7509
  message.version = $root.common.UInt64Value.decode(reader, reader.uint32());
7499
7510
  break;
7511
+ case 9:
7512
+ message.sync = $root.file.StatsMsg.SyncInfo.decode(reader, reader.uint32());
7513
+ break;
7500
7514
  default:
7501
7515
  reader.skipType(tag & 7);
7502
7516
  break;
@@ -7570,6 +7584,11 @@ $root.file = (function() {
7570
7584
  if (error)
7571
7585
  return "version." + error;
7572
7586
  }
7587
+ if (message.sync != null && message.hasOwnProperty("sync")) {
7588
+ var error = $root.file.StatsMsg.SyncInfo.verify(message.sync);
7589
+ if (error)
7590
+ return "sync." + error;
7591
+ }
7573
7592
  return null;
7574
7593
  };
7575
7594
 
@@ -7622,6 +7641,11 @@ $root.file = (function() {
7622
7641
  throw TypeError(".file.StatsMsg.version: object expected");
7623
7642
  message.version = $root.common.UInt64Value.fromObject(object.version);
7624
7643
  }
7644
+ if (object.sync != null) {
7645
+ if (typeof object.sync !== "object")
7646
+ throw TypeError(".file.StatsMsg.sync: object expected");
7647
+ message.sync = $root.file.StatsMsg.SyncInfo.fromObject(object.sync);
7648
+ }
7625
7649
  return message;
7626
7650
  };
7627
7651
 
@@ -7647,6 +7671,7 @@ $root.file = (function() {
7647
7671
  object.mtime = null;
7648
7672
  object.ctime = null;
7649
7673
  object.version = null;
7674
+ object.sync = null;
7650
7675
  }
7651
7676
  if (message.isFile != null && message.hasOwnProperty("isFile"))
7652
7677
  object.isFile = $root.common.BooleanValue.toObject(message.isFile, options);
@@ -7664,6 +7689,8 @@ $root.file = (function() {
7664
7689
  object.ctime = $root.common.UInt64Value.toObject(message.ctime, options);
7665
7690
  if (message.version != null && message.hasOwnProperty("version"))
7666
7691
  object.version = $root.common.UInt64Value.toObject(message.version, options);
7692
+ if (message.sync != null && message.hasOwnProperty("sync"))
7693
+ object.sync = $root.file.StatsMsg.SyncInfo.toObject(message.sync, options);
7667
7694
  return object;
7668
7695
  };
7669
7696
 
@@ -7678,6 +7705,332 @@ $root.file = (function() {
7678
7705
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
7679
7706
  };
7680
7707
 
7708
+ StatsMsg.SyncInfo = (function() {
7709
+
7710
+ /**
7711
+ * Properties of a SyncInfo.
7712
+ * @memberof file.StatsMsg
7713
+ * @interface ISyncInfo
7714
+ * @property {string|null} [state] SyncInfo state
7715
+ * @property {common.IUInt64Value|null} [latest] SyncInfo latest
7716
+ * @property {common.IUInt64Value|null} [remote] SyncInfo remote
7717
+ * @property {Array.<number|Long>|null} [conflictingRemote] SyncInfo conflictingRemote
7718
+ * @property {common.IBooleanValue|null} [deletedOnRemote] SyncInfo deletedOnRemote
7719
+ */
7720
+
7721
+ /**
7722
+ * Constructs a new SyncInfo.
7723
+ * @memberof file.StatsMsg
7724
+ * @classdesc Represents a SyncInfo.
7725
+ * @implements ISyncInfo
7726
+ * @constructor
7727
+ * @param {file.StatsMsg.ISyncInfo=} [properties] Properties to set
7728
+ */
7729
+ function SyncInfo(properties) {
7730
+ this.conflictingRemote = [];
7731
+ if (properties)
7732
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
7733
+ if (properties[keys[i]] != null)
7734
+ this[keys[i]] = properties[keys[i]];
7735
+ }
7736
+
7737
+ /**
7738
+ * SyncInfo state.
7739
+ * @member {string} state
7740
+ * @memberof file.StatsMsg.SyncInfo
7741
+ * @instance
7742
+ */
7743
+ SyncInfo.prototype.state = "";
7744
+
7745
+ /**
7746
+ * SyncInfo latest.
7747
+ * @member {common.IUInt64Value|null|undefined} latest
7748
+ * @memberof file.StatsMsg.SyncInfo
7749
+ * @instance
7750
+ */
7751
+ SyncInfo.prototype.latest = null;
7752
+
7753
+ /**
7754
+ * SyncInfo remote.
7755
+ * @member {common.IUInt64Value|null|undefined} remote
7756
+ * @memberof file.StatsMsg.SyncInfo
7757
+ * @instance
7758
+ */
7759
+ SyncInfo.prototype.remote = null;
7760
+
7761
+ /**
7762
+ * SyncInfo conflictingRemote.
7763
+ * @member {Array.<number|Long>} conflictingRemote
7764
+ * @memberof file.StatsMsg.SyncInfo
7765
+ * @instance
7766
+ */
7767
+ SyncInfo.prototype.conflictingRemote = $util.emptyArray;
7768
+
7769
+ /**
7770
+ * SyncInfo deletedOnRemote.
7771
+ * @member {common.IBooleanValue|null|undefined} deletedOnRemote
7772
+ * @memberof file.StatsMsg.SyncInfo
7773
+ * @instance
7774
+ */
7775
+ SyncInfo.prototype.deletedOnRemote = null;
7776
+
7777
+ /**
7778
+ * Creates a new SyncInfo instance using the specified properties.
7779
+ * @function create
7780
+ * @memberof file.StatsMsg.SyncInfo
7781
+ * @static
7782
+ * @param {file.StatsMsg.ISyncInfo=} [properties] Properties to set
7783
+ * @returns {file.StatsMsg.SyncInfo} SyncInfo instance
7784
+ */
7785
+ SyncInfo.create = function create(properties) {
7786
+ return new SyncInfo(properties);
7787
+ };
7788
+
7789
+ /**
7790
+ * Encodes the specified SyncInfo message. Does not implicitly {@link file.StatsMsg.SyncInfo.verify|verify} messages.
7791
+ * @function encode
7792
+ * @memberof file.StatsMsg.SyncInfo
7793
+ * @static
7794
+ * @param {file.StatsMsg.ISyncInfo} message SyncInfo message or plain object to encode
7795
+ * @param {$protobuf.Writer} [writer] Writer to encode to
7796
+ * @returns {$protobuf.Writer} Writer
7797
+ */
7798
+ SyncInfo.encode = function encode(message, writer) {
7799
+ if (!writer)
7800
+ writer = $Writer.create();
7801
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
7802
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.state);
7803
+ if (message.latest != null && Object.hasOwnProperty.call(message, "latest"))
7804
+ $root.common.UInt64Value.encode(message.latest, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
7805
+ if (message.remote != null && Object.hasOwnProperty.call(message, "remote"))
7806
+ $root.common.UInt64Value.encode(message.remote, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
7807
+ if (message.conflictingRemote != null && message.conflictingRemote.length) {
7808
+ writer.uint32(/* id 4, wireType 2 =*/34).fork();
7809
+ for (var i = 0; i < message.conflictingRemote.length; ++i)
7810
+ writer.uint64(message.conflictingRemote[i]);
7811
+ writer.ldelim();
7812
+ }
7813
+ if (message.deletedOnRemote != null && Object.hasOwnProperty.call(message, "deletedOnRemote"))
7814
+ $root.common.BooleanValue.encode(message.deletedOnRemote, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
7815
+ return writer;
7816
+ };
7817
+
7818
+ /**
7819
+ * Encodes the specified SyncInfo message, length delimited. Does not implicitly {@link file.StatsMsg.SyncInfo.verify|verify} messages.
7820
+ * @function encodeDelimited
7821
+ * @memberof file.StatsMsg.SyncInfo
7822
+ * @static
7823
+ * @param {file.StatsMsg.ISyncInfo} message SyncInfo message or plain object to encode
7824
+ * @param {$protobuf.Writer} [writer] Writer to encode to
7825
+ * @returns {$protobuf.Writer} Writer
7826
+ */
7827
+ SyncInfo.encodeDelimited = function encodeDelimited(message, writer) {
7828
+ return this.encode(message, writer).ldelim();
7829
+ };
7830
+
7831
+ /**
7832
+ * Decodes a SyncInfo message from the specified reader or buffer.
7833
+ * @function decode
7834
+ * @memberof file.StatsMsg.SyncInfo
7835
+ * @static
7836
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
7837
+ * @param {number} [length] Message length if known beforehand
7838
+ * @returns {file.StatsMsg.SyncInfo} SyncInfo
7839
+ * @throws {Error} If the payload is not a reader or valid buffer
7840
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7841
+ */
7842
+ SyncInfo.decode = function decode(reader, length) {
7843
+ if (!(reader instanceof $Reader))
7844
+ reader = $Reader.create(reader);
7845
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.file.StatsMsg.SyncInfo();
7846
+ while (reader.pos < end) {
7847
+ var tag = reader.uint32();
7848
+ switch (tag >>> 3) {
7849
+ case 1:
7850
+ message.state = reader.string();
7851
+ break;
7852
+ case 2:
7853
+ message.latest = $root.common.UInt64Value.decode(reader, reader.uint32());
7854
+ break;
7855
+ case 3:
7856
+ message.remote = $root.common.UInt64Value.decode(reader, reader.uint32());
7857
+ break;
7858
+ case 4:
7859
+ if (!(message.conflictingRemote && message.conflictingRemote.length))
7860
+ message.conflictingRemote = [];
7861
+ if ((tag & 7) === 2) {
7862
+ var end2 = reader.uint32() + reader.pos;
7863
+ while (reader.pos < end2)
7864
+ message.conflictingRemote.push(reader.uint64());
7865
+ } else
7866
+ message.conflictingRemote.push(reader.uint64());
7867
+ break;
7868
+ case 5:
7869
+ message.deletedOnRemote = $root.common.BooleanValue.decode(reader, reader.uint32());
7870
+ break;
7871
+ default:
7872
+ reader.skipType(tag & 7);
7873
+ break;
7874
+ }
7875
+ }
7876
+ return message;
7877
+ };
7878
+
7879
+ /**
7880
+ * Decodes a SyncInfo message from the specified reader or buffer, length delimited.
7881
+ * @function decodeDelimited
7882
+ * @memberof file.StatsMsg.SyncInfo
7883
+ * @static
7884
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
7885
+ * @returns {file.StatsMsg.SyncInfo} SyncInfo
7886
+ * @throws {Error} If the payload is not a reader or valid buffer
7887
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7888
+ */
7889
+ SyncInfo.decodeDelimited = function decodeDelimited(reader) {
7890
+ if (!(reader instanceof $Reader))
7891
+ reader = new $Reader(reader);
7892
+ return this.decode(reader, reader.uint32());
7893
+ };
7894
+
7895
+ /**
7896
+ * Verifies a SyncInfo message.
7897
+ * @function verify
7898
+ * @memberof file.StatsMsg.SyncInfo
7899
+ * @static
7900
+ * @param {Object.<string,*>} message Plain object to verify
7901
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
7902
+ */
7903
+ SyncInfo.verify = function verify(message) {
7904
+ if (typeof message !== "object" || message === null)
7905
+ return "object expected";
7906
+ if (message.state != null && message.hasOwnProperty("state"))
7907
+ if (!$util.isString(message.state))
7908
+ return "state: string expected";
7909
+ if (message.latest != null && message.hasOwnProperty("latest")) {
7910
+ var error = $root.common.UInt64Value.verify(message.latest);
7911
+ if (error)
7912
+ return "latest." + error;
7913
+ }
7914
+ if (message.remote != null && message.hasOwnProperty("remote")) {
7915
+ var error = $root.common.UInt64Value.verify(message.remote);
7916
+ if (error)
7917
+ return "remote." + error;
7918
+ }
7919
+ if (message.conflictingRemote != null && message.hasOwnProperty("conflictingRemote")) {
7920
+ if (!Array.isArray(message.conflictingRemote))
7921
+ return "conflictingRemote: array expected";
7922
+ for (var i = 0; i < message.conflictingRemote.length; ++i)
7923
+ if (!$util.isInteger(message.conflictingRemote[i]) && !(message.conflictingRemote[i] && $util.isInteger(message.conflictingRemote[i].low) && $util.isInteger(message.conflictingRemote[i].high)))
7924
+ return "conflictingRemote: integer|Long[] expected";
7925
+ }
7926
+ if (message.deletedOnRemote != null && message.hasOwnProperty("deletedOnRemote")) {
7927
+ var error = $root.common.BooleanValue.verify(message.deletedOnRemote);
7928
+ if (error)
7929
+ return "deletedOnRemote." + error;
7930
+ }
7931
+ return null;
7932
+ };
7933
+
7934
+ /**
7935
+ * Creates a SyncInfo message from a plain object. Also converts values to their respective internal types.
7936
+ * @function fromObject
7937
+ * @memberof file.StatsMsg.SyncInfo
7938
+ * @static
7939
+ * @param {Object.<string,*>} object Plain object
7940
+ * @returns {file.StatsMsg.SyncInfo} SyncInfo
7941
+ */
7942
+ SyncInfo.fromObject = function fromObject(object) {
7943
+ if (object instanceof $root.file.StatsMsg.SyncInfo)
7944
+ return object;
7945
+ var message = new $root.file.StatsMsg.SyncInfo();
7946
+ if (object.state != null)
7947
+ message.state = String(object.state);
7948
+ if (object.latest != null) {
7949
+ if (typeof object.latest !== "object")
7950
+ throw TypeError(".file.StatsMsg.SyncInfo.latest: object expected");
7951
+ message.latest = $root.common.UInt64Value.fromObject(object.latest);
7952
+ }
7953
+ if (object.remote != null) {
7954
+ if (typeof object.remote !== "object")
7955
+ throw TypeError(".file.StatsMsg.SyncInfo.remote: object expected");
7956
+ message.remote = $root.common.UInt64Value.fromObject(object.remote);
7957
+ }
7958
+ if (object.conflictingRemote) {
7959
+ if (!Array.isArray(object.conflictingRemote))
7960
+ throw TypeError(".file.StatsMsg.SyncInfo.conflictingRemote: array expected");
7961
+ message.conflictingRemote = [];
7962
+ for (var i = 0; i < object.conflictingRemote.length; ++i)
7963
+ if ($util.Long)
7964
+ (message.conflictingRemote[i] = $util.Long.fromValue(object.conflictingRemote[i])).unsigned = true;
7965
+ else if (typeof object.conflictingRemote[i] === "string")
7966
+ message.conflictingRemote[i] = parseInt(object.conflictingRemote[i], 10);
7967
+ else if (typeof object.conflictingRemote[i] === "number")
7968
+ message.conflictingRemote[i] = object.conflictingRemote[i];
7969
+ else if (typeof object.conflictingRemote[i] === "object")
7970
+ message.conflictingRemote[i] = new $util.LongBits(object.conflictingRemote[i].low >>> 0, object.conflictingRemote[i].high >>> 0).toNumber(true);
7971
+ }
7972
+ if (object.deletedOnRemote != null) {
7973
+ if (typeof object.deletedOnRemote !== "object")
7974
+ throw TypeError(".file.StatsMsg.SyncInfo.deletedOnRemote: object expected");
7975
+ message.deletedOnRemote = $root.common.BooleanValue.fromObject(object.deletedOnRemote);
7976
+ }
7977
+ return message;
7978
+ };
7979
+
7980
+ /**
7981
+ * Creates a plain object from a SyncInfo message. Also converts values to other types if specified.
7982
+ * @function toObject
7983
+ * @memberof file.StatsMsg.SyncInfo
7984
+ * @static
7985
+ * @param {file.StatsMsg.SyncInfo} message SyncInfo
7986
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
7987
+ * @returns {Object.<string,*>} Plain object
7988
+ */
7989
+ SyncInfo.toObject = function toObject(message, options) {
7990
+ if (!options)
7991
+ options = {};
7992
+ var object = {};
7993
+ if (options.arrays || options.defaults)
7994
+ object.conflictingRemote = [];
7995
+ if (options.defaults) {
7996
+ object.state = "";
7997
+ object.latest = null;
7998
+ object.remote = null;
7999
+ object.deletedOnRemote = null;
8000
+ }
8001
+ if (message.state != null && message.hasOwnProperty("state"))
8002
+ object.state = message.state;
8003
+ if (message.latest != null && message.hasOwnProperty("latest"))
8004
+ object.latest = $root.common.UInt64Value.toObject(message.latest, options);
8005
+ if (message.remote != null && message.hasOwnProperty("remote"))
8006
+ object.remote = $root.common.UInt64Value.toObject(message.remote, options);
8007
+ if (message.conflictingRemote && message.conflictingRemote.length) {
8008
+ object.conflictingRemote = [];
8009
+ for (var j = 0; j < message.conflictingRemote.length; ++j)
8010
+ if (typeof message.conflictingRemote[j] === "number")
8011
+ object.conflictingRemote[j] = options.longs === String ? String(message.conflictingRemote[j]) : message.conflictingRemote[j];
8012
+ else
8013
+ 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];
8014
+ }
8015
+ if (message.deletedOnRemote != null && message.hasOwnProperty("deletedOnRemote"))
8016
+ object.deletedOnRemote = $root.common.BooleanValue.toObject(message.deletedOnRemote, options);
8017
+ return object;
8018
+ };
8019
+
8020
+ /**
8021
+ * Converts this SyncInfo to JSON.
8022
+ * @function toJSON
8023
+ * @memberof file.StatsMsg.SyncInfo
8024
+ * @instance
8025
+ * @returns {Object.<string,*>} JSON object
8026
+ */
8027
+ SyncInfo.prototype.toJSON = function toJSON() {
8028
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8029
+ };
8030
+
8031
+ return SyncInfo;
8032
+ })();
8033
+
7681
8034
  return StatsMsg;
7682
8035
  })();
7683
8036
 
@@ -8538,8 +8891,7 @@ $root.file = (function() {
8538
8891
  * @property {common.IBooleanValue|null} [isRemote] FileEventMsg isRemote
8539
8892
  * @property {common.IUInt64Value|null} [newVersion] FileEventMsg newVersion
8540
8893
  * @property {common.IUInt64Value|null} [current] FileEventMsg current
8541
- * @property {common.IUInt64Value|null} [lastSynced] FileEventMsg lastSynced
8542
- * @property {common.IUInt64Value|null} [remoteVersion] FileEventMsg remoteVersion
8894
+ * @property {common.IUInt64Value|null} [uploaded] FileEventMsg uploaded
8543
8895
  */
8544
8896
 
8545
8897
  /**
@@ -8598,20 +8950,12 @@ $root.file = (function() {
8598
8950
  FileEventMsg.prototype.current = null;
8599
8951
 
8600
8952
  /**
8601
- * FileEventMsg lastSynced.
8602
- * @member {common.IUInt64Value|null|undefined} lastSynced
8603
- * @memberof file.FileEventMsg
8604
- * @instance
8605
- */
8606
- FileEventMsg.prototype.lastSynced = null;
8607
-
8608
- /**
8609
- * FileEventMsg remoteVersion.
8610
- * @member {common.IUInt64Value|null|undefined} remoteVersion
8953
+ * FileEventMsg uploaded.
8954
+ * @member {common.IUInt64Value|null|undefined} uploaded
8611
8955
  * @memberof file.FileEventMsg
8612
8956
  * @instance
8613
8957
  */
8614
- FileEventMsg.prototype.remoteVersion = null;
8958
+ FileEventMsg.prototype.uploaded = null;
8615
8959
 
8616
8960
  /**
8617
8961
  * Creates a new FileEventMsg instance using the specified properties.
@@ -8647,10 +8991,8 @@ $root.file = (function() {
8647
8991
  $root.common.UInt64Value.encode(message.newVersion, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
8648
8992
  if (message.current != null && Object.hasOwnProperty.call(message, "current"))
8649
8993
  $root.common.UInt64Value.encode(message.current, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
8650
- if (message.lastSynced != null && Object.hasOwnProperty.call(message, "lastSynced"))
8651
- $root.common.UInt64Value.encode(message.lastSynced, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
8652
- if (message.remoteVersion != null && Object.hasOwnProperty.call(message, "remoteVersion"))
8653
- $root.common.UInt64Value.encode(message.remoteVersion, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
8994
+ if (message.uploaded != null && Object.hasOwnProperty.call(message, "uploaded"))
8995
+ $root.common.UInt64Value.encode(message.uploaded, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
8654
8996
  return writer;
8655
8997
  };
8656
8998
 
@@ -8701,10 +9043,7 @@ $root.file = (function() {
8701
9043
  message.current = $root.common.UInt64Value.decode(reader, reader.uint32());
8702
9044
  break;
8703
9045
  case 15:
8704
- message.lastSynced = $root.common.UInt64Value.decode(reader, reader.uint32());
8705
- break;
8706
- case 16:
8707
- message.remoteVersion = $root.common.UInt64Value.decode(reader, reader.uint32());
9046
+ message.uploaded = $root.common.UInt64Value.decode(reader, reader.uint32());
8708
9047
  break;
8709
9048
  default:
8710
9049
  reader.skipType(tag & 7);
@@ -8762,15 +9101,10 @@ $root.file = (function() {
8762
9101
  if (error)
8763
9102
  return "current." + error;
8764
9103
  }
8765
- if (message.lastSynced != null && message.hasOwnProperty("lastSynced")) {
8766
- var error = $root.common.UInt64Value.verify(message.lastSynced);
9104
+ if (message.uploaded != null && message.hasOwnProperty("uploaded")) {
9105
+ var error = $root.common.UInt64Value.verify(message.uploaded);
8767
9106
  if (error)
8768
- return "lastSynced." + error;
8769
- }
8770
- if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion")) {
8771
- var error = $root.common.UInt64Value.verify(message.remoteVersion);
8772
- if (error)
8773
- return "remoteVersion." + error;
9107
+ return "uploaded." + error;
8774
9108
  }
8775
9109
  return null;
8776
9110
  };
@@ -8806,15 +9140,10 @@ $root.file = (function() {
8806
9140
  throw TypeError(".file.FileEventMsg.current: object expected");
8807
9141
  message.current = $root.common.UInt64Value.fromObject(object.current);
8808
9142
  }
8809
- if (object.lastSynced != null) {
8810
- if (typeof object.lastSynced !== "object")
8811
- throw TypeError(".file.FileEventMsg.lastSynced: object expected");
8812
- message.lastSynced = $root.common.UInt64Value.fromObject(object.lastSynced);
8813
- }
8814
- if (object.remoteVersion != null) {
8815
- if (typeof object.remoteVersion !== "object")
8816
- throw TypeError(".file.FileEventMsg.remoteVersion: object expected");
8817
- message.remoteVersion = $root.common.UInt64Value.fromObject(object.remoteVersion);
9143
+ if (object.uploaded != null) {
9144
+ if (typeof object.uploaded !== "object")
9145
+ throw TypeError(".file.FileEventMsg.uploaded: object expected");
9146
+ message.uploaded = $root.common.UInt64Value.fromObject(object.uploaded);
8818
9147
  }
8819
9148
  return message;
8820
9149
  };
@@ -8838,8 +9167,7 @@ $root.file = (function() {
8838
9167
  object.isRemote = null;
8839
9168
  object.newVersion = null;
8840
9169
  object.current = null;
8841
- object.lastSynced = null;
8842
- object.remoteVersion = null;
9170
+ object.uploaded = null;
8843
9171
  }
8844
9172
  if (message.type != null && message.hasOwnProperty("type"))
8845
9173
  object.type = message.type;
@@ -8851,10 +9179,8 @@ $root.file = (function() {
8851
9179
  object.newVersion = $root.common.UInt64Value.toObject(message.newVersion, options);
8852
9180
  if (message.current != null && message.hasOwnProperty("current"))
8853
9181
  object.current = $root.common.UInt64Value.toObject(message.current, options);
8854
- if (message.lastSynced != null && message.hasOwnProperty("lastSynced"))
8855
- object.lastSynced = $root.common.UInt64Value.toObject(message.lastSynced, options);
8856
- if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
8857
- object.remoteVersion = $root.common.UInt64Value.toObject(message.remoteVersion, options);
9182
+ if (message.uploaded != null && message.hasOwnProperty("uploaded"))
9183
+ object.uploaded = $root.common.UInt64Value.toObject(message.uploaded, options);
8858
9184
  return object;
8859
9185
  };
8860
9186
 
@@ -13821,8 +14147,8 @@ $root.fs = (function() {
13821
14147
  * @property {common.IStringValue|null} [newName] FSEventMsg newName
13822
14148
  * @property {fs.IListingEntryMsg|null} [entry] FSEventMsg entry
13823
14149
  * @property {common.IUInt64Value|null} [current] FSEventMsg current
13824
- * @property {common.IUInt64Value|null} [lastSynced] FSEventMsg lastSynced
13825
- * @property {common.IUInt64Value|null} [remoteVersion] FSEventMsg remoteVersion
14150
+ * @property {common.IUInt64Value|null} [uploaded] FSEventMsg uploaded
14151
+ * @property {common.IUInt64Value|null} [moveLabel] FSEventMsg moveLabel
13826
14152
  */
13827
14153
 
13828
14154
  /**
@@ -13913,20 +14239,20 @@ $root.fs = (function() {
13913
14239
  FSEventMsg.prototype.current = null;
13914
14240
 
13915
14241
  /**
13916
- * FSEventMsg lastSynced.
13917
- * @member {common.IUInt64Value|null|undefined} lastSynced
14242
+ * FSEventMsg uploaded.
14243
+ * @member {common.IUInt64Value|null|undefined} uploaded
13918
14244
  * @memberof fs.FSEventMsg
13919
14245
  * @instance
13920
14246
  */
13921
- FSEventMsg.prototype.lastSynced = null;
14247
+ FSEventMsg.prototype.uploaded = null;
13922
14248
 
13923
14249
  /**
13924
- * FSEventMsg remoteVersion.
13925
- * @member {common.IUInt64Value|null|undefined} remoteVersion
14250
+ * FSEventMsg moveLabel.
14251
+ * @member {common.IUInt64Value|null|undefined} moveLabel
13926
14252
  * @memberof fs.FSEventMsg
13927
14253
  * @instance
13928
14254
  */
13929
- FSEventMsg.prototype.remoteVersion = null;
14255
+ FSEventMsg.prototype.moveLabel = null;
13930
14256
 
13931
14257
  /**
13932
14258
  * Creates a new FSEventMsg instance using the specified properties.
@@ -13970,10 +14296,10 @@ $root.fs = (function() {
13970
14296
  $root.fs.ListingEntryMsg.encode(message.entry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
13971
14297
  if (message.current != null && Object.hasOwnProperty.call(message, "current"))
13972
14298
  $root.common.UInt64Value.encode(message.current, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
13973
- if (message.lastSynced != null && Object.hasOwnProperty.call(message, "lastSynced"))
13974
- $root.common.UInt64Value.encode(message.lastSynced, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
13975
- if (message.remoteVersion != null && Object.hasOwnProperty.call(message, "remoteVersion"))
13976
- $root.common.UInt64Value.encode(message.remoteVersion, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
14299
+ if (message.uploaded != null && Object.hasOwnProperty.call(message, "uploaded"))
14300
+ $root.common.UInt64Value.encode(message.uploaded, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
14301
+ if (message.moveLabel != null && Object.hasOwnProperty.call(message, "moveLabel"))
14302
+ $root.common.UInt64Value.encode(message.moveLabel, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
13977
14303
  return writer;
13978
14304
  };
13979
14305
 
@@ -14036,10 +14362,10 @@ $root.fs = (function() {
14036
14362
  message.current = $root.common.UInt64Value.decode(reader, reader.uint32());
14037
14363
  break;
14038
14364
  case 15:
14039
- message.lastSynced = $root.common.UInt64Value.decode(reader, reader.uint32());
14365
+ message.uploaded = $root.common.UInt64Value.decode(reader, reader.uint32());
14040
14366
  break;
14041
14367
  case 16:
14042
- message.remoteVersion = $root.common.UInt64Value.decode(reader, reader.uint32());
14368
+ message.moveLabel = $root.common.UInt64Value.decode(reader, reader.uint32());
14043
14369
  break;
14044
14370
  default:
14045
14371
  reader.skipType(tag & 7);
@@ -14117,15 +14443,15 @@ $root.fs = (function() {
14117
14443
  if (error)
14118
14444
  return "current." + error;
14119
14445
  }
14120
- if (message.lastSynced != null && message.hasOwnProperty("lastSynced")) {
14121
- var error = $root.common.UInt64Value.verify(message.lastSynced);
14446
+ if (message.uploaded != null && message.hasOwnProperty("uploaded")) {
14447
+ var error = $root.common.UInt64Value.verify(message.uploaded);
14122
14448
  if (error)
14123
- return "lastSynced." + error;
14449
+ return "uploaded." + error;
14124
14450
  }
14125
- if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion")) {
14126
- var error = $root.common.UInt64Value.verify(message.remoteVersion);
14451
+ if (message.moveLabel != null && message.hasOwnProperty("moveLabel")) {
14452
+ var error = $root.common.UInt64Value.verify(message.moveLabel);
14127
14453
  if (error)
14128
- return "remoteVersion." + error;
14454
+ return "moveLabel." + error;
14129
14455
  }
14130
14456
  return null;
14131
14457
  };
@@ -14181,15 +14507,15 @@ $root.fs = (function() {
14181
14507
  throw TypeError(".fs.FSEventMsg.current: object expected");
14182
14508
  message.current = $root.common.UInt64Value.fromObject(object.current);
14183
14509
  }
14184
- if (object.lastSynced != null) {
14185
- if (typeof object.lastSynced !== "object")
14186
- throw TypeError(".fs.FSEventMsg.lastSynced: object expected");
14187
- message.lastSynced = $root.common.UInt64Value.fromObject(object.lastSynced);
14510
+ if (object.uploaded != null) {
14511
+ if (typeof object.uploaded !== "object")
14512
+ throw TypeError(".fs.FSEventMsg.uploaded: object expected");
14513
+ message.uploaded = $root.common.UInt64Value.fromObject(object.uploaded);
14188
14514
  }
14189
- if (object.remoteVersion != null) {
14190
- if (typeof object.remoteVersion !== "object")
14191
- throw TypeError(".fs.FSEventMsg.remoteVersion: object expected");
14192
- message.remoteVersion = $root.common.UInt64Value.fromObject(object.remoteVersion);
14515
+ if (object.moveLabel != null) {
14516
+ if (typeof object.moveLabel !== "object")
14517
+ throw TypeError(".fs.FSEventMsg.moveLabel: object expected");
14518
+ message.moveLabel = $root.common.UInt64Value.fromObject(object.moveLabel);
14193
14519
  }
14194
14520
  return message;
14195
14521
  };
@@ -14217,8 +14543,8 @@ $root.fs = (function() {
14217
14543
  object.newName = null;
14218
14544
  object.entry = null;
14219
14545
  object.current = null;
14220
- object.lastSynced = null;
14221
- object.remoteVersion = null;
14546
+ object.uploaded = null;
14547
+ object.moveLabel = null;
14222
14548
  }
14223
14549
  if (message.type != null && message.hasOwnProperty("type"))
14224
14550
  object.type = message.type;
@@ -14238,10 +14564,10 @@ $root.fs = (function() {
14238
14564
  object.entry = $root.fs.ListingEntryMsg.toObject(message.entry, options);
14239
14565
  if (message.current != null && message.hasOwnProperty("current"))
14240
14566
  object.current = $root.common.UInt64Value.toObject(message.current, options);
14241
- if (message.lastSynced != null && message.hasOwnProperty("lastSynced"))
14242
- object.lastSynced = $root.common.UInt64Value.toObject(message.lastSynced, options);
14243
- if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
14244
- object.remoteVersion = $root.common.UInt64Value.toObject(message.remoteVersion, options);
14567
+ if (message.uploaded != null && message.hasOwnProperty("uploaded"))
14568
+ object.uploaded = $root.common.UInt64Value.toObject(message.uploaded, options);
14569
+ if (message.moveLabel != null && message.hasOwnProperty("moveLabel"))
14570
+ object.moveLabel = $root.common.UInt64Value.toObject(message.moveLabel, options);
14245
14571
  return object;
14246
14572
  };
14247
14573