core-3nweb-client-lib 0.43.6 → 0.43.8

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.
@@ -355,6 +355,7 @@ $root.file = (function() {
355
355
  * @property {file.ISyncVersionsBranchMsg|null} [synced] SyncStatusMsg synced
356
356
  * @property {file.ISyncVersionsBranchMsg|null} [remote] SyncStatusMsg remote
357
357
  * @property {common.IBooleanValue|null} [existsInSyncedParent] SyncStatusMsg existsInSyncedParent
358
+ * @property {file.IUploadingStateMsg|null} [uploading] SyncStatusMsg uploading
358
359
  */
359
360
 
360
361
  /**
@@ -412,6 +413,14 @@ $root.file = (function() {
412
413
  */
413
414
  SyncStatusMsg.prototype.existsInSyncedParent = null;
414
415
 
416
+ /**
417
+ * SyncStatusMsg uploading.
418
+ * @member {file.IUploadingStateMsg|null|undefined} uploading
419
+ * @memberof file.SyncStatusMsg
420
+ * @instance
421
+ */
422
+ SyncStatusMsg.prototype.uploading = null;
423
+
415
424
  /**
416
425
  * Creates a new SyncStatusMsg instance using the specified properties.
417
426
  * @function create
@@ -446,6 +455,8 @@ $root.file = (function() {
446
455
  $root.file.SyncVersionsBranchMsg.encode(message.remote, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
447
456
  if (message.existsInSyncedParent != null && Object.hasOwnProperty.call(message, "existsInSyncedParent"))
448
457
  $root.common.BooleanValue.encode(message.existsInSyncedParent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
458
+ if (message.uploading != null && Object.hasOwnProperty.call(message, "uploading"))
459
+ $root.file.UploadingStateMsg.encode(message.uploading, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
449
460
  return writer;
450
461
  };
451
462
 
@@ -502,6 +513,10 @@ $root.file = (function() {
502
513
  message.existsInSyncedParent = $root.common.BooleanValue.decode(reader, reader.uint32());
503
514
  break;
504
515
  }
516
+ case 6: {
517
+ message.uploading = $root.file.UploadingStateMsg.decode(reader, reader.uint32());
518
+ break;
519
+ }
505
520
  default:
506
521
  reader.skipType(tag & 7);
507
522
  break;
@@ -560,6 +575,11 @@ $root.file = (function() {
560
575
  if (error)
561
576
  return "existsInSyncedParent." + error;
562
577
  }
578
+ if (message.uploading != null && message.hasOwnProperty("uploading")) {
579
+ var error = $root.file.UploadingStateMsg.verify(message.uploading);
580
+ if (error)
581
+ return "uploading." + error;
582
+ }
563
583
  return null;
564
584
  };
565
585
 
@@ -597,6 +617,11 @@ $root.file = (function() {
597
617
  throw TypeError(".file.SyncStatusMsg.existsInSyncedParent: object expected");
598
618
  message.existsInSyncedParent = $root.common.BooleanValue.fromObject(object.existsInSyncedParent);
599
619
  }
620
+ if (object.uploading != null) {
621
+ if (typeof object.uploading !== "object")
622
+ throw TypeError(".file.SyncStatusMsg.uploading: object expected");
623
+ message.uploading = $root.file.UploadingStateMsg.fromObject(object.uploading);
624
+ }
600
625
  return message;
601
626
  };
602
627
 
@@ -619,6 +644,7 @@ $root.file = (function() {
619
644
  object.synced = null;
620
645
  object.remote = null;
621
646
  object.existsInSyncedParent = null;
647
+ object.uploading = null;
622
648
  }
623
649
  if (message.state != null && message.hasOwnProperty("state"))
624
650
  object.state = message.state;
@@ -630,6 +656,8 @@ $root.file = (function() {
630
656
  object.remote = $root.file.SyncVersionsBranchMsg.toObject(message.remote, options);
631
657
  if (message.existsInSyncedParent != null && message.hasOwnProperty("existsInSyncedParent"))
632
658
  object.existsInSyncedParent = $root.common.BooleanValue.toObject(message.existsInSyncedParent, options);
659
+ if (message.uploading != null && message.hasOwnProperty("uploading"))
660
+ object.uploading = $root.file.UploadingStateMsg.toObject(message.uploading, options);
633
661
  return object;
634
662
  };
635
663
 
@@ -959,6 +987,323 @@ $root.file = (function() {
959
987
  return SyncVersionsBranchMsg;
960
988
  })();
961
989
 
990
+ file.UploadingStateMsg = (function() {
991
+
992
+ /**
993
+ * Properties of an UploadingStateMsg.
994
+ * @memberof file
995
+ * @interface IUploadingStateMsg
996
+ * @property {number|Long|null} [localVersion] UploadingStateMsg localVersion
997
+ * @property {number|Long|null} [remoteVersion] UploadingStateMsg remoteVersion
998
+ * @property {number|Long|null} [bytesLeftToUpload] UploadingStateMsg bytesLeftToUpload
999
+ * @property {boolean|null} [uploadStarted] UploadingStateMsg uploadStarted
1000
+ */
1001
+
1002
+ /**
1003
+ * Constructs a new UploadingStateMsg.
1004
+ * @memberof file
1005
+ * @classdesc Represents an UploadingStateMsg.
1006
+ * @implements IUploadingStateMsg
1007
+ * @constructor
1008
+ * @param {file.IUploadingStateMsg=} [properties] Properties to set
1009
+ */
1010
+ function UploadingStateMsg(properties) {
1011
+ if (properties)
1012
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1013
+ if (properties[keys[i]] != null)
1014
+ this[keys[i]] = properties[keys[i]];
1015
+ }
1016
+
1017
+ /**
1018
+ * UploadingStateMsg localVersion.
1019
+ * @member {number|Long} localVersion
1020
+ * @memberof file.UploadingStateMsg
1021
+ * @instance
1022
+ */
1023
+ UploadingStateMsg.prototype.localVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1024
+
1025
+ /**
1026
+ * UploadingStateMsg remoteVersion.
1027
+ * @member {number|Long} remoteVersion
1028
+ * @memberof file.UploadingStateMsg
1029
+ * @instance
1030
+ */
1031
+ UploadingStateMsg.prototype.remoteVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1032
+
1033
+ /**
1034
+ * UploadingStateMsg bytesLeftToUpload.
1035
+ * @member {number|Long} bytesLeftToUpload
1036
+ * @memberof file.UploadingStateMsg
1037
+ * @instance
1038
+ */
1039
+ UploadingStateMsg.prototype.bytesLeftToUpload = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1040
+
1041
+ /**
1042
+ * UploadingStateMsg uploadStarted.
1043
+ * @member {boolean} uploadStarted
1044
+ * @memberof file.UploadingStateMsg
1045
+ * @instance
1046
+ */
1047
+ UploadingStateMsg.prototype.uploadStarted = false;
1048
+
1049
+ /**
1050
+ * Creates a new UploadingStateMsg instance using the specified properties.
1051
+ * @function create
1052
+ * @memberof file.UploadingStateMsg
1053
+ * @static
1054
+ * @param {file.IUploadingStateMsg=} [properties] Properties to set
1055
+ * @returns {file.UploadingStateMsg} UploadingStateMsg instance
1056
+ */
1057
+ UploadingStateMsg.create = function create(properties) {
1058
+ return new UploadingStateMsg(properties);
1059
+ };
1060
+
1061
+ /**
1062
+ * Encodes the specified UploadingStateMsg message. Does not implicitly {@link file.UploadingStateMsg.verify|verify} messages.
1063
+ * @function encode
1064
+ * @memberof file.UploadingStateMsg
1065
+ * @static
1066
+ * @param {file.IUploadingStateMsg} message UploadingStateMsg message or plain object to encode
1067
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1068
+ * @returns {$protobuf.Writer} Writer
1069
+ */
1070
+ UploadingStateMsg.encode = function encode(message, writer) {
1071
+ if (!writer)
1072
+ writer = $Writer.create();
1073
+ if (message.localVersion != null && Object.hasOwnProperty.call(message, "localVersion"))
1074
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.localVersion);
1075
+ if (message.remoteVersion != null && Object.hasOwnProperty.call(message, "remoteVersion"))
1076
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.remoteVersion);
1077
+ if (message.bytesLeftToUpload != null && Object.hasOwnProperty.call(message, "bytesLeftToUpload"))
1078
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.bytesLeftToUpload);
1079
+ if (message.uploadStarted != null && Object.hasOwnProperty.call(message, "uploadStarted"))
1080
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.uploadStarted);
1081
+ return writer;
1082
+ };
1083
+
1084
+ /**
1085
+ * Encodes the specified UploadingStateMsg message, length delimited. Does not implicitly {@link file.UploadingStateMsg.verify|verify} messages.
1086
+ * @function encodeDelimited
1087
+ * @memberof file.UploadingStateMsg
1088
+ * @static
1089
+ * @param {file.IUploadingStateMsg} message UploadingStateMsg message or plain object to encode
1090
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1091
+ * @returns {$protobuf.Writer} Writer
1092
+ */
1093
+ UploadingStateMsg.encodeDelimited = function encodeDelimited(message, writer) {
1094
+ return this.encode(message, writer).ldelim();
1095
+ };
1096
+
1097
+ /**
1098
+ * Decodes an UploadingStateMsg message from the specified reader or buffer.
1099
+ * @function decode
1100
+ * @memberof file.UploadingStateMsg
1101
+ * @static
1102
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1103
+ * @param {number} [length] Message length if known beforehand
1104
+ * @returns {file.UploadingStateMsg} UploadingStateMsg
1105
+ * @throws {Error} If the payload is not a reader or valid buffer
1106
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1107
+ */
1108
+ UploadingStateMsg.decode = function decode(reader, length, error) {
1109
+ if (!(reader instanceof $Reader))
1110
+ reader = $Reader.create(reader);
1111
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.file.UploadingStateMsg();
1112
+ while (reader.pos < end) {
1113
+ var tag = reader.uint32();
1114
+ if (tag === error)
1115
+ break;
1116
+ switch (tag >>> 3) {
1117
+ case 1: {
1118
+ message.localVersion = reader.uint64();
1119
+ break;
1120
+ }
1121
+ case 2: {
1122
+ message.remoteVersion = reader.uint64();
1123
+ break;
1124
+ }
1125
+ case 3: {
1126
+ message.bytesLeftToUpload = reader.uint64();
1127
+ break;
1128
+ }
1129
+ case 4: {
1130
+ message.uploadStarted = reader.bool();
1131
+ break;
1132
+ }
1133
+ default:
1134
+ reader.skipType(tag & 7);
1135
+ break;
1136
+ }
1137
+ }
1138
+ return message;
1139
+ };
1140
+
1141
+ /**
1142
+ * Decodes an UploadingStateMsg message from the specified reader or buffer, length delimited.
1143
+ * @function decodeDelimited
1144
+ * @memberof file.UploadingStateMsg
1145
+ * @static
1146
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1147
+ * @returns {file.UploadingStateMsg} UploadingStateMsg
1148
+ * @throws {Error} If the payload is not a reader or valid buffer
1149
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1150
+ */
1151
+ UploadingStateMsg.decodeDelimited = function decodeDelimited(reader) {
1152
+ if (!(reader instanceof $Reader))
1153
+ reader = new $Reader(reader);
1154
+ return this.decode(reader, reader.uint32());
1155
+ };
1156
+
1157
+ /**
1158
+ * Verifies an UploadingStateMsg message.
1159
+ * @function verify
1160
+ * @memberof file.UploadingStateMsg
1161
+ * @static
1162
+ * @param {Object.<string,*>} message Plain object to verify
1163
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1164
+ */
1165
+ UploadingStateMsg.verify = function verify(message) {
1166
+ if (typeof message !== "object" || message === null)
1167
+ return "object expected";
1168
+ if (message.localVersion != null && message.hasOwnProperty("localVersion"))
1169
+ if (!$util.isInteger(message.localVersion) && !(message.localVersion && $util.isInteger(message.localVersion.low) && $util.isInteger(message.localVersion.high)))
1170
+ return "localVersion: integer|Long expected";
1171
+ if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
1172
+ if (!$util.isInteger(message.remoteVersion) && !(message.remoteVersion && $util.isInteger(message.remoteVersion.low) && $util.isInteger(message.remoteVersion.high)))
1173
+ return "remoteVersion: integer|Long expected";
1174
+ if (message.bytesLeftToUpload != null && message.hasOwnProperty("bytesLeftToUpload"))
1175
+ if (!$util.isInteger(message.bytesLeftToUpload) && !(message.bytesLeftToUpload && $util.isInteger(message.bytesLeftToUpload.low) && $util.isInteger(message.bytesLeftToUpload.high)))
1176
+ return "bytesLeftToUpload: integer|Long expected";
1177
+ if (message.uploadStarted != null && message.hasOwnProperty("uploadStarted"))
1178
+ if (typeof message.uploadStarted !== "boolean")
1179
+ return "uploadStarted: boolean expected";
1180
+ return null;
1181
+ };
1182
+
1183
+ /**
1184
+ * Creates an UploadingStateMsg message from a plain object. Also converts values to their respective internal types.
1185
+ * @function fromObject
1186
+ * @memberof file.UploadingStateMsg
1187
+ * @static
1188
+ * @param {Object.<string,*>} object Plain object
1189
+ * @returns {file.UploadingStateMsg} UploadingStateMsg
1190
+ */
1191
+ UploadingStateMsg.fromObject = function fromObject(object) {
1192
+ if (object instanceof $root.file.UploadingStateMsg)
1193
+ return object;
1194
+ var message = new $root.file.UploadingStateMsg();
1195
+ if (object.localVersion != null)
1196
+ if ($util.Long)
1197
+ (message.localVersion = $util.Long.fromValue(object.localVersion)).unsigned = true;
1198
+ else if (typeof object.localVersion === "string")
1199
+ message.localVersion = parseInt(object.localVersion, 10);
1200
+ else if (typeof object.localVersion === "number")
1201
+ message.localVersion = object.localVersion;
1202
+ else if (typeof object.localVersion === "object")
1203
+ message.localVersion = new $util.LongBits(object.localVersion.low >>> 0, object.localVersion.high >>> 0).toNumber(true);
1204
+ if (object.remoteVersion != null)
1205
+ if ($util.Long)
1206
+ (message.remoteVersion = $util.Long.fromValue(object.remoteVersion)).unsigned = true;
1207
+ else if (typeof object.remoteVersion === "string")
1208
+ message.remoteVersion = parseInt(object.remoteVersion, 10);
1209
+ else if (typeof object.remoteVersion === "number")
1210
+ message.remoteVersion = object.remoteVersion;
1211
+ else if (typeof object.remoteVersion === "object")
1212
+ message.remoteVersion = new $util.LongBits(object.remoteVersion.low >>> 0, object.remoteVersion.high >>> 0).toNumber(true);
1213
+ if (object.bytesLeftToUpload != null)
1214
+ if ($util.Long)
1215
+ (message.bytesLeftToUpload = $util.Long.fromValue(object.bytesLeftToUpload)).unsigned = true;
1216
+ else if (typeof object.bytesLeftToUpload === "string")
1217
+ message.bytesLeftToUpload = parseInt(object.bytesLeftToUpload, 10);
1218
+ else if (typeof object.bytesLeftToUpload === "number")
1219
+ message.bytesLeftToUpload = object.bytesLeftToUpload;
1220
+ else if (typeof object.bytesLeftToUpload === "object")
1221
+ message.bytesLeftToUpload = new $util.LongBits(object.bytesLeftToUpload.low >>> 0, object.bytesLeftToUpload.high >>> 0).toNumber(true);
1222
+ if (object.uploadStarted != null)
1223
+ message.uploadStarted = Boolean(object.uploadStarted);
1224
+ return message;
1225
+ };
1226
+
1227
+ /**
1228
+ * Creates a plain object from an UploadingStateMsg message. Also converts values to other types if specified.
1229
+ * @function toObject
1230
+ * @memberof file.UploadingStateMsg
1231
+ * @static
1232
+ * @param {file.UploadingStateMsg} message UploadingStateMsg
1233
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1234
+ * @returns {Object.<string,*>} Plain object
1235
+ */
1236
+ UploadingStateMsg.toObject = function toObject(message, options) {
1237
+ if (!options)
1238
+ options = {};
1239
+ var object = {};
1240
+ if (options.defaults) {
1241
+ if ($util.Long) {
1242
+ var long = new $util.Long(0, 0, true);
1243
+ object.localVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1244
+ } else
1245
+ object.localVersion = options.longs === String ? "0" : 0;
1246
+ if ($util.Long) {
1247
+ var long = new $util.Long(0, 0, true);
1248
+ object.remoteVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1249
+ } else
1250
+ object.remoteVersion = options.longs === String ? "0" : 0;
1251
+ if ($util.Long) {
1252
+ var long = new $util.Long(0, 0, true);
1253
+ object.bytesLeftToUpload = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1254
+ } else
1255
+ object.bytesLeftToUpload = options.longs === String ? "0" : 0;
1256
+ object.uploadStarted = false;
1257
+ }
1258
+ if (message.localVersion != null && message.hasOwnProperty("localVersion"))
1259
+ if (typeof message.localVersion === "number")
1260
+ object.localVersion = options.longs === String ? String(message.localVersion) : message.localVersion;
1261
+ else
1262
+ object.localVersion = options.longs === String ? $util.Long.prototype.toString.call(message.localVersion) : options.longs === Number ? new $util.LongBits(message.localVersion.low >>> 0, message.localVersion.high >>> 0).toNumber(true) : message.localVersion;
1263
+ if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
1264
+ if (typeof message.remoteVersion === "number")
1265
+ object.remoteVersion = options.longs === String ? String(message.remoteVersion) : message.remoteVersion;
1266
+ else
1267
+ object.remoteVersion = options.longs === String ? $util.Long.prototype.toString.call(message.remoteVersion) : options.longs === Number ? new $util.LongBits(message.remoteVersion.low >>> 0, message.remoteVersion.high >>> 0).toNumber(true) : message.remoteVersion;
1268
+ if (message.bytesLeftToUpload != null && message.hasOwnProperty("bytesLeftToUpload"))
1269
+ if (typeof message.bytesLeftToUpload === "number")
1270
+ object.bytesLeftToUpload = options.longs === String ? String(message.bytesLeftToUpload) : message.bytesLeftToUpload;
1271
+ else
1272
+ object.bytesLeftToUpload = options.longs === String ? $util.Long.prototype.toString.call(message.bytesLeftToUpload) : options.longs === Number ? new $util.LongBits(message.bytesLeftToUpload.low >>> 0, message.bytesLeftToUpload.high >>> 0).toNumber(true) : message.bytesLeftToUpload;
1273
+ if (message.uploadStarted != null && message.hasOwnProperty("uploadStarted"))
1274
+ object.uploadStarted = message.uploadStarted;
1275
+ return object;
1276
+ };
1277
+
1278
+ /**
1279
+ * Converts this UploadingStateMsg to JSON.
1280
+ * @function toJSON
1281
+ * @memberof file.UploadingStateMsg
1282
+ * @instance
1283
+ * @returns {Object.<string,*>} JSON object
1284
+ */
1285
+ UploadingStateMsg.prototype.toJSON = function toJSON() {
1286
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1287
+ };
1288
+
1289
+ /**
1290
+ * Gets the default type url for UploadingStateMsg
1291
+ * @function getTypeUrl
1292
+ * @memberof file.UploadingStateMsg
1293
+ * @static
1294
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1295
+ * @returns {string} The default type url
1296
+ */
1297
+ UploadingStateMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1298
+ if (typeUrlPrefix === undefined) {
1299
+ typeUrlPrefix = "type.googleapis.com";
1300
+ }
1301
+ return typeUrlPrefix + "/file.UploadingStateMsg";
1302
+ };
1303
+
1304
+ return UploadingStateMsg;
1305
+ })();
1306
+
962
1307
  file.StatsMsg = (function() {
963
1308
 
964
1309
  /**