core-3nweb-client-lib 0.43.9 → 0.43.12

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 (58) hide show
  1. package/build/api-defs/files.d.ts +32 -8
  2. package/build/api-defs/web3n.d.ts +2 -0
  3. package/build/core/asmail/inbox/index.js +1 -1
  4. package/build/core/asmail/inbox/msg-downloader.d.ts +2 -12
  5. package/build/core/asmail/inbox/msg-downloader.js +13 -46
  6. package/build/core/storage/synced/downloader.d.ts +6 -15
  7. package/build/core/storage/synced/downloader.js +25 -48
  8. package/build/core/storage/synced/obj-files.d.ts +4 -2
  9. package/build/core/storage/synced/obj-files.js +7 -7
  10. package/build/core/storage/synced/storage.d.ts +4 -2
  11. package/build/core/storage/synced/storage.js +2 -2
  12. package/build/core/storage/synced/upsyncer.d.ts +2 -4
  13. package/build/core/storage/synced/upsyncer.js +19 -13
  14. package/build/core-ipc/file.d.ts +10 -0
  15. package/build/core-ipc/file.js +23 -13
  16. package/build/core-ipc/fs.js +15 -8
  17. package/build/lib-client/3nstorage/storage-owner.js +36 -29
  18. package/build/lib-client/3nweb-signup.js +7 -7
  19. package/build/lib-client/asmail/recipient.js +14 -11
  20. package/build/lib-client/asmail/sender.js +24 -25
  21. package/build/lib-client/asmail/service-config.js +3 -6
  22. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  23. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  24. package/build/lib-client/fs-utils/files.js +4 -4
  25. package/build/lib-client/mailer-id/login.js +7 -7
  26. package/build/lib-client/mailer-id/provisioner.js +9 -7
  27. package/build/lib-client/objs-on-disk/file-writing-proc.d.ts +1 -1
  28. package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +51 -3
  29. package/build/lib-client/objs-on-disk/obj-on-disk.js +414 -34
  30. package/build/lib-client/request-utils.d.ts +0 -7
  31. package/build/lib-client/request-utils.js +16 -11
  32. package/build/lib-client/service-locator.js +11 -8
  33. package/build/lib-client/user-with-mid-session.js +2 -6
  34. package/build/lib-client/user-with-pkl-session.js +25 -24
  35. package/build/lib-client/xsp-fs/common.d.ts +8 -3
  36. package/build/lib-client/xsp-fs/common.js +1 -1
  37. package/build/lib-client/xsp-fs/file.d.ts +3 -1
  38. package/build/lib-client/xsp-fs/file.js +4 -4
  39. package/build/lib-client/xsp-fs/folder-node.d.ts +1 -1
  40. package/build/lib-client/xsp-fs/folder-node.js +4 -4
  41. package/build/lib-client/xsp-fs/fs.d.ts +3 -1
  42. package/build/lib-client/xsp-fs/fs.js +4 -4
  43. package/build/lib-client/xsp-fs/node-in-fs.d.ts +6 -4
  44. package/build/lib-client/xsp-fs/node-in-fs.js +14 -9
  45. package/build/lib-common/buffer-utils.js +4 -1
  46. package/build/lib-common/exceptions/http.d.ts +11 -1
  47. package/build/lib-common/exceptions/http.js +10 -2
  48. package/build/lib-common/objs-on-disk/utils.d.ts +1 -1
  49. package/build/lib-common/processes/labelled-exec-pools.d.ts +1 -1
  50. package/build/lib-common/processes/labelled-exec-pools.js +8 -2
  51. package/build/protos/asmail.proto.js +545 -116
  52. package/build/protos/file.proto.js +485 -56
  53. package/build/protos/fs.proto.js +545 -116
  54. package/package.json +1 -1
  55. package/protos/file.proto +8 -2
  56. package/protos/fs.proto +3 -3
  57. /package/build/lib-common/objs-on-disk/{obj-file.d.ts → obj-version-file.d.ts} +0 -0
  58. /package/build/lib-common/objs-on-disk/{obj-file.js → obj-version-file.js} +0 -0
@@ -8377,24 +8377,24 @@ $root.file = (function() {
8377
8377
  return FileSyncIsOnDiskReplyBody;
8378
8378
  })();
8379
8379
 
8380
- file.FileSyncDownloadRequestBody = (function() {
8380
+ file.FileSyncStartDownloadRequestBody = (function() {
8381
8381
 
8382
8382
  /**
8383
- * Properties of a FileSyncDownloadRequestBody.
8383
+ * Properties of a FileSyncStartDownloadRequestBody.
8384
8384
  * @memberof file
8385
- * @interface IFileSyncDownloadRequestBody
8386
- * @property {number|Long|null} [version] FileSyncDownloadRequestBody version
8385
+ * @interface IFileSyncStartDownloadRequestBody
8386
+ * @property {number|Long|null} [version] FileSyncStartDownloadRequestBody version
8387
8387
  */
8388
8388
 
8389
8389
  /**
8390
- * Constructs a new FileSyncDownloadRequestBody.
8390
+ * Constructs a new FileSyncStartDownloadRequestBody.
8391
8391
  * @memberof file
8392
- * @classdesc Represents a FileSyncDownloadRequestBody.
8393
- * @implements IFileSyncDownloadRequestBody
8392
+ * @classdesc Represents a FileSyncStartDownloadRequestBody.
8393
+ * @implements IFileSyncStartDownloadRequestBody
8394
8394
  * @constructor
8395
- * @param {file.IFileSyncDownloadRequestBody=} [properties] Properties to set
8395
+ * @param {file.IFileSyncStartDownloadRequestBody=} [properties] Properties to set
8396
8396
  */
8397
- function FileSyncDownloadRequestBody(properties) {
8397
+ function FileSyncStartDownloadRequestBody(properties) {
8398
8398
  if (properties)
8399
8399
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8400
8400
  if (properties[keys[i]] != null)
@@ -8402,35 +8402,35 @@ $root.file = (function() {
8402
8402
  }
8403
8403
 
8404
8404
  /**
8405
- * FileSyncDownloadRequestBody version.
8405
+ * FileSyncStartDownloadRequestBody version.
8406
8406
  * @member {number|Long} version
8407
- * @memberof file.FileSyncDownloadRequestBody
8407
+ * @memberof file.FileSyncStartDownloadRequestBody
8408
8408
  * @instance
8409
8409
  */
8410
- FileSyncDownloadRequestBody.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8410
+ FileSyncStartDownloadRequestBody.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8411
8411
 
8412
8412
  /**
8413
- * Creates a new FileSyncDownloadRequestBody instance using the specified properties.
8413
+ * Creates a new FileSyncStartDownloadRequestBody instance using the specified properties.
8414
8414
  * @function create
8415
- * @memberof file.FileSyncDownloadRequestBody
8415
+ * @memberof file.FileSyncStartDownloadRequestBody
8416
8416
  * @static
8417
- * @param {file.IFileSyncDownloadRequestBody=} [properties] Properties to set
8418
- * @returns {file.FileSyncDownloadRequestBody} FileSyncDownloadRequestBody instance
8417
+ * @param {file.IFileSyncStartDownloadRequestBody=} [properties] Properties to set
8418
+ * @returns {file.FileSyncStartDownloadRequestBody} FileSyncStartDownloadRequestBody instance
8419
8419
  */
8420
- FileSyncDownloadRequestBody.create = function create(properties) {
8421
- return new FileSyncDownloadRequestBody(properties);
8420
+ FileSyncStartDownloadRequestBody.create = function create(properties) {
8421
+ return new FileSyncStartDownloadRequestBody(properties);
8422
8422
  };
8423
8423
 
8424
8424
  /**
8425
- * Encodes the specified FileSyncDownloadRequestBody message. Does not implicitly {@link file.FileSyncDownloadRequestBody.verify|verify} messages.
8425
+ * Encodes the specified FileSyncStartDownloadRequestBody message. Does not implicitly {@link file.FileSyncStartDownloadRequestBody.verify|verify} messages.
8426
8426
  * @function encode
8427
- * @memberof file.FileSyncDownloadRequestBody
8427
+ * @memberof file.FileSyncStartDownloadRequestBody
8428
8428
  * @static
8429
- * @param {file.IFileSyncDownloadRequestBody} message FileSyncDownloadRequestBody message or plain object to encode
8429
+ * @param {file.IFileSyncStartDownloadRequestBody} message FileSyncStartDownloadRequestBody message or plain object to encode
8430
8430
  * @param {$protobuf.Writer} [writer] Writer to encode to
8431
8431
  * @returns {$protobuf.Writer} Writer
8432
8432
  */
8433
- FileSyncDownloadRequestBody.encode = function encode(message, writer) {
8433
+ FileSyncStartDownloadRequestBody.encode = function encode(message, writer) {
8434
8434
  if (!writer)
8435
8435
  writer = $Writer.create();
8436
8436
  if (message.version != null && Object.hasOwnProperty.call(message, "version"))
@@ -8439,33 +8439,33 @@ $root.file = (function() {
8439
8439
  };
8440
8440
 
8441
8441
  /**
8442
- * Encodes the specified FileSyncDownloadRequestBody message, length delimited. Does not implicitly {@link file.FileSyncDownloadRequestBody.verify|verify} messages.
8442
+ * Encodes the specified FileSyncStartDownloadRequestBody message, length delimited. Does not implicitly {@link file.FileSyncStartDownloadRequestBody.verify|verify} messages.
8443
8443
  * @function encodeDelimited
8444
- * @memberof file.FileSyncDownloadRequestBody
8444
+ * @memberof file.FileSyncStartDownloadRequestBody
8445
8445
  * @static
8446
- * @param {file.IFileSyncDownloadRequestBody} message FileSyncDownloadRequestBody message or plain object to encode
8446
+ * @param {file.IFileSyncStartDownloadRequestBody} message FileSyncStartDownloadRequestBody message or plain object to encode
8447
8447
  * @param {$protobuf.Writer} [writer] Writer to encode to
8448
8448
  * @returns {$protobuf.Writer} Writer
8449
8449
  */
8450
- FileSyncDownloadRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
8450
+ FileSyncStartDownloadRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
8451
8451
  return this.encode(message, writer).ldelim();
8452
8452
  };
8453
8453
 
8454
8454
  /**
8455
- * Decodes a FileSyncDownloadRequestBody message from the specified reader or buffer.
8455
+ * Decodes a FileSyncStartDownloadRequestBody message from the specified reader or buffer.
8456
8456
  * @function decode
8457
- * @memberof file.FileSyncDownloadRequestBody
8457
+ * @memberof file.FileSyncStartDownloadRequestBody
8458
8458
  * @static
8459
8459
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8460
8460
  * @param {number} [length] Message length if known beforehand
8461
- * @returns {file.FileSyncDownloadRequestBody} FileSyncDownloadRequestBody
8461
+ * @returns {file.FileSyncStartDownloadRequestBody} FileSyncStartDownloadRequestBody
8462
8462
  * @throws {Error} If the payload is not a reader or valid buffer
8463
8463
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
8464
8464
  */
8465
- FileSyncDownloadRequestBody.decode = function decode(reader, length, error) {
8465
+ FileSyncStartDownloadRequestBody.decode = function decode(reader, length, error) {
8466
8466
  if (!(reader instanceof $Reader))
8467
8467
  reader = $Reader.create(reader);
8468
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.file.FileSyncDownloadRequestBody();
8468
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.file.FileSyncStartDownloadRequestBody();
8469
8469
  while (reader.pos < end) {
8470
8470
  var tag = reader.uint32();
8471
8471
  if (tag === error)
@@ -8484,30 +8484,30 @@ $root.file = (function() {
8484
8484
  };
8485
8485
 
8486
8486
  /**
8487
- * Decodes a FileSyncDownloadRequestBody message from the specified reader or buffer, length delimited.
8487
+ * Decodes a FileSyncStartDownloadRequestBody message from the specified reader or buffer, length delimited.
8488
8488
  * @function decodeDelimited
8489
- * @memberof file.FileSyncDownloadRequestBody
8489
+ * @memberof file.FileSyncStartDownloadRequestBody
8490
8490
  * @static
8491
8491
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8492
- * @returns {file.FileSyncDownloadRequestBody} FileSyncDownloadRequestBody
8492
+ * @returns {file.FileSyncStartDownloadRequestBody} FileSyncStartDownloadRequestBody
8493
8493
  * @throws {Error} If the payload is not a reader or valid buffer
8494
8494
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
8495
8495
  */
8496
- FileSyncDownloadRequestBody.decodeDelimited = function decodeDelimited(reader) {
8496
+ FileSyncStartDownloadRequestBody.decodeDelimited = function decodeDelimited(reader) {
8497
8497
  if (!(reader instanceof $Reader))
8498
8498
  reader = new $Reader(reader);
8499
8499
  return this.decode(reader, reader.uint32());
8500
8500
  };
8501
8501
 
8502
8502
  /**
8503
- * Verifies a FileSyncDownloadRequestBody message.
8503
+ * Verifies a FileSyncStartDownloadRequestBody message.
8504
8504
  * @function verify
8505
- * @memberof file.FileSyncDownloadRequestBody
8505
+ * @memberof file.FileSyncStartDownloadRequestBody
8506
8506
  * @static
8507
8507
  * @param {Object.<string,*>} message Plain object to verify
8508
8508
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
8509
8509
  */
8510
- FileSyncDownloadRequestBody.verify = function verify(message) {
8510
+ FileSyncStartDownloadRequestBody.verify = function verify(message) {
8511
8511
  if (typeof message !== "object" || message === null)
8512
8512
  return "object expected";
8513
8513
  if (message.version != null && message.hasOwnProperty("version"))
@@ -8517,17 +8517,17 @@ $root.file = (function() {
8517
8517
  };
8518
8518
 
8519
8519
  /**
8520
- * Creates a FileSyncDownloadRequestBody message from a plain object. Also converts values to their respective internal types.
8520
+ * Creates a FileSyncStartDownloadRequestBody message from a plain object. Also converts values to their respective internal types.
8521
8521
  * @function fromObject
8522
- * @memberof file.FileSyncDownloadRequestBody
8522
+ * @memberof file.FileSyncStartDownloadRequestBody
8523
8523
  * @static
8524
8524
  * @param {Object.<string,*>} object Plain object
8525
- * @returns {file.FileSyncDownloadRequestBody} FileSyncDownloadRequestBody
8525
+ * @returns {file.FileSyncStartDownloadRequestBody} FileSyncStartDownloadRequestBody
8526
8526
  */
8527
- FileSyncDownloadRequestBody.fromObject = function fromObject(object) {
8528
- if (object instanceof $root.file.FileSyncDownloadRequestBody)
8527
+ FileSyncStartDownloadRequestBody.fromObject = function fromObject(object) {
8528
+ if (object instanceof $root.file.FileSyncStartDownloadRequestBody)
8529
8529
  return object;
8530
- var message = new $root.file.FileSyncDownloadRequestBody();
8530
+ var message = new $root.file.FileSyncStartDownloadRequestBody();
8531
8531
  if (object.version != null)
8532
8532
  if ($util.Long)
8533
8533
  (message.version = $util.Long.fromValue(object.version)).unsigned = true;
@@ -8541,15 +8541,15 @@ $root.file = (function() {
8541
8541
  };
8542
8542
 
8543
8543
  /**
8544
- * Creates a plain object from a FileSyncDownloadRequestBody message. Also converts values to other types if specified.
8544
+ * Creates a plain object from a FileSyncStartDownloadRequestBody message. Also converts values to other types if specified.
8545
8545
  * @function toObject
8546
- * @memberof file.FileSyncDownloadRequestBody
8546
+ * @memberof file.FileSyncStartDownloadRequestBody
8547
8547
  * @static
8548
- * @param {file.FileSyncDownloadRequestBody} message FileSyncDownloadRequestBody
8548
+ * @param {file.FileSyncStartDownloadRequestBody} message FileSyncStartDownloadRequestBody
8549
8549
  * @param {$protobuf.IConversionOptions} [options] Conversion options
8550
8550
  * @returns {Object.<string,*>} Plain object
8551
8551
  */
8552
- FileSyncDownloadRequestBody.toObject = function toObject(message, options) {
8552
+ FileSyncStartDownloadRequestBody.toObject = function toObject(message, options) {
8553
8553
  if (!options)
8554
8554
  options = {};
8555
8555
  var object = {};
@@ -8568,32 +8568,461 @@ $root.file = (function() {
8568
8568
  };
8569
8569
 
8570
8570
  /**
8571
- * Converts this FileSyncDownloadRequestBody to JSON.
8571
+ * Converts this FileSyncStartDownloadRequestBody to JSON.
8572
8572
  * @function toJSON
8573
- * @memberof file.FileSyncDownloadRequestBody
8573
+ * @memberof file.FileSyncStartDownloadRequestBody
8574
8574
  * @instance
8575
8575
  * @returns {Object.<string,*>} JSON object
8576
8576
  */
8577
- FileSyncDownloadRequestBody.prototype.toJSON = function toJSON() {
8577
+ FileSyncStartDownloadRequestBody.prototype.toJSON = function toJSON() {
8578
8578
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8579
8579
  };
8580
8580
 
8581
8581
  /**
8582
- * Gets the default type url for FileSyncDownloadRequestBody
8582
+ * Gets the default type url for FileSyncStartDownloadRequestBody
8583
8583
  * @function getTypeUrl
8584
- * @memberof file.FileSyncDownloadRequestBody
8584
+ * @memberof file.FileSyncStartDownloadRequestBody
8585
8585
  * @static
8586
8586
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
8587
8587
  * @returns {string} The default type url
8588
8588
  */
8589
- FileSyncDownloadRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
8589
+ FileSyncStartDownloadRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
8590
8590
  if (typeUrlPrefix === undefined) {
8591
8591
  typeUrlPrefix = "type.googleapis.com";
8592
8592
  }
8593
- return typeUrlPrefix + "/file.FileSyncDownloadRequestBody";
8593
+ return typeUrlPrefix + "/file.FileSyncStartDownloadRequestBody";
8594
8594
  };
8595
8595
 
8596
- return FileSyncDownloadRequestBody;
8596
+ return FileSyncStartDownloadRequestBody;
8597
+ })();
8598
+
8599
+ file.FileSyncStartDownloadReplyBody = (function() {
8600
+
8601
+ /**
8602
+ * Properties of a FileSyncStartDownloadReplyBody.
8603
+ * @memberof file
8604
+ * @interface IFileSyncStartDownloadReplyBody
8605
+ * @property {file.FileSyncStartDownloadReplyBody.IDownloadInfo|null} [startedDownload] FileSyncStartDownloadReplyBody startedDownload
8606
+ */
8607
+
8608
+ /**
8609
+ * Constructs a new FileSyncStartDownloadReplyBody.
8610
+ * @memberof file
8611
+ * @classdesc Represents a FileSyncStartDownloadReplyBody.
8612
+ * @implements IFileSyncStartDownloadReplyBody
8613
+ * @constructor
8614
+ * @param {file.IFileSyncStartDownloadReplyBody=} [properties] Properties to set
8615
+ */
8616
+ function FileSyncStartDownloadReplyBody(properties) {
8617
+ if (properties)
8618
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8619
+ if (properties[keys[i]] != null)
8620
+ this[keys[i]] = properties[keys[i]];
8621
+ }
8622
+
8623
+ /**
8624
+ * FileSyncStartDownloadReplyBody startedDownload.
8625
+ * @member {file.FileSyncStartDownloadReplyBody.IDownloadInfo|null|undefined} startedDownload
8626
+ * @memberof file.FileSyncStartDownloadReplyBody
8627
+ * @instance
8628
+ */
8629
+ FileSyncStartDownloadReplyBody.prototype.startedDownload = null;
8630
+
8631
+ /**
8632
+ * Creates a new FileSyncStartDownloadReplyBody instance using the specified properties.
8633
+ * @function create
8634
+ * @memberof file.FileSyncStartDownloadReplyBody
8635
+ * @static
8636
+ * @param {file.IFileSyncStartDownloadReplyBody=} [properties] Properties to set
8637
+ * @returns {file.FileSyncStartDownloadReplyBody} FileSyncStartDownloadReplyBody instance
8638
+ */
8639
+ FileSyncStartDownloadReplyBody.create = function create(properties) {
8640
+ return new FileSyncStartDownloadReplyBody(properties);
8641
+ };
8642
+
8643
+ /**
8644
+ * Encodes the specified FileSyncStartDownloadReplyBody message. Does not implicitly {@link file.FileSyncStartDownloadReplyBody.verify|verify} messages.
8645
+ * @function encode
8646
+ * @memberof file.FileSyncStartDownloadReplyBody
8647
+ * @static
8648
+ * @param {file.IFileSyncStartDownloadReplyBody} message FileSyncStartDownloadReplyBody message or plain object to encode
8649
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8650
+ * @returns {$protobuf.Writer} Writer
8651
+ */
8652
+ FileSyncStartDownloadReplyBody.encode = function encode(message, writer) {
8653
+ if (!writer)
8654
+ writer = $Writer.create();
8655
+ if (message.startedDownload != null && Object.hasOwnProperty.call(message, "startedDownload"))
8656
+ $root.file.FileSyncStartDownloadReplyBody.DownloadInfo.encode(message.startedDownload, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8657
+ return writer;
8658
+ };
8659
+
8660
+ /**
8661
+ * Encodes the specified FileSyncStartDownloadReplyBody message, length delimited. Does not implicitly {@link file.FileSyncStartDownloadReplyBody.verify|verify} messages.
8662
+ * @function encodeDelimited
8663
+ * @memberof file.FileSyncStartDownloadReplyBody
8664
+ * @static
8665
+ * @param {file.IFileSyncStartDownloadReplyBody} message FileSyncStartDownloadReplyBody message or plain object to encode
8666
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8667
+ * @returns {$protobuf.Writer} Writer
8668
+ */
8669
+ FileSyncStartDownloadReplyBody.encodeDelimited = function encodeDelimited(message, writer) {
8670
+ return this.encode(message, writer).ldelim();
8671
+ };
8672
+
8673
+ /**
8674
+ * Decodes a FileSyncStartDownloadReplyBody message from the specified reader or buffer.
8675
+ * @function decode
8676
+ * @memberof file.FileSyncStartDownloadReplyBody
8677
+ * @static
8678
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8679
+ * @param {number} [length] Message length if known beforehand
8680
+ * @returns {file.FileSyncStartDownloadReplyBody} FileSyncStartDownloadReplyBody
8681
+ * @throws {Error} If the payload is not a reader or valid buffer
8682
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8683
+ */
8684
+ FileSyncStartDownloadReplyBody.decode = function decode(reader, length, error) {
8685
+ if (!(reader instanceof $Reader))
8686
+ reader = $Reader.create(reader);
8687
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.file.FileSyncStartDownloadReplyBody();
8688
+ while (reader.pos < end) {
8689
+ var tag = reader.uint32();
8690
+ if (tag === error)
8691
+ break;
8692
+ switch (tag >>> 3) {
8693
+ case 1: {
8694
+ message.startedDownload = $root.file.FileSyncStartDownloadReplyBody.DownloadInfo.decode(reader, reader.uint32());
8695
+ break;
8696
+ }
8697
+ default:
8698
+ reader.skipType(tag & 7);
8699
+ break;
8700
+ }
8701
+ }
8702
+ return message;
8703
+ };
8704
+
8705
+ /**
8706
+ * Decodes a FileSyncStartDownloadReplyBody message from the specified reader or buffer, length delimited.
8707
+ * @function decodeDelimited
8708
+ * @memberof file.FileSyncStartDownloadReplyBody
8709
+ * @static
8710
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8711
+ * @returns {file.FileSyncStartDownloadReplyBody} FileSyncStartDownloadReplyBody
8712
+ * @throws {Error} If the payload is not a reader or valid buffer
8713
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8714
+ */
8715
+ FileSyncStartDownloadReplyBody.decodeDelimited = function decodeDelimited(reader) {
8716
+ if (!(reader instanceof $Reader))
8717
+ reader = new $Reader(reader);
8718
+ return this.decode(reader, reader.uint32());
8719
+ };
8720
+
8721
+ /**
8722
+ * Verifies a FileSyncStartDownloadReplyBody message.
8723
+ * @function verify
8724
+ * @memberof file.FileSyncStartDownloadReplyBody
8725
+ * @static
8726
+ * @param {Object.<string,*>} message Plain object to verify
8727
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8728
+ */
8729
+ FileSyncStartDownloadReplyBody.verify = function verify(message) {
8730
+ if (typeof message !== "object" || message === null)
8731
+ return "object expected";
8732
+ if (message.startedDownload != null && message.hasOwnProperty("startedDownload")) {
8733
+ var error = $root.file.FileSyncStartDownloadReplyBody.DownloadInfo.verify(message.startedDownload);
8734
+ if (error)
8735
+ return "startedDownload." + error;
8736
+ }
8737
+ return null;
8738
+ };
8739
+
8740
+ /**
8741
+ * Creates a FileSyncStartDownloadReplyBody message from a plain object. Also converts values to their respective internal types.
8742
+ * @function fromObject
8743
+ * @memberof file.FileSyncStartDownloadReplyBody
8744
+ * @static
8745
+ * @param {Object.<string,*>} object Plain object
8746
+ * @returns {file.FileSyncStartDownloadReplyBody} FileSyncStartDownloadReplyBody
8747
+ */
8748
+ FileSyncStartDownloadReplyBody.fromObject = function fromObject(object) {
8749
+ if (object instanceof $root.file.FileSyncStartDownloadReplyBody)
8750
+ return object;
8751
+ var message = new $root.file.FileSyncStartDownloadReplyBody();
8752
+ if (object.startedDownload != null) {
8753
+ if (typeof object.startedDownload !== "object")
8754
+ throw TypeError(".file.FileSyncStartDownloadReplyBody.startedDownload: object expected");
8755
+ message.startedDownload = $root.file.FileSyncStartDownloadReplyBody.DownloadInfo.fromObject(object.startedDownload);
8756
+ }
8757
+ return message;
8758
+ };
8759
+
8760
+ /**
8761
+ * Creates a plain object from a FileSyncStartDownloadReplyBody message. Also converts values to other types if specified.
8762
+ * @function toObject
8763
+ * @memberof file.FileSyncStartDownloadReplyBody
8764
+ * @static
8765
+ * @param {file.FileSyncStartDownloadReplyBody} message FileSyncStartDownloadReplyBody
8766
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8767
+ * @returns {Object.<string,*>} Plain object
8768
+ */
8769
+ FileSyncStartDownloadReplyBody.toObject = function toObject(message, options) {
8770
+ if (!options)
8771
+ options = {};
8772
+ var object = {};
8773
+ if (options.defaults)
8774
+ object.startedDownload = null;
8775
+ if (message.startedDownload != null && message.hasOwnProperty("startedDownload"))
8776
+ object.startedDownload = $root.file.FileSyncStartDownloadReplyBody.DownloadInfo.toObject(message.startedDownload, options);
8777
+ return object;
8778
+ };
8779
+
8780
+ /**
8781
+ * Converts this FileSyncStartDownloadReplyBody to JSON.
8782
+ * @function toJSON
8783
+ * @memberof file.FileSyncStartDownloadReplyBody
8784
+ * @instance
8785
+ * @returns {Object.<string,*>} JSON object
8786
+ */
8787
+ FileSyncStartDownloadReplyBody.prototype.toJSON = function toJSON() {
8788
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8789
+ };
8790
+
8791
+ /**
8792
+ * Gets the default type url for FileSyncStartDownloadReplyBody
8793
+ * @function getTypeUrl
8794
+ * @memberof file.FileSyncStartDownloadReplyBody
8795
+ * @static
8796
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
8797
+ * @returns {string} The default type url
8798
+ */
8799
+ FileSyncStartDownloadReplyBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
8800
+ if (typeUrlPrefix === undefined) {
8801
+ typeUrlPrefix = "type.googleapis.com";
8802
+ }
8803
+ return typeUrlPrefix + "/file.FileSyncStartDownloadReplyBody";
8804
+ };
8805
+
8806
+ FileSyncStartDownloadReplyBody.DownloadInfo = (function() {
8807
+
8808
+ /**
8809
+ * Properties of a DownloadInfo.
8810
+ * @memberof file.FileSyncStartDownloadReplyBody
8811
+ * @interface IDownloadInfo
8812
+ * @property {number|Long|null} [downloadTaskId] DownloadInfo downloadTaskId
8813
+ */
8814
+
8815
+ /**
8816
+ * Constructs a new DownloadInfo.
8817
+ * @memberof file.FileSyncStartDownloadReplyBody
8818
+ * @classdesc Represents a DownloadInfo.
8819
+ * @implements IDownloadInfo
8820
+ * @constructor
8821
+ * @param {file.FileSyncStartDownloadReplyBody.IDownloadInfo=} [properties] Properties to set
8822
+ */
8823
+ function DownloadInfo(properties) {
8824
+ if (properties)
8825
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8826
+ if (properties[keys[i]] != null)
8827
+ this[keys[i]] = properties[keys[i]];
8828
+ }
8829
+
8830
+ /**
8831
+ * DownloadInfo downloadTaskId.
8832
+ * @member {number|Long} downloadTaskId
8833
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8834
+ * @instance
8835
+ */
8836
+ DownloadInfo.prototype.downloadTaskId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
8837
+
8838
+ /**
8839
+ * Creates a new DownloadInfo instance using the specified properties.
8840
+ * @function create
8841
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8842
+ * @static
8843
+ * @param {file.FileSyncStartDownloadReplyBody.IDownloadInfo=} [properties] Properties to set
8844
+ * @returns {file.FileSyncStartDownloadReplyBody.DownloadInfo} DownloadInfo instance
8845
+ */
8846
+ DownloadInfo.create = function create(properties) {
8847
+ return new DownloadInfo(properties);
8848
+ };
8849
+
8850
+ /**
8851
+ * Encodes the specified DownloadInfo message. Does not implicitly {@link file.FileSyncStartDownloadReplyBody.DownloadInfo.verify|verify} messages.
8852
+ * @function encode
8853
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8854
+ * @static
8855
+ * @param {file.FileSyncStartDownloadReplyBody.IDownloadInfo} message DownloadInfo message or plain object to encode
8856
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8857
+ * @returns {$protobuf.Writer} Writer
8858
+ */
8859
+ DownloadInfo.encode = function encode(message, writer) {
8860
+ if (!writer)
8861
+ writer = $Writer.create();
8862
+ if (message.downloadTaskId != null && Object.hasOwnProperty.call(message, "downloadTaskId"))
8863
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.downloadTaskId);
8864
+ return writer;
8865
+ };
8866
+
8867
+ /**
8868
+ * Encodes the specified DownloadInfo message, length delimited. Does not implicitly {@link file.FileSyncStartDownloadReplyBody.DownloadInfo.verify|verify} messages.
8869
+ * @function encodeDelimited
8870
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8871
+ * @static
8872
+ * @param {file.FileSyncStartDownloadReplyBody.IDownloadInfo} message DownloadInfo message or plain object to encode
8873
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8874
+ * @returns {$protobuf.Writer} Writer
8875
+ */
8876
+ DownloadInfo.encodeDelimited = function encodeDelimited(message, writer) {
8877
+ return this.encode(message, writer).ldelim();
8878
+ };
8879
+
8880
+ /**
8881
+ * Decodes a DownloadInfo message from the specified reader or buffer.
8882
+ * @function decode
8883
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8884
+ * @static
8885
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8886
+ * @param {number} [length] Message length if known beforehand
8887
+ * @returns {file.FileSyncStartDownloadReplyBody.DownloadInfo} DownloadInfo
8888
+ * @throws {Error} If the payload is not a reader or valid buffer
8889
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8890
+ */
8891
+ DownloadInfo.decode = function decode(reader, length, error) {
8892
+ if (!(reader instanceof $Reader))
8893
+ reader = $Reader.create(reader);
8894
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.file.FileSyncStartDownloadReplyBody.DownloadInfo();
8895
+ while (reader.pos < end) {
8896
+ var tag = reader.uint32();
8897
+ if (tag === error)
8898
+ break;
8899
+ switch (tag >>> 3) {
8900
+ case 2: {
8901
+ message.downloadTaskId = reader.uint64();
8902
+ break;
8903
+ }
8904
+ default:
8905
+ reader.skipType(tag & 7);
8906
+ break;
8907
+ }
8908
+ }
8909
+ return message;
8910
+ };
8911
+
8912
+ /**
8913
+ * Decodes a DownloadInfo message from the specified reader or buffer, length delimited.
8914
+ * @function decodeDelimited
8915
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8916
+ * @static
8917
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8918
+ * @returns {file.FileSyncStartDownloadReplyBody.DownloadInfo} DownloadInfo
8919
+ * @throws {Error} If the payload is not a reader or valid buffer
8920
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8921
+ */
8922
+ DownloadInfo.decodeDelimited = function decodeDelimited(reader) {
8923
+ if (!(reader instanceof $Reader))
8924
+ reader = new $Reader(reader);
8925
+ return this.decode(reader, reader.uint32());
8926
+ };
8927
+
8928
+ /**
8929
+ * Verifies a DownloadInfo message.
8930
+ * @function verify
8931
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8932
+ * @static
8933
+ * @param {Object.<string,*>} message Plain object to verify
8934
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8935
+ */
8936
+ DownloadInfo.verify = function verify(message) {
8937
+ if (typeof message !== "object" || message === null)
8938
+ return "object expected";
8939
+ if (message.downloadTaskId != null && message.hasOwnProperty("downloadTaskId"))
8940
+ if (!$util.isInteger(message.downloadTaskId) && !(message.downloadTaskId && $util.isInteger(message.downloadTaskId.low) && $util.isInteger(message.downloadTaskId.high)))
8941
+ return "downloadTaskId: integer|Long expected";
8942
+ return null;
8943
+ };
8944
+
8945
+ /**
8946
+ * Creates a DownloadInfo message from a plain object. Also converts values to their respective internal types.
8947
+ * @function fromObject
8948
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8949
+ * @static
8950
+ * @param {Object.<string,*>} object Plain object
8951
+ * @returns {file.FileSyncStartDownloadReplyBody.DownloadInfo} DownloadInfo
8952
+ */
8953
+ DownloadInfo.fromObject = function fromObject(object) {
8954
+ if (object instanceof $root.file.FileSyncStartDownloadReplyBody.DownloadInfo)
8955
+ return object;
8956
+ var message = new $root.file.FileSyncStartDownloadReplyBody.DownloadInfo();
8957
+ if (object.downloadTaskId != null)
8958
+ if ($util.Long)
8959
+ (message.downloadTaskId = $util.Long.fromValue(object.downloadTaskId)).unsigned = true;
8960
+ else if (typeof object.downloadTaskId === "string")
8961
+ message.downloadTaskId = parseInt(object.downloadTaskId, 10);
8962
+ else if (typeof object.downloadTaskId === "number")
8963
+ message.downloadTaskId = object.downloadTaskId;
8964
+ else if (typeof object.downloadTaskId === "object")
8965
+ message.downloadTaskId = new $util.LongBits(object.downloadTaskId.low >>> 0, object.downloadTaskId.high >>> 0).toNumber(true);
8966
+ return message;
8967
+ };
8968
+
8969
+ /**
8970
+ * Creates a plain object from a DownloadInfo message. Also converts values to other types if specified.
8971
+ * @function toObject
8972
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
8973
+ * @static
8974
+ * @param {file.FileSyncStartDownloadReplyBody.DownloadInfo} message DownloadInfo
8975
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8976
+ * @returns {Object.<string,*>} Plain object
8977
+ */
8978
+ DownloadInfo.toObject = function toObject(message, options) {
8979
+ if (!options)
8980
+ options = {};
8981
+ var object = {};
8982
+ if (options.defaults)
8983
+ if ($util.Long) {
8984
+ var long = new $util.Long(0, 0, true);
8985
+ object.downloadTaskId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8986
+ } else
8987
+ object.downloadTaskId = options.longs === String ? "0" : 0;
8988
+ if (message.downloadTaskId != null && message.hasOwnProperty("downloadTaskId"))
8989
+ if (typeof message.downloadTaskId === "number")
8990
+ object.downloadTaskId = options.longs === String ? String(message.downloadTaskId) : message.downloadTaskId;
8991
+ else
8992
+ object.downloadTaskId = options.longs === String ? $util.Long.prototype.toString.call(message.downloadTaskId) : options.longs === Number ? new $util.LongBits(message.downloadTaskId.low >>> 0, message.downloadTaskId.high >>> 0).toNumber(true) : message.downloadTaskId;
8993
+ return object;
8994
+ };
8995
+
8996
+ /**
8997
+ * Converts this DownloadInfo to JSON.
8998
+ * @function toJSON
8999
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
9000
+ * @instance
9001
+ * @returns {Object.<string,*>} JSON object
9002
+ */
9003
+ DownloadInfo.prototype.toJSON = function toJSON() {
9004
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9005
+ };
9006
+
9007
+ /**
9008
+ * Gets the default type url for DownloadInfo
9009
+ * @function getTypeUrl
9010
+ * @memberof file.FileSyncStartDownloadReplyBody.DownloadInfo
9011
+ * @static
9012
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
9013
+ * @returns {string} The default type url
9014
+ */
9015
+ DownloadInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
9016
+ if (typeUrlPrefix === undefined) {
9017
+ typeUrlPrefix = "type.googleapis.com";
9018
+ }
9019
+ return typeUrlPrefix + "/file.FileSyncStartDownloadReplyBody.DownloadInfo";
9020
+ };
9021
+
9022
+ return DownloadInfo;
9023
+ })();
9024
+
9025
+ return FileSyncStartDownloadReplyBody;
8597
9026
  })();
8598
9027
 
8599
9028
  file.AdoptRemoteRequestBody = (function() {