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.
- package/build/api-defs/files.d.ts +33 -0
- package/build/core/storage/synced/obj-status.d.ts +21 -0
- package/build/core/storage/synced/obj-status.js +45 -2
- package/build/core/storage/synced/upsyncer.js +1 -2
- package/build/core-ipc/file.d.ts +4 -0
- package/build/core-ipc/file.js +52 -8
- package/build/core-ipc/fs.js +22 -0
- package/build/lib-client/fs-utils/files.js +4 -0
- package/build/lib-client/xsp-fs/file-node.d.ts +3 -2
- package/build/lib-client/xsp-fs/file-node.js +30 -11
- package/build/lib-client/xsp-fs/file.d.ts +1 -0
- package/build/lib-client/xsp-fs/file.js +8 -12
- package/build/lib-client/xsp-fs/folder-node.d.ts +2 -0
- package/build/lib-client/xsp-fs/folder-node.js +21 -1
- package/build/lib-client/xsp-fs/fs.d.ts +1 -0
- package/build/lib-client/xsp-fs/fs.js +8 -25
- package/build/lib-client/xsp-fs/link-node.d.ts +3 -0
- package/build/lib-client/xsp-fs/link-node.js +20 -0
- package/build/lib-client/xsp-fs/node-in-fs.d.ts +2 -1
- package/build/lib-client/xsp-fs/node-in-fs.js +0 -3
- package/build/lib-client/xsp-fs/node-persistence.d.ts +1 -0
- package/build/lib-client/xsp-fs/node-persistence.js +4 -0
- package/build/lib-common/big-endian.js +2 -2
- package/build/protos/asmail.proto.js +345 -0
- package/build/protos/file.proto.js +345 -0
- package/build/protos/fs.proto.js +345 -0
- package/package.json +1 -1
- package/protos/file.proto +11 -0
- package/protos/fs.proto +5 -1
package/build/protos/fs.proto.js
CHANGED
|
@@ -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,323 @@ $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 {number|Long|null} [localVersion] UploadingStateMsg localVersion
|
|
18537
|
+
* @property {number|Long|null} [remoteVersion] UploadingStateMsg remoteVersion
|
|
18538
|
+
* @property {number|Long|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 {number|Long} localVersion
|
|
18560
|
+
* @memberof file.UploadingStateMsg
|
|
18561
|
+
* @instance
|
|
18562
|
+
*/
|
|
18563
|
+
UploadingStateMsg.prototype.localVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
18564
|
+
|
|
18565
|
+
/**
|
|
18566
|
+
* UploadingStateMsg remoteVersion.
|
|
18567
|
+
* @member {number|Long} remoteVersion
|
|
18568
|
+
* @memberof file.UploadingStateMsg
|
|
18569
|
+
* @instance
|
|
18570
|
+
*/
|
|
18571
|
+
UploadingStateMsg.prototype.remoteVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
18572
|
+
|
|
18573
|
+
/**
|
|
18574
|
+
* UploadingStateMsg bytesLeftToUpload.
|
|
18575
|
+
* @member {number|Long} bytesLeftToUpload
|
|
18576
|
+
* @memberof file.UploadingStateMsg
|
|
18577
|
+
* @instance
|
|
18578
|
+
*/
|
|
18579
|
+
UploadingStateMsg.prototype.bytesLeftToUpload = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
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
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.localVersion);
|
|
18615
|
+
if (message.remoteVersion != null && Object.hasOwnProperty.call(message, "remoteVersion"))
|
|
18616
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.remoteVersion);
|
|
18617
|
+
if (message.bytesLeftToUpload != null && Object.hasOwnProperty.call(message, "bytesLeftToUpload"))
|
|
18618
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.bytesLeftToUpload);
|
|
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 = reader.uint64();
|
|
18659
|
+
break;
|
|
18660
|
+
}
|
|
18661
|
+
case 2: {
|
|
18662
|
+
message.remoteVersion = reader.uint64();
|
|
18663
|
+
break;
|
|
18664
|
+
}
|
|
18665
|
+
case 3: {
|
|
18666
|
+
message.bytesLeftToUpload = reader.uint64();
|
|
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
|
+
if (!$util.isInteger(message.localVersion) && !(message.localVersion && $util.isInteger(message.localVersion.low) && $util.isInteger(message.localVersion.high)))
|
|
18710
|
+
return "localVersion: integer|Long expected";
|
|
18711
|
+
if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
|
|
18712
|
+
if (!$util.isInteger(message.remoteVersion) && !(message.remoteVersion && $util.isInteger(message.remoteVersion.low) && $util.isInteger(message.remoteVersion.high)))
|
|
18713
|
+
return "remoteVersion: integer|Long expected";
|
|
18714
|
+
if (message.bytesLeftToUpload != null && message.hasOwnProperty("bytesLeftToUpload"))
|
|
18715
|
+
if (!$util.isInteger(message.bytesLeftToUpload) && !(message.bytesLeftToUpload && $util.isInteger(message.bytesLeftToUpload.low) && $util.isInteger(message.bytesLeftToUpload.high)))
|
|
18716
|
+
return "bytesLeftToUpload: integer|Long expected";
|
|
18717
|
+
if (message.uploadStarted != null && message.hasOwnProperty("uploadStarted"))
|
|
18718
|
+
if (typeof message.uploadStarted !== "boolean")
|
|
18719
|
+
return "uploadStarted: boolean expected";
|
|
18720
|
+
return null;
|
|
18721
|
+
};
|
|
18722
|
+
|
|
18723
|
+
/**
|
|
18724
|
+
* Creates an UploadingStateMsg message from a plain object. Also converts values to their respective internal types.
|
|
18725
|
+
* @function fromObject
|
|
18726
|
+
* @memberof file.UploadingStateMsg
|
|
18727
|
+
* @static
|
|
18728
|
+
* @param {Object.<string,*>} object Plain object
|
|
18729
|
+
* @returns {file.UploadingStateMsg} UploadingStateMsg
|
|
18730
|
+
*/
|
|
18731
|
+
UploadingStateMsg.fromObject = function fromObject(object) {
|
|
18732
|
+
if (object instanceof $root.file.UploadingStateMsg)
|
|
18733
|
+
return object;
|
|
18734
|
+
var message = new $root.file.UploadingStateMsg();
|
|
18735
|
+
if (object.localVersion != null)
|
|
18736
|
+
if ($util.Long)
|
|
18737
|
+
(message.localVersion = $util.Long.fromValue(object.localVersion)).unsigned = true;
|
|
18738
|
+
else if (typeof object.localVersion === "string")
|
|
18739
|
+
message.localVersion = parseInt(object.localVersion, 10);
|
|
18740
|
+
else if (typeof object.localVersion === "number")
|
|
18741
|
+
message.localVersion = object.localVersion;
|
|
18742
|
+
else if (typeof object.localVersion === "object")
|
|
18743
|
+
message.localVersion = new $util.LongBits(object.localVersion.low >>> 0, object.localVersion.high >>> 0).toNumber(true);
|
|
18744
|
+
if (object.remoteVersion != null)
|
|
18745
|
+
if ($util.Long)
|
|
18746
|
+
(message.remoteVersion = $util.Long.fromValue(object.remoteVersion)).unsigned = true;
|
|
18747
|
+
else if (typeof object.remoteVersion === "string")
|
|
18748
|
+
message.remoteVersion = parseInt(object.remoteVersion, 10);
|
|
18749
|
+
else if (typeof object.remoteVersion === "number")
|
|
18750
|
+
message.remoteVersion = object.remoteVersion;
|
|
18751
|
+
else if (typeof object.remoteVersion === "object")
|
|
18752
|
+
message.remoteVersion = new $util.LongBits(object.remoteVersion.low >>> 0, object.remoteVersion.high >>> 0).toNumber(true);
|
|
18753
|
+
if (object.bytesLeftToUpload != null)
|
|
18754
|
+
if ($util.Long)
|
|
18755
|
+
(message.bytesLeftToUpload = $util.Long.fromValue(object.bytesLeftToUpload)).unsigned = true;
|
|
18756
|
+
else if (typeof object.bytesLeftToUpload === "string")
|
|
18757
|
+
message.bytesLeftToUpload = parseInt(object.bytesLeftToUpload, 10);
|
|
18758
|
+
else if (typeof object.bytesLeftToUpload === "number")
|
|
18759
|
+
message.bytesLeftToUpload = object.bytesLeftToUpload;
|
|
18760
|
+
else if (typeof object.bytesLeftToUpload === "object")
|
|
18761
|
+
message.bytesLeftToUpload = new $util.LongBits(object.bytesLeftToUpload.low >>> 0, object.bytesLeftToUpload.high >>> 0).toNumber(true);
|
|
18762
|
+
if (object.uploadStarted != null)
|
|
18763
|
+
message.uploadStarted = Boolean(object.uploadStarted);
|
|
18764
|
+
return message;
|
|
18765
|
+
};
|
|
18766
|
+
|
|
18767
|
+
/**
|
|
18768
|
+
* Creates a plain object from an UploadingStateMsg message. Also converts values to other types if specified.
|
|
18769
|
+
* @function toObject
|
|
18770
|
+
* @memberof file.UploadingStateMsg
|
|
18771
|
+
* @static
|
|
18772
|
+
* @param {file.UploadingStateMsg} message UploadingStateMsg
|
|
18773
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
18774
|
+
* @returns {Object.<string,*>} Plain object
|
|
18775
|
+
*/
|
|
18776
|
+
UploadingStateMsg.toObject = function toObject(message, options) {
|
|
18777
|
+
if (!options)
|
|
18778
|
+
options = {};
|
|
18779
|
+
var object = {};
|
|
18780
|
+
if (options.defaults) {
|
|
18781
|
+
if ($util.Long) {
|
|
18782
|
+
var long = new $util.Long(0, 0, true);
|
|
18783
|
+
object.localVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
18784
|
+
} else
|
|
18785
|
+
object.localVersion = options.longs === String ? "0" : 0;
|
|
18786
|
+
if ($util.Long) {
|
|
18787
|
+
var long = new $util.Long(0, 0, true);
|
|
18788
|
+
object.remoteVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
18789
|
+
} else
|
|
18790
|
+
object.remoteVersion = options.longs === String ? "0" : 0;
|
|
18791
|
+
if ($util.Long) {
|
|
18792
|
+
var long = new $util.Long(0, 0, true);
|
|
18793
|
+
object.bytesLeftToUpload = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
18794
|
+
} else
|
|
18795
|
+
object.bytesLeftToUpload = options.longs === String ? "0" : 0;
|
|
18796
|
+
object.uploadStarted = false;
|
|
18797
|
+
}
|
|
18798
|
+
if (message.localVersion != null && message.hasOwnProperty("localVersion"))
|
|
18799
|
+
if (typeof message.localVersion === "number")
|
|
18800
|
+
object.localVersion = options.longs === String ? String(message.localVersion) : message.localVersion;
|
|
18801
|
+
else
|
|
18802
|
+
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;
|
|
18803
|
+
if (message.remoteVersion != null && message.hasOwnProperty("remoteVersion"))
|
|
18804
|
+
if (typeof message.remoteVersion === "number")
|
|
18805
|
+
object.remoteVersion = options.longs === String ? String(message.remoteVersion) : message.remoteVersion;
|
|
18806
|
+
else
|
|
18807
|
+
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;
|
|
18808
|
+
if (message.bytesLeftToUpload != null && message.hasOwnProperty("bytesLeftToUpload"))
|
|
18809
|
+
if (typeof message.bytesLeftToUpload === "number")
|
|
18810
|
+
object.bytesLeftToUpload = options.longs === String ? String(message.bytesLeftToUpload) : message.bytesLeftToUpload;
|
|
18811
|
+
else
|
|
18812
|
+
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;
|
|
18813
|
+
if (message.uploadStarted != null && message.hasOwnProperty("uploadStarted"))
|
|
18814
|
+
object.uploadStarted = message.uploadStarted;
|
|
18815
|
+
return object;
|
|
18816
|
+
};
|
|
18817
|
+
|
|
18818
|
+
/**
|
|
18819
|
+
* Converts this UploadingStateMsg to JSON.
|
|
18820
|
+
* @function toJSON
|
|
18821
|
+
* @memberof file.UploadingStateMsg
|
|
18822
|
+
* @instance
|
|
18823
|
+
* @returns {Object.<string,*>} JSON object
|
|
18824
|
+
*/
|
|
18825
|
+
UploadingStateMsg.prototype.toJSON = function toJSON() {
|
|
18826
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
18827
|
+
};
|
|
18828
|
+
|
|
18829
|
+
/**
|
|
18830
|
+
* Gets the default type url for UploadingStateMsg
|
|
18831
|
+
* @function getTypeUrl
|
|
18832
|
+
* @memberof file.UploadingStateMsg
|
|
18833
|
+
* @static
|
|
18834
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
18835
|
+
* @returns {string} The default type url
|
|
18836
|
+
*/
|
|
18837
|
+
UploadingStateMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
18838
|
+
if (typeUrlPrefix === undefined) {
|
|
18839
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
18840
|
+
}
|
|
18841
|
+
return typeUrlPrefix + "/file.UploadingStateMsg";
|
|
18842
|
+
};
|
|
18843
|
+
|
|
18844
|
+
return UploadingStateMsg;
|
|
18845
|
+
})();
|
|
18846
|
+
|
|
18502
18847
|
file.StatsMsg = (function() {
|
|
18503
18848
|
|
|
18504
18849
|
/**
|
package/package.json
CHANGED
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
|
+
uint64 local_version = 1;
|
|
37
|
+
uint64 remote_version = 2;
|
|
38
|
+
uint64 bytes_left_to_upload = 3;
|
|
39
|
+
bool upload_started = 4;
|
|
40
|
+
}
|
|
34
41
|
|
|
35
42
|
// ==== ReadonlyFile referable as impl object ====
|
|
36
43
|
|
|
@@ -111,6 +118,10 @@ message RequestWithVersionedReadFlags {
|
|
|
111
118
|
VersionedReadFlags flags = 1;
|
|
112
119
|
}
|
|
113
120
|
|
|
121
|
+
// --- ReadonlyFileVersionedAPI.stat ---
|
|
122
|
+
// Request body is RequestWithVersionedReadFlags
|
|
123
|
+
// Reply body is StatsMsg
|
|
124
|
+
|
|
114
125
|
// --- ReadonlyFileVersionedAPI.getXAttr ---
|
|
115
126
|
message VersionedGetXAttrRequestBody {
|
|
116
127
|
string xa_name = 1;
|
package/protos/fs.proto
CHANGED
|
@@ -39,7 +39,7 @@ message CheckPresenceRequestBody {
|
|
|
39
39
|
|
|
40
40
|
// --- ReadonlyFS.stat ---
|
|
41
41
|
// Request body is PathOnlyRequestBody
|
|
42
|
-
// Reply body is
|
|
42
|
+
// Reply body is file.StatsMsg
|
|
43
43
|
|
|
44
44
|
message PathOnlyRequestBody {
|
|
45
45
|
string path = 1;
|
|
@@ -230,6 +230,10 @@ message CollectionEvent {
|
|
|
230
230
|
|
|
231
231
|
// ==== ReadonlyFSVersionedAPI referable object ====
|
|
232
232
|
|
|
233
|
+
// --- ReadonlyFSVersionedAPI.stat ---
|
|
234
|
+
// Request body is PathAndFlagsRequestBody
|
|
235
|
+
// Reply body is file.StatsMsg
|
|
236
|
+
|
|
233
237
|
// --- ReadonlyFSVersionedAPI.getXAttr ---
|
|
234
238
|
message VersionedGetXAttrRequestBody {
|
|
235
239
|
string path = 1;
|