core-3nweb-client-lib 0.43.5 → 0.43.7

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.
@@ -17895,6 +17895,7 @@ $root.file = (function() {
17895
17895
  * @property {file.ISyncVersionsBranchMsg|null} [synced] SyncStatusMsg synced
17896
17896
  * @property {file.ISyncVersionsBranchMsg|null} [remote] SyncStatusMsg remote
17897
17897
  * @property {common.IBooleanValue|null} [existsInSyncedParent] SyncStatusMsg existsInSyncedParent
17898
+ * @property {file.IUploadingStateMsg|null} [uploading] SyncStatusMsg uploading
17898
17899
  */
17899
17900
 
17900
17901
  /**
@@ -17952,6 +17953,14 @@ $root.file = (function() {
17952
17953
  */
17953
17954
  SyncStatusMsg.prototype.existsInSyncedParent = null;
17954
17955
 
17956
+ /**
17957
+ * SyncStatusMsg uploading.
17958
+ * @member {file.IUploadingStateMsg|null|undefined} uploading
17959
+ * @memberof file.SyncStatusMsg
17960
+ * @instance
17961
+ */
17962
+ SyncStatusMsg.prototype.uploading = null;
17963
+
17955
17964
  /**
17956
17965
  * Creates a new SyncStatusMsg instance using the specified properties.
17957
17966
  * @function create
@@ -17986,6 +17995,8 @@ $root.file = (function() {
17986
17995
  $root.file.SyncVersionsBranchMsg.encode(message.remote, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
17987
17996
  if (message.existsInSyncedParent != null && Object.hasOwnProperty.call(message, "existsInSyncedParent"))
17988
17997
  $root.common.BooleanValue.encode(message.existsInSyncedParent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
17998
+ if (message.uploading != null && Object.hasOwnProperty.call(message, "uploading"))
17999
+ $root.file.UploadingStateMsg.encode(message.uploading, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
17989
18000
  return writer;
17990
18001
  };
17991
18002
 
@@ -18042,6 +18053,10 @@ $root.file = (function() {
18042
18053
  message.existsInSyncedParent = $root.common.BooleanValue.decode(reader, reader.uint32());
18043
18054
  break;
18044
18055
  }
18056
+ case 6: {
18057
+ message.uploading = $root.file.UploadingStateMsg.decode(reader, reader.uint32());
18058
+ break;
18059
+ }
18045
18060
  default:
18046
18061
  reader.skipType(tag & 7);
18047
18062
  break;
@@ -18100,6 +18115,11 @@ $root.file = (function() {
18100
18115
  if (error)
18101
18116
  return "existsInSyncedParent." + error;
18102
18117
  }
18118
+ if (message.uploading != null && message.hasOwnProperty("uploading")) {
18119
+ var error = $root.file.UploadingStateMsg.verify(message.uploading);
18120
+ if (error)
18121
+ return "uploading." + error;
18122
+ }
18103
18123
  return null;
18104
18124
  };
18105
18125
 
@@ -18137,6 +18157,11 @@ $root.file = (function() {
18137
18157
  throw TypeError(".file.SyncStatusMsg.existsInSyncedParent: object expected");
18138
18158
  message.existsInSyncedParent = $root.common.BooleanValue.fromObject(object.existsInSyncedParent);
18139
18159
  }
18160
+ if (object.uploading != null) {
18161
+ if (typeof object.uploading !== "object")
18162
+ throw TypeError(".file.SyncStatusMsg.uploading: object expected");
18163
+ message.uploading = $root.file.UploadingStateMsg.fromObject(object.uploading);
18164
+ }
18140
18165
  return message;
18141
18166
  };
18142
18167
 
@@ -18159,6 +18184,7 @@ $root.file = (function() {
18159
18184
  object.synced = null;
18160
18185
  object.remote = null;
18161
18186
  object.existsInSyncedParent = null;
18187
+ object.uploading = null;
18162
18188
  }
18163
18189
  if (message.state != null && message.hasOwnProperty("state"))
18164
18190
  object.state = message.state;
@@ -18170,6 +18196,8 @@ $root.file = (function() {
18170
18196
  object.remote = $root.file.SyncVersionsBranchMsg.toObject(message.remote, options);
18171
18197
  if (message.existsInSyncedParent != null && message.hasOwnProperty("existsInSyncedParent"))
18172
18198
  object.existsInSyncedParent = $root.common.BooleanValue.toObject(message.existsInSyncedParent, options);
18199
+ if (message.uploading != null && message.hasOwnProperty("uploading"))
18200
+ object.uploading = $root.file.UploadingStateMsg.toObject(message.uploading, options);
18173
18201
  return object;
18174
18202
  };
18175
18203
 
@@ -18499,6 +18527,296 @@ $root.file = (function() {
18499
18527
  return SyncVersionsBranchMsg;
18500
18528
  })();
18501
18529
 
18530
+ file.UploadingStateMsg = (function() {
18531
+
18532
+ /**
18533
+ * Properties of an UploadingStateMsg.
18534
+ * @memberof file
18535
+ * @interface IUploadingStateMsg
18536
+ * @property {common.IUInt64Value|null} [localVersion] UploadingStateMsg localVersion
18537
+ * @property {common.IUInt64Value|null} [remoteVersion] UploadingStateMsg remoteVersion
18538
+ * @property {common.IUInt64Value|null} [bytesLeftToUpload] UploadingStateMsg bytesLeftToUpload
18539
+ * @property {boolean|null} [uploadStarted] UploadingStateMsg uploadStarted
18540
+ */
18541
+
18542
+ /**
18543
+ * Constructs a new UploadingStateMsg.
18544
+ * @memberof file
18545
+ * @classdesc Represents an UploadingStateMsg.
18546
+ * @implements IUploadingStateMsg
18547
+ * @constructor
18548
+ * @param {file.IUploadingStateMsg=} [properties] Properties to set
18549
+ */
18550
+ function UploadingStateMsg(properties) {
18551
+ if (properties)
18552
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18553
+ if (properties[keys[i]] != null)
18554
+ this[keys[i]] = properties[keys[i]];
18555
+ }
18556
+
18557
+ /**
18558
+ * UploadingStateMsg localVersion.
18559
+ * @member {common.IUInt64Value|null|undefined} localVersion
18560
+ * @memberof file.UploadingStateMsg
18561
+ * @instance
18562
+ */
18563
+ UploadingStateMsg.prototype.localVersion = null;
18564
+
18565
+ /**
18566
+ * UploadingStateMsg remoteVersion.
18567
+ * @member {common.IUInt64Value|null|undefined} remoteVersion
18568
+ * @memberof file.UploadingStateMsg
18569
+ * @instance
18570
+ */
18571
+ UploadingStateMsg.prototype.remoteVersion = null;
18572
+
18573
+ /**
18574
+ * UploadingStateMsg bytesLeftToUpload.
18575
+ * @member {common.IUInt64Value|null|undefined} bytesLeftToUpload
18576
+ * @memberof file.UploadingStateMsg
18577
+ * @instance
18578
+ */
18579
+ UploadingStateMsg.prototype.bytesLeftToUpload = null;
18580
+
18581
+ /**
18582
+ * UploadingStateMsg uploadStarted.
18583
+ * @member {boolean} uploadStarted
18584
+ * @memberof file.UploadingStateMsg
18585
+ * @instance
18586
+ */
18587
+ UploadingStateMsg.prototype.uploadStarted = false;
18588
+
18589
+ /**
18590
+ * Creates a new UploadingStateMsg instance using the specified properties.
18591
+ * @function create
18592
+ * @memberof file.UploadingStateMsg
18593
+ * @static
18594
+ * @param {file.IUploadingStateMsg=} [properties] Properties to set
18595
+ * @returns {file.UploadingStateMsg} UploadingStateMsg instance
18596
+ */
18597
+ UploadingStateMsg.create = function create(properties) {
18598
+ return new UploadingStateMsg(properties);
18599
+ };
18600
+
18601
+ /**
18602
+ * Encodes the specified UploadingStateMsg message. Does not implicitly {@link file.UploadingStateMsg.verify|verify} messages.
18603
+ * @function encode
18604
+ * @memberof file.UploadingStateMsg
18605
+ * @static
18606
+ * @param {file.IUploadingStateMsg} message UploadingStateMsg message or plain object to encode
18607
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18608
+ * @returns {$protobuf.Writer} Writer
18609
+ */
18610
+ UploadingStateMsg.encode = function encode(message, writer) {
18611
+ if (!writer)
18612
+ writer = $Writer.create();
18613
+ if (message.localVersion != null && Object.hasOwnProperty.call(message, "localVersion"))
18614
+ $root.common.UInt64Value.encode(message.localVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
18615
+ if (message.remoteVersion != null && Object.hasOwnProperty.call(message, "remoteVersion"))
18616
+ $root.common.UInt64Value.encode(message.remoteVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
18617
+ if (message.bytesLeftToUpload != null && Object.hasOwnProperty.call(message, "bytesLeftToUpload"))
18618
+ $root.common.UInt64Value.encode(message.bytesLeftToUpload, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
18619
+ if (message.uploadStarted != null && Object.hasOwnProperty.call(message, "uploadStarted"))
18620
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.uploadStarted);
18621
+ return writer;
18622
+ };
18623
+
18624
+ /**
18625
+ * Encodes the specified UploadingStateMsg message, length delimited. Does not implicitly {@link file.UploadingStateMsg.verify|verify} messages.
18626
+ * @function encodeDelimited
18627
+ * @memberof file.UploadingStateMsg
18628
+ * @static
18629
+ * @param {file.IUploadingStateMsg} message UploadingStateMsg message or plain object to encode
18630
+ * @param {$protobuf.Writer} [writer] Writer to encode to
18631
+ * @returns {$protobuf.Writer} Writer
18632
+ */
18633
+ UploadingStateMsg.encodeDelimited = function encodeDelimited(message, writer) {
18634
+ return this.encode(message, writer).ldelim();
18635
+ };
18636
+
18637
+ /**
18638
+ * Decodes an UploadingStateMsg message from the specified reader or buffer.
18639
+ * @function decode
18640
+ * @memberof file.UploadingStateMsg
18641
+ * @static
18642
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18643
+ * @param {number} [length] Message length if known beforehand
18644
+ * @returns {file.UploadingStateMsg} UploadingStateMsg
18645
+ * @throws {Error} If the payload is not a reader or valid buffer
18646
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18647
+ */
18648
+ UploadingStateMsg.decode = function decode(reader, length, error) {
18649
+ if (!(reader instanceof $Reader))
18650
+ reader = $Reader.create(reader);
18651
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.file.UploadingStateMsg();
18652
+ while (reader.pos < end) {
18653
+ var tag = reader.uint32();
18654
+ if (tag === error)
18655
+ break;
18656
+ switch (tag >>> 3) {
18657
+ case 1: {
18658
+ message.localVersion = $root.common.UInt64Value.decode(reader, reader.uint32());
18659
+ break;
18660
+ }
18661
+ case 2: {
18662
+ message.remoteVersion = $root.common.UInt64Value.decode(reader, reader.uint32());
18663
+ break;
18664
+ }
18665
+ case 3: {
18666
+ message.bytesLeftToUpload = $root.common.UInt64Value.decode(reader, reader.uint32());
18667
+ break;
18668
+ }
18669
+ case 4: {
18670
+ message.uploadStarted = reader.bool();
18671
+ break;
18672
+ }
18673
+ default:
18674
+ reader.skipType(tag & 7);
18675
+ break;
18676
+ }
18677
+ }
18678
+ return message;
18679
+ };
18680
+
18681
+ /**
18682
+ * Decodes an UploadingStateMsg message from the specified reader or buffer, length delimited.
18683
+ * @function decodeDelimited
18684
+ * @memberof file.UploadingStateMsg
18685
+ * @static
18686
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
18687
+ * @returns {file.UploadingStateMsg} UploadingStateMsg
18688
+ * @throws {Error} If the payload is not a reader or valid buffer
18689
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
18690
+ */
18691
+ UploadingStateMsg.decodeDelimited = function decodeDelimited(reader) {
18692
+ if (!(reader instanceof $Reader))
18693
+ reader = new $Reader(reader);
18694
+ return this.decode(reader, reader.uint32());
18695
+ };
18696
+
18697
+ /**
18698
+ * Verifies an UploadingStateMsg message.
18699
+ * @function verify
18700
+ * @memberof file.UploadingStateMsg
18701
+ * @static
18702
+ * @param {Object.<string,*>} message Plain object to verify
18703
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
18704
+ */
18705
+ UploadingStateMsg.verify = function verify(message) {
18706
+ if (typeof message !== "object" || message === null)
18707
+ return "object expected";
18708
+ if (message.localVersion != null && message.hasOwnProperty("localVersion")) {
18709
+ var error = $root.common.UInt64Value.verify(message.localVersion);
18710
+ if (error)
18711
+ return "localVersion." + error;
18712
+ }
18713
+ if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion")) {
18714
+ var error = $root.common.UInt64Value.verify(message.remoteVersion);
18715
+ if (error)
18716
+ return "remoteVersion." + error;
18717
+ }
18718
+ if (message.bytesLeftToUpload != null && message.hasOwnProperty("bytesLeftToUpload")) {
18719
+ var error = $root.common.UInt64Value.verify(message.bytesLeftToUpload);
18720
+ if (error)
18721
+ return "bytesLeftToUpload." + error;
18722
+ }
18723
+ if (message.uploadStarted != null && message.hasOwnProperty("uploadStarted"))
18724
+ if (typeof message.uploadStarted !== "boolean")
18725
+ return "uploadStarted: boolean expected";
18726
+ return null;
18727
+ };
18728
+
18729
+ /**
18730
+ * Creates an UploadingStateMsg message from a plain object. Also converts values to their respective internal types.
18731
+ * @function fromObject
18732
+ * @memberof file.UploadingStateMsg
18733
+ * @static
18734
+ * @param {Object.<string,*>} object Plain object
18735
+ * @returns {file.UploadingStateMsg} UploadingStateMsg
18736
+ */
18737
+ UploadingStateMsg.fromObject = function fromObject(object) {
18738
+ if (object instanceof $root.file.UploadingStateMsg)
18739
+ return object;
18740
+ var message = new $root.file.UploadingStateMsg();
18741
+ if (object.localVersion != null) {
18742
+ if (typeof object.localVersion !== "object")
18743
+ throw TypeError(".file.UploadingStateMsg.localVersion: object expected");
18744
+ message.localVersion = $root.common.UInt64Value.fromObject(object.localVersion);
18745
+ }
18746
+ if (object.remoteVersion != null) {
18747
+ if (typeof object.remoteVersion !== "object")
18748
+ throw TypeError(".file.UploadingStateMsg.remoteVersion: object expected");
18749
+ message.remoteVersion = $root.common.UInt64Value.fromObject(object.remoteVersion);
18750
+ }
18751
+ if (object.bytesLeftToUpload != null) {
18752
+ if (typeof object.bytesLeftToUpload !== "object")
18753
+ throw TypeError(".file.UploadingStateMsg.bytesLeftToUpload: object expected");
18754
+ message.bytesLeftToUpload = $root.common.UInt64Value.fromObject(object.bytesLeftToUpload);
18755
+ }
18756
+ if (object.uploadStarted != null)
18757
+ message.uploadStarted = Boolean(object.uploadStarted);
18758
+ return message;
18759
+ };
18760
+
18761
+ /**
18762
+ * Creates a plain object from an UploadingStateMsg message. Also converts values to other types if specified.
18763
+ * @function toObject
18764
+ * @memberof file.UploadingStateMsg
18765
+ * @static
18766
+ * @param {file.UploadingStateMsg} message UploadingStateMsg
18767
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
18768
+ * @returns {Object.<string,*>} Plain object
18769
+ */
18770
+ UploadingStateMsg.toObject = function toObject(message, options) {
18771
+ if (!options)
18772
+ options = {};
18773
+ var object = {};
18774
+ if (options.defaults) {
18775
+ object.localVersion = null;
18776
+ object.remoteVersion = null;
18777
+ object.bytesLeftToUpload = null;
18778
+ object.uploadStarted = false;
18779
+ }
18780
+ if (message.localVersion != null && message.hasOwnProperty("localVersion"))
18781
+ object.localVersion = $root.common.UInt64Value.toObject(message.localVersion, options);
18782
+ if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
18783
+ object.remoteVersion = $root.common.UInt64Value.toObject(message.remoteVersion, options);
18784
+ if (message.bytesLeftToUpload != null && message.hasOwnProperty("bytesLeftToUpload"))
18785
+ object.bytesLeftToUpload = $root.common.UInt64Value.toObject(message.bytesLeftToUpload, options);
18786
+ if (message.uploadStarted != null && message.hasOwnProperty("uploadStarted"))
18787
+ object.uploadStarted = message.uploadStarted;
18788
+ return object;
18789
+ };
18790
+
18791
+ /**
18792
+ * Converts this UploadingStateMsg to JSON.
18793
+ * @function toJSON
18794
+ * @memberof file.UploadingStateMsg
18795
+ * @instance
18796
+ * @returns {Object.<string,*>} JSON object
18797
+ */
18798
+ UploadingStateMsg.prototype.toJSON = function toJSON() {
18799
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18800
+ };
18801
+
18802
+ /**
18803
+ * Gets the default type url for UploadingStateMsg
18804
+ * @function getTypeUrl
18805
+ * @memberof file.UploadingStateMsg
18806
+ * @static
18807
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
18808
+ * @returns {string} The default type url
18809
+ */
18810
+ UploadingStateMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18811
+ if (typeUrlPrefix === undefined) {
18812
+ typeUrlPrefix = "type.googleapis.com";
18813
+ }
18814
+ return typeUrlPrefix + "/file.UploadingStateMsg";
18815
+ };
18816
+
18817
+ return UploadingStateMsg;
18818
+ })();
18819
+
18502
18820
  file.StatsMsg = (function() {
18503
18821
 
18504
18822
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.43.5",
3
+ "version": "0.43.7",
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",
package/protos/file.proto CHANGED
@@ -23,6 +23,7 @@ message SyncStatusMsg {
23
23
  SyncVersionsBranchMsg synced = 3;
24
24
  SyncVersionsBranchMsg remote = 4;
25
25
  common.BooleanValue exists_in_synced_parent = 5;
26
+ UploadingStateMsg uploading = 6;
26
27
  }
27
28
 
28
29
  message SyncVersionsBranchMsg {
@@ -31,6 +32,12 @@ message SyncVersionsBranchMsg {
31
32
  common.BooleanValue is_archived = 3;
32
33
  }
33
34
 
35
+ message UploadingStateMsg {
36
+ common.UInt64Value local_version = 1;
37
+ common.UInt64Value remote_version = 2;
38
+ common.UInt64Value bytes_left_to_upload = 3;
39
+ bool upload_started = 4;
40
+ }
34
41
 
35
42
  // ==== ReadonlyFile referable as impl object ====
36
43