core-3nweb-client-lib 0.43.12 → 0.43.13
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 +30 -8
- package/build/core-ipc/fs.d.ts +2 -0
- package/build/core-ipc/fs.js +6 -2
- package/build/lib-client/xsp-fs/folder-node.d.ts +1 -1
- package/build/lib-client/xsp-fs/folder-node.js +24 -10
- package/build/protos/asmail.proto.js +56 -0
- package/build/protos/fs.proto.js +56 -0
- package/package.json +1 -1
- package/protos/fs.proto +2 -0
|
@@ -83,6 +83,7 @@ declare namespace web3n.files {
|
|
|
83
83
|
notSynced?: true;
|
|
84
84
|
remoteIsArchived?: true;
|
|
85
85
|
remoteFolderItemNotFound?: true;
|
|
86
|
+
overlapsLocalItem?: true;
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
/**
|
|
@@ -1304,9 +1305,17 @@ declare namespace web3n.files {
|
|
|
1304
1305
|
* @param path
|
|
1305
1306
|
* @param remoteVersion
|
|
1306
1307
|
*/
|
|
1307
|
-
diffCurrentAndRemoteFolderVersions(
|
|
1308
|
-
|
|
1309
|
-
|
|
1308
|
+
diffCurrentAndRemoteFolderVersions(path: string, remoteVersion?: number): Promise<FolderDiff|undefined>;
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
// XXX (Christmas methods)
|
|
1312
|
+
// add following methods to read remote item, facilitating decisions in conflict situations.
|
|
1313
|
+
|
|
1314
|
+
// statRemoteItem(path: string, remoteItemName: string, remoteVersion?: number): Promise<Stats>;
|
|
1315
|
+
|
|
1316
|
+
// listRemoteFolderItem(path: string, remoteItemName: string, remoteVersion?: number): Promise<ListingEntry[]>;
|
|
1317
|
+
|
|
1318
|
+
// getRemoteFileItem(path: string, remoteItemName: string, remoteVersion?: number): Promise<ReadonlyFile>;
|
|
1310
1319
|
|
|
1311
1320
|
}
|
|
1312
1321
|
|
|
@@ -1355,26 +1364,39 @@ declare namespace web3n.files {
|
|
|
1355
1364
|
* @param path
|
|
1356
1365
|
* @param opts
|
|
1357
1366
|
*/
|
|
1358
|
-
upload(
|
|
1359
|
-
path: string, opts?: OptionsToUploadLocal
|
|
1360
|
-
): Promise<number|undefined>;
|
|
1367
|
+
upload(path: string, opts?: OptionsToUploadLocal): Promise<number|undefined>;
|
|
1361
1368
|
|
|
1362
1369
|
/**
|
|
1363
1370
|
* This method is for resolving conflicts on folders.
|
|
1364
1371
|
* It adopts some folder items, and not the whole folder state.
|
|
1365
1372
|
* @param path
|
|
1366
|
-
* @param
|
|
1373
|
+
* @param remoteItemName
|
|
1367
1374
|
* @param opts
|
|
1368
1375
|
*/
|
|
1369
1376
|
adoptRemoteFolderItem(
|
|
1370
|
-
path: string,
|
|
1377
|
+
path: string, remoteItemName: string, opts?: OptionsToAdoptRemoteItem
|
|
1371
1378
|
): Promise<number>;
|
|
1372
1379
|
|
|
1373
1380
|
}
|
|
1374
1381
|
|
|
1375
1382
|
interface OptionsToAdoptRemoteItem {
|
|
1383
|
+
/**
|
|
1384
|
+
* Folder's local version. If not given, current local version is used.
|
|
1385
|
+
*/
|
|
1376
1386
|
localVersion?: number;
|
|
1387
|
+
/**
|
|
1388
|
+
* Folder's remote version. If not given, current remote version is used.
|
|
1389
|
+
*/
|
|
1377
1390
|
remoteVersion?: number;
|
|
1391
|
+
/**
|
|
1392
|
+
* Flag to force replacement of locally referenced item under the same item name (or new name).
|
|
1393
|
+
* If not given, and there is an overlapping local, an exception is thrown.
|
|
1394
|
+
*/
|
|
1395
|
+
replaceLocalItem?: boolean;
|
|
1396
|
+
/**
|
|
1397
|
+
* Name for item when it is added into local folder version.
|
|
1398
|
+
*/
|
|
1399
|
+
newItemName?: string;
|
|
1378
1400
|
}
|
|
1379
1401
|
|
|
1380
1402
|
interface FSEvent {
|
package/build/core-ipc/fs.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export declare namespace fsItem {
|
|
|
41
41
|
interface OptionsToAdoptRemoteItemMsg {
|
|
42
42
|
localVersion?: Value<number>;
|
|
43
43
|
remoteVersion?: Value<number>;
|
|
44
|
+
replaceLocalItem?: Value<boolean>;
|
|
45
|
+
newItemName?: Value<string>;
|
|
44
46
|
}
|
|
45
47
|
export declare function optionsToAdoptRemoteItemToMsg(opts: OptionsToAdoptRemoteItem | undefined): OptionsToAdoptRemoteItemMsg | undefined;
|
|
46
48
|
export declare function optionsToAdoptRemoteItemFromMsg(msg: OptionsToAdoptRemoteItemMsg | undefined): OptionsToAdoptRemoteItem | undefined;
|
package/build/core-ipc/fs.js
CHANGED
|
@@ -1920,7 +1920,9 @@ function optionsToAdoptRemoteItemToMsg(opts) {
|
|
|
1920
1920
|
}
|
|
1921
1921
|
return {
|
|
1922
1922
|
localVersion: (0, protobuf_msg_1.toOptVal)(opts.localVersion),
|
|
1923
|
-
remoteVersion: (0, protobuf_msg_1.toOptVal)(opts.remoteVersion)
|
|
1923
|
+
remoteVersion: (0, protobuf_msg_1.toOptVal)(opts.remoteVersion),
|
|
1924
|
+
replaceLocalItem: (0, protobuf_msg_1.toOptVal)(opts.replaceLocalItem),
|
|
1925
|
+
newItemName: (0, protobuf_msg_1.toOptVal)(opts.newItemName)
|
|
1924
1926
|
};
|
|
1925
1927
|
}
|
|
1926
1928
|
function optionsToAdoptRemoteItemFromMsg(msg) {
|
|
@@ -1929,7 +1931,9 @@ function optionsToAdoptRemoteItemFromMsg(msg) {
|
|
|
1929
1931
|
}
|
|
1930
1932
|
return {
|
|
1931
1933
|
localVersion: (0, protobuf_msg_1.valOfOptInt)(msg.localVersion),
|
|
1932
|
-
remoteVersion: (0, protobuf_msg_1.valOfOptInt)(msg.remoteVersion)
|
|
1934
|
+
remoteVersion: (0, protobuf_msg_1.valOfOptInt)(msg.remoteVersion),
|
|
1935
|
+
replaceLocalItem: (0, protobuf_msg_1.valOfOpt)(msg.replaceLocalItem),
|
|
1936
|
+
newItemName: (0, protobuf_msg_1.valOfOpt)(msg.newItemName)
|
|
1933
1937
|
};
|
|
1934
1938
|
}
|
|
1935
1939
|
var vsAdoptRemoteFolderItem;
|
|
@@ -157,7 +157,7 @@ export declare class FolderNode extends NodeInFS<FolderPersistance> {
|
|
|
157
157
|
createOnRemote: boolean;
|
|
158
158
|
} | undefined>;
|
|
159
159
|
private getNodesRemovedBetweenVersions;
|
|
160
|
-
adoptRemoteFolderItem(
|
|
160
|
+
adoptRemoteFolderItem(remoteItemName: string, opts: OptionsToAdoptRemoteItem | undefined): Promise<number>;
|
|
161
161
|
private addRemoteChild;
|
|
162
162
|
private replaceLocalChildWithRemote;
|
|
163
163
|
diffCurrentAndRemote(remoteVersion: number | undefined): Promise<FolderDiff | undefined>;
|
|
@@ -890,7 +890,7 @@ class FolderNode extends node_in_fs_1.NodeInFS {
|
|
|
890
890
|
const { removedNodes } = identifyChanges(syncedState.nodes, stateToUpload.nodes);
|
|
891
891
|
return removedNodes;
|
|
892
892
|
}
|
|
893
|
-
async adoptRemoteFolderItem(
|
|
893
|
+
async adoptRemoteFolderItem(remoteItemName, opts) {
|
|
894
894
|
if (opts === null || opts === void 0 ? void 0 : opts.localVersion) {
|
|
895
895
|
if (this.version !== opts.localVersion) {
|
|
896
896
|
throw (0, exceptions_1.makeFSSyncException)(this.name, {
|
|
@@ -922,30 +922,44 @@ class FolderNode extends node_in_fs_1.NodeInFS {
|
|
|
922
922
|
const storage = this.syncedStorage();
|
|
923
923
|
const srcOfRemote = await storage.getObjSrcOfRemoteVersion(this.objId, remote.latest);
|
|
924
924
|
const { folderInfo: { nodes: remoteNodes } } = await this.crypto.read(srcOfRemote);
|
|
925
|
-
const remoteChildNode = remoteNodes[
|
|
925
|
+
const remoteChildNode = remoteNodes[remoteItemName];
|
|
926
926
|
if (!remoteChildNode) {
|
|
927
927
|
throw (0, exceptions_1.makeFSSyncException)(this.name, {
|
|
928
928
|
remoteFolderItemNotFound: true,
|
|
929
|
-
message: `Item '${
|
|
929
|
+
message: `Item '${remoteItemName}' is not found in remote version`
|
|
930
930
|
});
|
|
931
931
|
}
|
|
932
|
-
|
|
933
|
-
if (
|
|
934
|
-
|
|
932
|
+
let dstItemName = remoteItemName;
|
|
933
|
+
if (typeof (opts === null || opts === void 0 ? void 0 : opts.newItemName) === 'string') {
|
|
934
|
+
const newItemName = opts.newItemName.trim();
|
|
935
|
+
if (newItemName.length > 0) {
|
|
936
|
+
dstItemName = newItemName;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
const localNodeWithSameName = this.getNodeInfo(dstItemName, true);
|
|
940
|
+
if (!localNodeWithSameName) {
|
|
941
|
+
return await this.addRemoteChild(remoteChildNode, dstItemName);
|
|
935
942
|
}
|
|
936
|
-
else if (
|
|
937
|
-
(0, assert_1.assert)(typeOfNode(
|
|
943
|
+
else if (localNodeWithSameName.objId === remoteChildNode.objId) {
|
|
944
|
+
(0, assert_1.assert)(typeOfNode(localNodeWithSameName) === typeOfNode(remoteChildNode));
|
|
938
945
|
// XXX
|
|
939
946
|
throw new Error(`Adaptation of changing keys needs implementation`);
|
|
940
947
|
}
|
|
941
|
-
else {
|
|
948
|
+
else if (opts === null || opts === void 0 ? void 0 : opts.replaceLocalItem) {
|
|
942
949
|
return await this.replaceLocalChildWithRemote(remoteChildNode);
|
|
943
950
|
}
|
|
951
|
+
else {
|
|
952
|
+
throw (0, exceptions_1.makeFSSyncException)(this.name, {
|
|
953
|
+
overlapsLocalItem: true,
|
|
954
|
+
message: `Local item exists under name '${dstItemName}' and option flag is not forcing replacement`
|
|
955
|
+
});
|
|
956
|
+
}
|
|
944
957
|
}
|
|
945
|
-
async addRemoteChild(remoteChildNode) {
|
|
958
|
+
async addRemoteChild(remoteChildNode, childName) {
|
|
946
959
|
let newVersion;
|
|
947
960
|
await this.doTransition(async (state, version) => {
|
|
948
961
|
newVersion = version;
|
|
962
|
+
remoteChildNode.name = childName;
|
|
949
963
|
state.nodes[remoteChildNode.name] = remoteChildNode;
|
|
950
964
|
const event = {
|
|
951
965
|
type: 'entry-addition',
|
|
@@ -33583,6 +33583,8 @@ $root.fs = (function() {
|
|
|
33583
33583
|
* @interface IOptions
|
|
33584
33584
|
* @property {common.IUInt64Value|null} [localVersion] Options localVersion
|
|
33585
33585
|
* @property {common.IUInt64Value|null} [uploadVersion] Options uploadVersion
|
|
33586
|
+
* @property {common.IBooleanValue|null} [replaceLocalItem] Options replaceLocalItem
|
|
33587
|
+
* @property {common.IStringValue|null} [newItemName] Options newItemName
|
|
33586
33588
|
*/
|
|
33587
33589
|
|
|
33588
33590
|
/**
|
|
@@ -33616,6 +33618,22 @@ $root.fs = (function() {
|
|
|
33616
33618
|
*/
|
|
33617
33619
|
Options.prototype.uploadVersion = null;
|
|
33618
33620
|
|
|
33621
|
+
/**
|
|
33622
|
+
* Options replaceLocalItem.
|
|
33623
|
+
* @member {common.IBooleanValue|null|undefined} replaceLocalItem
|
|
33624
|
+
* @memberof fs.AdoptRemoteFolderItemRequestBody.Options
|
|
33625
|
+
* @instance
|
|
33626
|
+
*/
|
|
33627
|
+
Options.prototype.replaceLocalItem = null;
|
|
33628
|
+
|
|
33629
|
+
/**
|
|
33630
|
+
* Options newItemName.
|
|
33631
|
+
* @member {common.IStringValue|null|undefined} newItemName
|
|
33632
|
+
* @memberof fs.AdoptRemoteFolderItemRequestBody.Options
|
|
33633
|
+
* @instance
|
|
33634
|
+
*/
|
|
33635
|
+
Options.prototype.newItemName = null;
|
|
33636
|
+
|
|
33619
33637
|
/**
|
|
33620
33638
|
* Creates a new Options instance using the specified properties.
|
|
33621
33639
|
* @function create
|
|
@@ -33644,6 +33662,10 @@ $root.fs = (function() {
|
|
|
33644
33662
|
$root.common.UInt64Value.encode(message.localVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
33645
33663
|
if (message.uploadVersion != null && Object.hasOwnProperty.call(message, "uploadVersion"))
|
|
33646
33664
|
$root.common.UInt64Value.encode(message.uploadVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
33665
|
+
if (message.replaceLocalItem != null && Object.hasOwnProperty.call(message, "replaceLocalItem"))
|
|
33666
|
+
$root.common.BooleanValue.encode(message.replaceLocalItem, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
33667
|
+
if (message.newItemName != null && Object.hasOwnProperty.call(message, "newItemName"))
|
|
33668
|
+
$root.common.StringValue.encode(message.newItemName, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
33647
33669
|
return writer;
|
|
33648
33670
|
};
|
|
33649
33671
|
|
|
@@ -33688,6 +33710,14 @@ $root.fs = (function() {
|
|
|
33688
33710
|
message.uploadVersion = $root.common.UInt64Value.decode(reader, reader.uint32());
|
|
33689
33711
|
break;
|
|
33690
33712
|
}
|
|
33713
|
+
case 3: {
|
|
33714
|
+
message.replaceLocalItem = $root.common.BooleanValue.decode(reader, reader.uint32());
|
|
33715
|
+
break;
|
|
33716
|
+
}
|
|
33717
|
+
case 4: {
|
|
33718
|
+
message.newItemName = $root.common.StringValue.decode(reader, reader.uint32());
|
|
33719
|
+
break;
|
|
33720
|
+
}
|
|
33691
33721
|
default:
|
|
33692
33722
|
reader.skipType(tag & 7);
|
|
33693
33723
|
break;
|
|
@@ -33733,6 +33763,16 @@ $root.fs = (function() {
|
|
|
33733
33763
|
if (error)
|
|
33734
33764
|
return "uploadVersion." + error;
|
|
33735
33765
|
}
|
|
33766
|
+
if (message.replaceLocalItem != null && message.hasOwnProperty("replaceLocalItem")) {
|
|
33767
|
+
var error = $root.common.BooleanValue.verify(message.replaceLocalItem);
|
|
33768
|
+
if (error)
|
|
33769
|
+
return "replaceLocalItem." + error;
|
|
33770
|
+
}
|
|
33771
|
+
if (message.newItemName != null && message.hasOwnProperty("newItemName")) {
|
|
33772
|
+
var error = $root.common.StringValue.verify(message.newItemName);
|
|
33773
|
+
if (error)
|
|
33774
|
+
return "newItemName." + error;
|
|
33775
|
+
}
|
|
33736
33776
|
return null;
|
|
33737
33777
|
};
|
|
33738
33778
|
|
|
@@ -33758,6 +33798,16 @@ $root.fs = (function() {
|
|
|
33758
33798
|
throw TypeError(".fs.AdoptRemoteFolderItemRequestBody.Options.uploadVersion: object expected");
|
|
33759
33799
|
message.uploadVersion = $root.common.UInt64Value.fromObject(object.uploadVersion);
|
|
33760
33800
|
}
|
|
33801
|
+
if (object.replaceLocalItem != null) {
|
|
33802
|
+
if (typeof object.replaceLocalItem !== "object")
|
|
33803
|
+
throw TypeError(".fs.AdoptRemoteFolderItemRequestBody.Options.replaceLocalItem: object expected");
|
|
33804
|
+
message.replaceLocalItem = $root.common.BooleanValue.fromObject(object.replaceLocalItem);
|
|
33805
|
+
}
|
|
33806
|
+
if (object.newItemName != null) {
|
|
33807
|
+
if (typeof object.newItemName !== "object")
|
|
33808
|
+
throw TypeError(".fs.AdoptRemoteFolderItemRequestBody.Options.newItemName: object expected");
|
|
33809
|
+
message.newItemName = $root.common.StringValue.fromObject(object.newItemName);
|
|
33810
|
+
}
|
|
33761
33811
|
return message;
|
|
33762
33812
|
};
|
|
33763
33813
|
|
|
@@ -33777,11 +33827,17 @@ $root.fs = (function() {
|
|
|
33777
33827
|
if (options.defaults) {
|
|
33778
33828
|
object.localVersion = null;
|
|
33779
33829
|
object.uploadVersion = null;
|
|
33830
|
+
object.replaceLocalItem = null;
|
|
33831
|
+
object.newItemName = null;
|
|
33780
33832
|
}
|
|
33781
33833
|
if (message.localVersion != null && message.hasOwnProperty("localVersion"))
|
|
33782
33834
|
object.localVersion = $root.common.UInt64Value.toObject(message.localVersion, options);
|
|
33783
33835
|
if (message.uploadVersion != null && message.hasOwnProperty("uploadVersion"))
|
|
33784
33836
|
object.uploadVersion = $root.common.UInt64Value.toObject(message.uploadVersion, options);
|
|
33837
|
+
if (message.replaceLocalItem != null && message.hasOwnProperty("replaceLocalItem"))
|
|
33838
|
+
object.replaceLocalItem = $root.common.BooleanValue.toObject(message.replaceLocalItem, options);
|
|
33839
|
+
if (message.newItemName != null && message.hasOwnProperty("newItemName"))
|
|
33840
|
+
object.newItemName = $root.common.StringValue.toObject(message.newItemName, options);
|
|
33785
33841
|
return object;
|
|
33786
33842
|
};
|
|
33787
33843
|
|
package/build/protos/fs.proto.js
CHANGED
|
@@ -14604,6 +14604,8 @@ $root.fs = (function() {
|
|
|
14604
14604
|
* @interface IOptions
|
|
14605
14605
|
* @property {common.IUInt64Value|null} [localVersion] Options localVersion
|
|
14606
14606
|
* @property {common.IUInt64Value|null} [uploadVersion] Options uploadVersion
|
|
14607
|
+
* @property {common.IBooleanValue|null} [replaceLocalItem] Options replaceLocalItem
|
|
14608
|
+
* @property {common.IStringValue|null} [newItemName] Options newItemName
|
|
14607
14609
|
*/
|
|
14608
14610
|
|
|
14609
14611
|
/**
|
|
@@ -14637,6 +14639,22 @@ $root.fs = (function() {
|
|
|
14637
14639
|
*/
|
|
14638
14640
|
Options.prototype.uploadVersion = null;
|
|
14639
14641
|
|
|
14642
|
+
/**
|
|
14643
|
+
* Options replaceLocalItem.
|
|
14644
|
+
* @member {common.IBooleanValue|null|undefined} replaceLocalItem
|
|
14645
|
+
* @memberof fs.AdoptRemoteFolderItemRequestBody.Options
|
|
14646
|
+
* @instance
|
|
14647
|
+
*/
|
|
14648
|
+
Options.prototype.replaceLocalItem = null;
|
|
14649
|
+
|
|
14650
|
+
/**
|
|
14651
|
+
* Options newItemName.
|
|
14652
|
+
* @member {common.IStringValue|null|undefined} newItemName
|
|
14653
|
+
* @memberof fs.AdoptRemoteFolderItemRequestBody.Options
|
|
14654
|
+
* @instance
|
|
14655
|
+
*/
|
|
14656
|
+
Options.prototype.newItemName = null;
|
|
14657
|
+
|
|
14640
14658
|
/**
|
|
14641
14659
|
* Creates a new Options instance using the specified properties.
|
|
14642
14660
|
* @function create
|
|
@@ -14665,6 +14683,10 @@ $root.fs = (function() {
|
|
|
14665
14683
|
$root.common.UInt64Value.encode(message.localVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
14666
14684
|
if (message.uploadVersion != null && Object.hasOwnProperty.call(message, "uploadVersion"))
|
|
14667
14685
|
$root.common.UInt64Value.encode(message.uploadVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
14686
|
+
if (message.replaceLocalItem != null && Object.hasOwnProperty.call(message, "replaceLocalItem"))
|
|
14687
|
+
$root.common.BooleanValue.encode(message.replaceLocalItem, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
14688
|
+
if (message.newItemName != null && Object.hasOwnProperty.call(message, "newItemName"))
|
|
14689
|
+
$root.common.StringValue.encode(message.newItemName, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
14668
14690
|
return writer;
|
|
14669
14691
|
};
|
|
14670
14692
|
|
|
@@ -14709,6 +14731,14 @@ $root.fs = (function() {
|
|
|
14709
14731
|
message.uploadVersion = $root.common.UInt64Value.decode(reader, reader.uint32());
|
|
14710
14732
|
break;
|
|
14711
14733
|
}
|
|
14734
|
+
case 3: {
|
|
14735
|
+
message.replaceLocalItem = $root.common.BooleanValue.decode(reader, reader.uint32());
|
|
14736
|
+
break;
|
|
14737
|
+
}
|
|
14738
|
+
case 4: {
|
|
14739
|
+
message.newItemName = $root.common.StringValue.decode(reader, reader.uint32());
|
|
14740
|
+
break;
|
|
14741
|
+
}
|
|
14712
14742
|
default:
|
|
14713
14743
|
reader.skipType(tag & 7);
|
|
14714
14744
|
break;
|
|
@@ -14754,6 +14784,16 @@ $root.fs = (function() {
|
|
|
14754
14784
|
if (error)
|
|
14755
14785
|
return "uploadVersion." + error;
|
|
14756
14786
|
}
|
|
14787
|
+
if (message.replaceLocalItem != null && message.hasOwnProperty("replaceLocalItem")) {
|
|
14788
|
+
var error = $root.common.BooleanValue.verify(message.replaceLocalItem);
|
|
14789
|
+
if (error)
|
|
14790
|
+
return "replaceLocalItem." + error;
|
|
14791
|
+
}
|
|
14792
|
+
if (message.newItemName != null && message.hasOwnProperty("newItemName")) {
|
|
14793
|
+
var error = $root.common.StringValue.verify(message.newItemName);
|
|
14794
|
+
if (error)
|
|
14795
|
+
return "newItemName." + error;
|
|
14796
|
+
}
|
|
14757
14797
|
return null;
|
|
14758
14798
|
};
|
|
14759
14799
|
|
|
@@ -14779,6 +14819,16 @@ $root.fs = (function() {
|
|
|
14779
14819
|
throw TypeError(".fs.AdoptRemoteFolderItemRequestBody.Options.uploadVersion: object expected");
|
|
14780
14820
|
message.uploadVersion = $root.common.UInt64Value.fromObject(object.uploadVersion);
|
|
14781
14821
|
}
|
|
14822
|
+
if (object.replaceLocalItem != null) {
|
|
14823
|
+
if (typeof object.replaceLocalItem !== "object")
|
|
14824
|
+
throw TypeError(".fs.AdoptRemoteFolderItemRequestBody.Options.replaceLocalItem: object expected");
|
|
14825
|
+
message.replaceLocalItem = $root.common.BooleanValue.fromObject(object.replaceLocalItem);
|
|
14826
|
+
}
|
|
14827
|
+
if (object.newItemName != null) {
|
|
14828
|
+
if (typeof object.newItemName !== "object")
|
|
14829
|
+
throw TypeError(".fs.AdoptRemoteFolderItemRequestBody.Options.newItemName: object expected");
|
|
14830
|
+
message.newItemName = $root.common.StringValue.fromObject(object.newItemName);
|
|
14831
|
+
}
|
|
14782
14832
|
return message;
|
|
14783
14833
|
};
|
|
14784
14834
|
|
|
@@ -14798,11 +14848,17 @@ $root.fs = (function() {
|
|
|
14798
14848
|
if (options.defaults) {
|
|
14799
14849
|
object.localVersion = null;
|
|
14800
14850
|
object.uploadVersion = null;
|
|
14851
|
+
object.replaceLocalItem = null;
|
|
14852
|
+
object.newItemName = null;
|
|
14801
14853
|
}
|
|
14802
14854
|
if (message.localVersion != null && message.hasOwnProperty("localVersion"))
|
|
14803
14855
|
object.localVersion = $root.common.UInt64Value.toObject(message.localVersion, options);
|
|
14804
14856
|
if (message.uploadVersion != null && message.hasOwnProperty("uploadVersion"))
|
|
14805
14857
|
object.uploadVersion = $root.common.UInt64Value.toObject(message.uploadVersion, options);
|
|
14858
|
+
if (message.replaceLocalItem != null && message.hasOwnProperty("replaceLocalItem"))
|
|
14859
|
+
object.replaceLocalItem = $root.common.BooleanValue.toObject(message.replaceLocalItem, options);
|
|
14860
|
+
if (message.newItemName != null && message.hasOwnProperty("newItemName"))
|
|
14861
|
+
object.newItemName = $root.common.StringValue.toObject(message.newItemName, options);
|
|
14806
14862
|
return object;
|
|
14807
14863
|
};
|
|
14808
14864
|
|
package/package.json
CHANGED
package/protos/fs.proto
CHANGED
|
@@ -531,6 +531,8 @@ message AdoptRemoteFolderItemRequestBody {
|
|
|
531
531
|
message Options {
|
|
532
532
|
common.UInt64Value local_version = 1;
|
|
533
533
|
common.UInt64Value upload_version = 2;
|
|
534
|
+
common.BooleanValue replace_local_item = 3;
|
|
535
|
+
common.StringValue new_item_name = 4;
|
|
534
536
|
}
|
|
535
537
|
string path = 1;
|
|
536
538
|
string item_name = 2;
|