core-3nweb-client-lib 0.42.15 → 0.43.0

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.
@@ -574,12 +574,11 @@ declare namespace web3n.files {
574
574
  interface ReadonlyFileSyncAPI {
575
575
 
576
576
  /**
577
- * Returns synchronization status of this object, as is currently known
578
- * here without checking remote server.
577
+ * Returns synchronization status of this object.
578
+ * @param skipServerCheck is optional parameter to skip server check, that may be handy in offline
579
+ * situations. Default is false.
579
580
  */
580
- status(): Promise<SyncStatus>;
581
-
582
- updateStatusInfo(): Promise<SyncStatus>;
581
+ status(skipServerCheck?: boolean): Promise<SyncStatus>;
583
582
 
584
583
  isRemoteVersionOnDisk(
585
584
  version: number
@@ -1177,12 +1176,12 @@ declare namespace web3n.files {
1177
1176
  interface ReadonlyFSSyncAPI {
1178
1177
 
1179
1178
  /**
1180
- * Returns synchronization status of this object, as is currently known
1181
- * here without checking remote server.
1179
+ * Returns synchronization status of item at given path.
1180
+ * @param path
1181
+ * @param skipServerCheck is optional parameter to skip server check, that may be handy in offline
1182
+ * situations. Default is false.
1182
1183
  */
1183
- status(path: string): Promise<SyncStatus>;
1184
-
1185
- updateStatusInfo(path: string): Promise<SyncStatus>;
1184
+ status(path: string, skipServerCheck?: boolean): Promise<SyncStatus>;
1186
1185
 
1187
1186
  isRemoteVersionOnDisk(
1188
1187
  path: string, version: number
@@ -11,9 +11,9 @@ export declare class Msg {
11
11
  readonly r: ResourcesForSending;
12
12
  readonly progress: DeliveryProgress;
13
13
  private readonly msgFS;
14
+ private static readonly progressSavingProcs;
14
15
  private readonly sendingProc;
15
16
  private completionPromise;
16
- private readonly progressSavingProc;
17
17
  private cancelled;
18
18
  private sender;
19
19
  private recipients;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2016 - 2018, 2020, 2023 3NSoft Inc.
3
+ Copyright (C) 2016 - 2018, 2020, 2023, 2025 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -65,7 +65,7 @@ class Msg {
65
65
  this.msgFS = msgFS;
66
66
  this.sendingProc = new synced_1.SingleProc();
67
67
  this.completionPromise = undefined;
68
- this.progressSavingProc = new synced_1.SingleProc();
68
+ // private readonly progressSavingProc = new SingleProc();
69
69
  this.cancelled = false;
70
70
  this.sender = undefined;
71
71
  this.recipients = undefined;
@@ -101,7 +101,9 @@ class Msg {
101
101
  return msg;
102
102
  }
103
103
  static async forRestart(id, msgFS, r) {
104
- const progress = await msgFS.readJSONFile(PROGRESS_INFO_FILE_NAME);
104
+ const progress = await Msg.progressSavingProcs.startOrChain(id, async () => {
105
+ return await msgFS.readJSONFile(PROGRESS_INFO_FILE_NAME);
106
+ });
105
107
  if (progress.allDone) {
106
108
  return new Msg(id, undefined, progress, undefined);
107
109
  }
@@ -148,11 +150,13 @@ class Msg {
148
150
  this.r.notifyMsgProgress(this.id, (0, json_utils_1.copy)(this.progress));
149
151
  this.progressPublisher.next((0, json_utils_1.copy)(this.progress));
150
152
  if (saveProgress) {
151
- this.progressSavingProc.startOrChain(() => this.msgFS.writeJSONFile(PROGRESS_INFO_FILE_NAME, this.progress, {}));
153
+ Msg.progressSavingProcs.startOrChain(this.id, async () => {
154
+ await this.msgFS.writeJSONFile(PROGRESS_INFO_FILE_NAME, this.progress, {});
155
+ });
152
156
  }
153
157
  if (this.isDone()) {
154
158
  this.progressPublisher.complete();
155
- this.progressSavingProc.startOrChain(async () => {
159
+ Msg.progressSavingProcs.startOrChain(this.id, async () => {
156
160
  await this.msgFS.deleteFile(WIPS_INFO_FILE_NAME).catch(noop);
157
161
  if (this.attachments) {
158
162
  await this.attachments.deleteFrom(this.msgFS);
@@ -160,7 +164,7 @@ class Msg {
160
164
  });
161
165
  }
162
166
  else if (saveWIPs) {
163
- this.progressSavingProc.startOrChain(async () => {
167
+ Msg.progressSavingProcs.startOrChain(this.id, async () => {
164
168
  await this.msgFS.writeJSONFile(WIPS_INFO_FILE_NAME, this.wipsInfo);
165
169
  });
166
170
  }
@@ -227,7 +231,7 @@ class Msg {
227
231
  return;
228
232
  }
229
233
  this.cancelled = true;
230
- const filesProc = this.progressSavingProc.latestTaskAtThisMoment();
234
+ const filesProc = Msg.progressSavingProcs.latestTaskAtThisMoment(this.id);
231
235
  if (!filesProc) {
232
236
  return;
233
237
  }
@@ -341,6 +345,7 @@ class Msg {
341
345
  }
342
346
  }
343
347
  exports.Msg = Msg;
348
+ Msg.progressSavingProcs = new synced_1.NamedProcs();
344
349
  Object.freeze(Msg.prototype);
345
350
  Object.freeze(Msg);
346
351
  function noop() { }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2022 3NSoft Inc.
3
+ Copyright (C) 2022, 2025 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -54,7 +54,8 @@ class IdKeysStorage {
54
54
  if (!exc.notFound) {
55
55
  throw exc;
56
56
  }
57
- await this.fs.v.sync.updateStatusInfo('');
57
+ // XXX this isn't a complete story, and needs proper implementation
58
+ await this.fs.v.sync.status('');
58
59
  await this.fs.v.sync.adoptRemote('');
59
60
  if (await this.fs.checkFilePresence(LOGIN_KEY_FILE_NAME)) {
60
61
  return this.getSavedKey();
@@ -82,7 +82,7 @@ class AppDataFolders {
82
82
  });
83
83
  }
84
84
  async syncBeforeChange() {
85
- const { state } = await this.fs.v.sync.updateStatusInfo('');
85
+ const { state } = await this.fs.v.sync.status('');
86
86
  if (state === 'behind') {
87
87
  await this.fs.v.sync.adoptRemote('');
88
88
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2020, 2022 3NSoft Inc.
3
+ Copyright (C) 2020, 2022, 2025 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -95,7 +95,6 @@ function makeFileCaller(caller, fileMsg) {
95
95
  const vsPath = (0, protobuf_msg_1.methodPathFor)(vPath, 'sync');
96
96
  file.v.sync = {
97
97
  status: vsStatus.makeCaller(caller, vsPath),
98
- updateStatusInfo: vsUpdateStatusInfo.makeCaller(caller, vsPath),
99
98
  isRemoteVersionOnDisk: vsIsRemoteVersionOnDisk.makeCaller(caller, vsPath),
100
99
  download: vsDownload.makeCaller(caller, vsPath),
101
100
  adoptRemote: vsAdoptRemote.makeCaller(caller, vsPath),
@@ -149,7 +148,6 @@ function exposeFileService(file, expServices) {
149
148
  if (file.v.sync) {
150
149
  implExp.v.sync = {
151
150
  status: vsStatus.wrapService(file.v.sync.status),
152
- updateStatusInfo: vsUpdateStatusInfo.wrapService(file.v.sync.updateStatusInfo),
153
151
  isRemoteVersionOnDisk: vsIsRemoteVersionOnDisk.wrapService(file.v.sync.isRemoteVersionOnDisk),
154
152
  download: vsDownload.wrapService(file.v.sync.download),
155
153
  adoptRemote: vsAdoptRemote.wrapService(file.v.sync.adoptRemote),
@@ -1095,8 +1093,8 @@ Object.freeze(vGetByteSink);
1095
1093
  var vsStatus;
1096
1094
  (function (vsStatus) {
1097
1095
  function wrapService(fn) {
1098
- return () => {
1099
- const promise = fn()
1096
+ return buf => {
1097
+ const promise = fn(protobuf_msg_1.boolValType.unpack(buf).value)
1100
1098
  .then(packSyncStatus);
1101
1099
  return { promise };
1102
1100
  };
@@ -1104,32 +1102,13 @@ var vsStatus;
1104
1102
  vsStatus.wrapService = wrapService;
1105
1103
  function makeCaller(caller, objPath) {
1106
1104
  const path = (0, protobuf_msg_1.methodPathFor)(objPath, 'status');
1107
- return () => caller
1108
- .startPromiseCall(path, undefined)
1105
+ return (skipServerCheck) => caller
1106
+ .startPromiseCall(path, protobuf_msg_1.boolValType.pack((0, protobuf_msg_1.toVal)(!!skipServerCheck)))
1109
1107
  .then(unpackSyncStatus);
1110
1108
  }
1111
1109
  vsStatus.makeCaller = makeCaller;
1112
1110
  })(vsStatus || (vsStatus = {}));
1113
1111
  Object.freeze(vsStatus);
1114
- var vsUpdateStatusInfo;
1115
- (function (vsUpdateStatusInfo) {
1116
- function wrapService(fn) {
1117
- return () => {
1118
- const promise = fn()
1119
- .then(packSyncStatus);
1120
- return { promise };
1121
- };
1122
- }
1123
- vsUpdateStatusInfo.wrapService = wrapService;
1124
- function makeCaller(caller, objPath) {
1125
- const path = (0, protobuf_msg_1.methodPathFor)(objPath, 'updateStatusInfo');
1126
- return () => caller
1127
- .startPromiseCall(path, undefined)
1128
- .then(unpackSyncStatus);
1129
- }
1130
- vsUpdateStatusInfo.makeCaller = makeCaller;
1131
- })(vsUpdateStatusInfo || (vsUpdateStatusInfo = {}));
1132
- Object.freeze(vsUpdateStatusInfo);
1133
1112
  var vsIsRemoteVersionOnDisk;
1134
1113
  (function (vsIsRemoteVersionOnDisk) {
1135
1114
  const requestType = protobuf_type_1.ProtoType.for(file_proto_1.file.FileSyncIsOnDiskRequestBody);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2020, 2022 3NSoft Inc.
3
+ Copyright (C) 2020, 2022, 2025 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -103,7 +103,6 @@ function makeFSCaller(caller, fsMsg) {
103
103
  const vsPath = (0, protobuf_msg_1.methodPathFor)(vPath, 'sync');
104
104
  fs.v.sync = {
105
105
  status: vsStatus.makeCaller(caller, vsPath),
106
- updateStatusInfo: vsUpdateStatusInfo.makeCaller(caller, vsPath),
107
106
  isRemoteVersionOnDisk: vsIsRemoteVersionOnDisk.makeCaller(caller, vsPath),
108
107
  download: vsDownload.makeCaller(caller, vsPath),
109
108
  adoptRemote: vsAdoptRemote.makeCaller(caller, vsPath),
@@ -111,8 +110,7 @@ function makeFSCaller(caller, fsMsg) {
111
110
  };
112
111
  if (fs.writable) {
113
112
  fs.v.sync.upload = vsUpload.makeCaller(caller, vsPath);
114
- fs.v.sync.adoptRemoteFolderItem =
115
- vsAdoptRemoteFolderItem.makeCaller(caller, vsPath);
113
+ fs.v.sync.adoptRemoteFolderItem = vsAdoptRemoteFolderItem.makeCaller(caller, vsPath);
116
114
  }
117
115
  }
118
116
  }
@@ -182,7 +180,6 @@ function exposeFSService(fs, expServices) {
182
180
  if (fs.v.sync) {
183
181
  implExp.v.sync = {
184
182
  status: vsStatus.wrapService(fs.v.sync.status),
185
- updateStatusInfo: vsUpdateStatusInfo.wrapService(fs.v.sync.updateStatusInfo),
186
183
  isRemoteVersionOnDisk: vsIsRemoteVersionOnDisk.wrapService(fs.v.sync.isRemoteVersionOnDisk),
187
184
  download: vsDownload.wrapService(fs.v.sync.download),
188
185
  adoptRemote: vsAdoptRemote.wrapService(fs.v.sync.adoptRemote),
@@ -190,8 +187,7 @@ function exposeFSService(fs, expServices) {
190
187
  };
191
188
  if (fs.writable) {
192
189
  implExp.v.sync.upload = vsUpload.wrapService(fs.v.sync.upload);
193
- implExp.v.sync.adoptRemoteFolderItem =
194
- vsAdoptRemoteFolderItem.wrapService(fs.v.sync.adoptRemoteFolderItem);
190
+ implExp.v.sync.adoptRemoteFolderItem = vsAdoptRemoteFolderItem.wrapService(fs.v.sync.adoptRemoteFolderItem);
195
191
  }
196
192
  }
197
193
  }
@@ -1887,10 +1883,11 @@ var vGetByteSink;
1887
1883
  Object.freeze(vGetByteSink);
1888
1884
  var vsStatus;
1889
1885
  (function (vsStatus) {
1886
+ const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.FSSyncStatusRequestBody);
1890
1887
  function wrapService(fn) {
1891
1888
  return buf => {
1892
- const { path } = reqWithPathType.unpack(buf);
1893
- const promise = fn(path)
1889
+ const { path, skipServerCheck } = requestType.unpack(buf);
1890
+ const promise = fn(path, skipServerCheck)
1894
1891
  .then(file.packSyncStatus);
1895
1892
  return { promise };
1896
1893
  };
@@ -1898,33 +1895,13 @@ var vsStatus;
1898
1895
  vsStatus.wrapService = wrapService;
1899
1896
  function makeCaller(caller, objPath) {
1900
1897
  const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'status');
1901
- return (path) => caller
1902
- .startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
1898
+ return (path, skipServerCheck) => caller
1899
+ .startPromiseCall(ipcPath, requestType.pack({ path, skipServerCheck: !!skipServerCheck }))
1903
1900
  .then(file.unpackSyncStatus);
1904
1901
  }
1905
1902
  vsStatus.makeCaller = makeCaller;
1906
1903
  })(vsStatus || (vsStatus = {}));
1907
1904
  Object.freeze(vsStatus);
1908
- var vsUpdateStatusInfo;
1909
- (function (vsUpdateStatusInfo) {
1910
- function wrapService(fn) {
1911
- return buf => {
1912
- const { path } = reqWithPathType.unpack(buf);
1913
- const promise = fn(path)
1914
- .then(file.packSyncStatus);
1915
- return { promise };
1916
- };
1917
- }
1918
- vsUpdateStatusInfo.wrapService = wrapService;
1919
- function makeCaller(caller, objPath) {
1920
- const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'updateStatusInfo');
1921
- return (path) => caller
1922
- .startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
1923
- .then(file.unpackSyncStatus);
1924
- }
1925
- vsUpdateStatusInfo.makeCaller = makeCaller;
1926
- })(vsUpdateStatusInfo || (vsUpdateStatusInfo = {}));
1927
- Object.freeze(vsUpdateStatusInfo);
1928
1905
  var vsIsRemoteVersionOnDisk;
1929
1906
  (function (vsIsRemoteVersionOnDisk) {
1930
1907
  const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.FSSyncIsOnDiskRequestBody);
@@ -89,9 +89,9 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
89
89
  responseType: 'json'
90
90
  });
91
91
  if (rep.status === api.msgMetadata.SC.ok) {
92
- const meta = api.sanitizedMeta(rep.data);
92
+ const { meta, errMsg } = api.sanitizedMeta(rep.data);
93
93
  if (!meta) {
94
- throw (0, request_utils_1.makeException)(rep, 'Malformed response');
94
+ throw (0, request_utils_1.makeException)(rep, `Malformed message metadata in a server response: ${errMsg}`);
95
95
  }
96
96
  return meta;
97
97
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2016 - 2022 3NSoft Inc.
3
+ Copyright (C) 2016 - 2022, 2025 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -86,7 +86,6 @@ function wrapWritableFileSyncAPI(sImpl) {
86
86
  }
87
87
  const w = {
88
88
  status: sImpl.status.bind(sImpl),
89
- updateStatusInfo: sImpl.updateStatusInfo.bind(sImpl),
90
89
  download: sImpl.download.bind(sImpl),
91
90
  isRemoteVersionOnDisk: sImpl.isRemoteVersionOnDisk.bind(sImpl),
92
91
  upload: sImpl.upload.bind(sImpl),
@@ -138,7 +137,6 @@ function wrapReadonlyFileSyncAPI(sImpl) {
138
137
  }
139
138
  const w = {
140
139
  status: sImpl.status.bind(sImpl),
141
- updateStatusInfo: sImpl.updateStatusInfo.bind(sImpl),
142
140
  download: sImpl.download.bind(sImpl),
143
141
  isRemoteVersionOnDisk: sImpl.isRemoteVersionOnDisk.bind(sImpl),
144
142
  adoptRemote: sImpl.adoptRemote.bind(sImpl),
@@ -232,7 +230,6 @@ function wrapWritableFSSyncAPI(sImpl) {
232
230
  }
233
231
  const w = {
234
232
  status: sImpl.status.bind(sImpl),
235
- updateStatusInfo: sImpl.updateStatusInfo.bind(sImpl),
236
233
  download: sImpl.download.bind(sImpl),
237
234
  isRemoteVersionOnDisk: sImpl.isRemoteVersionOnDisk.bind(sImpl),
238
235
  adoptRemote: sImpl.adoptRemote.bind(sImpl),
@@ -293,7 +290,6 @@ function wrapReadonlyFSSyncAPI(sImpl) {
293
290
  }
294
291
  const w = {
295
292
  status: sImpl.status.bind(sImpl),
296
- updateStatusInfo: sImpl.updateStatusInfo.bind(sImpl),
297
293
  download: sImpl.download.bind(sImpl),
298
294
  isRemoteVersionOnDisk: sImpl.isRemoteVersionOnDisk.bind(sImpl),
299
295
  adoptRemote: sImpl.adoptRemote.bind(sImpl),
@@ -4,7 +4,7 @@ type ReadonlyFS = web3n.files.ReadonlyFS;
4
4
  type RemoteEvent = web3n.files.RemoteEvent;
5
5
  type FileEvent = web3n.files.FileEvent;
6
6
  type FolderEvent = web3n.files.FolderEvent;
7
- export declare function getRemoteFolderChanges(fs: WritableFS, forceServerCheck?: boolean): Promise<void>;
7
+ export declare function getRemoteFolderChanges(fs: WritableFS): Promise<void>;
8
8
  export declare function getOrMakeAndUploadFolderIn(fs: WritableFS, folder: string): Promise<WritableFS>;
9
9
  export declare function uploadFolderChangesIfAny(fs: WritableFS): Promise<void>;
10
10
  export declare function observableFromTreeEvents(fs: ReadonlyFS, rootPath: string): Observable<RemoteEvent | FileEvent | FolderEvent>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2022 3NSoft Inc.
3
+ Copyright (C) 2022, 2025 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -22,15 +22,9 @@ exports.uploadFolderChangesIfAny = uploadFolderChangesIfAny;
22
22
  exports.observableFromTreeEvents = observableFromTreeEvents;
23
23
  const rxjs_1 = require("rxjs");
24
24
  const exceptions_1 = require("../xsp-fs/exceptions");
25
- async function getRemoteFolderChanges(fs, forceServerCheck = false) {
26
- if (forceServerCheck) {
27
- await fs.v.sync.updateStatusInfo('');
28
- }
25
+ async function getRemoteFolderChanges(fs) {
29
26
  let { state } = await fs.v.sync.status('');
30
27
  if (state === 'behind') {
31
- if (!forceServerCheck) {
32
- await fs.v.sync.updateStatusInfo('');
33
- }
34
28
  await fs.v.sync.adoptRemote('');
35
29
  }
36
30
  else if (state === 'conflicting') {
@@ -58,11 +52,21 @@ async function getOrMakeAndUploadFolderIn(fs, folder) {
58
52
  }
59
53
  }
60
54
  }
55
+ // XXX conflicts are app(let)-specific, hence, we can't have this "general" functionality.
61
56
  async function uploadFolderChangesIfAny(fs) {
62
- const { state } = await fs.v.sync.status('');
63
- if (state === 'unsynced') {
64
- await fs.v.sync.updateStatusInfo('');
65
- await fs.v.sync.upload('');
57
+ try {
58
+ const { state } = await fs.v.sync.status('');
59
+ if (state === 'unsynced') {
60
+ await fs.v.sync.upload('');
61
+ }
62
+ else if (state === 'conflicting') {
63
+ // XXX log conflicts error
64
+ }
65
+ }
66
+ catch (exc) {
67
+ if (exc.type !== 'connect') {
68
+ // XXX log generic error
69
+ }
66
70
  }
67
71
  }
68
72
  function observableFromTreeEvents(fs, rootPath) {
@@ -98,7 +98,7 @@ declare class S implements WritableFileSyncAPI {
98
98
  private readonly n;
99
99
  constructor(n: N);
100
100
  upload(opts?: OptionsToUploadLocal): Promise<number | undefined>;
101
- status(): Promise<SyncStatus>;
101
+ status(skipServerCheck?: boolean): Promise<SyncStatus>;
102
102
  updateStatusInfo(): Promise<SyncStatus>;
103
103
  isRemoteVersionOnDisk(version: number): Promise<'complete' | 'partial' | 'none'>;
104
104
  download(version: number): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2016 - 2020, 2022 3NSoft Inc.
3
+ Copyright (C) 2016 - 2020, 2022, 2025 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -234,10 +234,9 @@ class S {
234
234
  const uploadVersion = await node.upload(opts);
235
235
  return uploadVersion;
236
236
  }
237
- async status() {
237
+ async status(skipServerCheck = false) {
238
238
  const node = await this.n.getNode();
239
- const status = await node.syncStatus();
240
- return status;
239
+ return await (skipServerCheck ? node.syncStatus() : node.updateStatusInfo());
241
240
  }
242
241
  async updateStatusInfo() {
243
242
  const node = await this.n.getNode();
@@ -162,7 +162,7 @@ declare class S implements WritableFSSyncAPI {
162
162
  private readonly n;
163
163
  constructor(n: N);
164
164
  upload(path: string, opts?: OptionsToUploadLocal): Promise<number | undefined>;
165
- status(path: string): Promise<SyncStatus>;
165
+ status(path: string, skipServerCheck?: boolean): Promise<SyncStatus>;
166
166
  updateStatusInfo(path: string): Promise<SyncStatus>;
167
167
  isRemoteVersionOnDisk(path: string, version: number): Promise<'complete' | 'partial' | 'none'>;
168
168
  download(path: string, version: number): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2020, 2022 3NSoft Inc.
3
+ Copyright (C) 2015 - 2020, 2022, 2025 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -734,11 +734,10 @@ class S {
734
734
  }
735
735
  ;
736
736
  }
737
- async status(path) {
737
+ async status(path, skipServerCheck = false) {
738
738
  const node = await this.n.get(path);
739
739
  try {
740
- const status = await node.syncStatus();
741
- return status;
740
+ return await (skipServerCheck ? node.syncStatus() : node.updateStatusInfo());
742
741
  }
743
742
  catch (exc) {
744
743
  throw (0, common_1.setPathInExc)(exc, path);
@@ -75,7 +75,10 @@ export declare namespace msgMetadata {
75
75
  * passes as message meta, or undefined, otherwise.
76
76
  * @param meta is an object that is expected to be message meta
77
77
  */
78
- export declare function sanitizedMeta(meta: MsgMeta): MsgMeta | undefined;
78
+ export declare function sanitizedMeta(meta: MsgMeta): {
79
+ meta?: MsgMeta;
80
+ errMsg?: string;
81
+ };
79
82
  export interface GetObjQueryOpts {
80
83
  /**
81
84
  * This is a boolean flag, which true value indicates that header should be
@@ -97,23 +97,22 @@ Object.freeze(msgMetadata);
97
97
  */
98
98
  function sanitizedMeta(meta) {
99
99
  if (typeof meta !== 'object') {
100
- return;
100
+ return { errMsg: `is not a json object: ${JSON.stringify(meta)}` };
101
101
  }
102
102
  if (typeof meta.objs !== 'object') {
103
- return;
103
+ return { errMsg: `objs field is not an object in: ${JSON.stringify(meta)}` };
104
104
  }
105
105
  for (const objId of Object.keys(meta.objs)) {
106
106
  const st = meta.objs[objId];
107
107
  if (typeof st.size.header !== 'number') {
108
- return;
108
+ return { errMsg: `obj's header is not a number in: ${JSON.stringify(meta)}` };
109
109
  }
110
- if (st.completed &&
111
- (st.size.segments === undefined)) {
112
- return;
110
+ if (st.completed && (st.size.segments === undefined)) {
111
+ return { errMsg: `obj's segments is not a number in: ${JSON.stringify(meta)}` };
113
112
  }
114
113
  }
115
114
  // TODO add more checks and return new object instead of a given one
116
- return meta;
115
+ return { meta };
117
116
  }
118
117
  var msgObj;
119
118
  (function (msgObj) {
@@ -29487,6 +29487,235 @@ $root.fs = (function() {
29487
29487
  return ArchiveCurrentRequestBody;
29488
29488
  })();
29489
29489
 
29490
+ fs.FSSyncStatusRequestBody = (function() {
29491
+
29492
+ /**
29493
+ * Properties of a FSSyncStatusRequestBody.
29494
+ * @memberof fs
29495
+ * @interface IFSSyncStatusRequestBody
29496
+ * @property {string|null} [path] FSSyncStatusRequestBody path
29497
+ * @property {boolean|null} [skipServerCheck] FSSyncStatusRequestBody skipServerCheck
29498
+ */
29499
+
29500
+ /**
29501
+ * Constructs a new FSSyncStatusRequestBody.
29502
+ * @memberof fs
29503
+ * @classdesc Represents a FSSyncStatusRequestBody.
29504
+ * @implements IFSSyncStatusRequestBody
29505
+ * @constructor
29506
+ * @param {fs.IFSSyncStatusRequestBody=} [properties] Properties to set
29507
+ */
29508
+ function FSSyncStatusRequestBody(properties) {
29509
+ if (properties)
29510
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
29511
+ if (properties[keys[i]] != null)
29512
+ this[keys[i]] = properties[keys[i]];
29513
+ }
29514
+
29515
+ /**
29516
+ * FSSyncStatusRequestBody path.
29517
+ * @member {string} path
29518
+ * @memberof fs.FSSyncStatusRequestBody
29519
+ * @instance
29520
+ */
29521
+ FSSyncStatusRequestBody.prototype.path = "";
29522
+
29523
+ /**
29524
+ * FSSyncStatusRequestBody skipServerCheck.
29525
+ * @member {boolean} skipServerCheck
29526
+ * @memberof fs.FSSyncStatusRequestBody
29527
+ * @instance
29528
+ */
29529
+ FSSyncStatusRequestBody.prototype.skipServerCheck = false;
29530
+
29531
+ /**
29532
+ * Creates a new FSSyncStatusRequestBody instance using the specified properties.
29533
+ * @function create
29534
+ * @memberof fs.FSSyncStatusRequestBody
29535
+ * @static
29536
+ * @param {fs.IFSSyncStatusRequestBody=} [properties] Properties to set
29537
+ * @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody instance
29538
+ */
29539
+ FSSyncStatusRequestBody.create = function create(properties) {
29540
+ return new FSSyncStatusRequestBody(properties);
29541
+ };
29542
+
29543
+ /**
29544
+ * Encodes the specified FSSyncStatusRequestBody message. Does not implicitly {@link fs.FSSyncStatusRequestBody.verify|verify} messages.
29545
+ * @function encode
29546
+ * @memberof fs.FSSyncStatusRequestBody
29547
+ * @static
29548
+ * @param {fs.IFSSyncStatusRequestBody} message FSSyncStatusRequestBody message or plain object to encode
29549
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29550
+ * @returns {$protobuf.Writer} Writer
29551
+ */
29552
+ FSSyncStatusRequestBody.encode = function encode(message, writer) {
29553
+ if (!writer)
29554
+ writer = $Writer.create();
29555
+ if (message.path != null && Object.hasOwnProperty.call(message, "path"))
29556
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.path);
29557
+ if (message.skipServerCheck != null && Object.hasOwnProperty.call(message, "skipServerCheck"))
29558
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skipServerCheck);
29559
+ return writer;
29560
+ };
29561
+
29562
+ /**
29563
+ * Encodes the specified FSSyncStatusRequestBody message, length delimited. Does not implicitly {@link fs.FSSyncStatusRequestBody.verify|verify} messages.
29564
+ * @function encodeDelimited
29565
+ * @memberof fs.FSSyncStatusRequestBody
29566
+ * @static
29567
+ * @param {fs.IFSSyncStatusRequestBody} message FSSyncStatusRequestBody message or plain object to encode
29568
+ * @param {$protobuf.Writer} [writer] Writer to encode to
29569
+ * @returns {$protobuf.Writer} Writer
29570
+ */
29571
+ FSSyncStatusRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
29572
+ return this.encode(message, writer).ldelim();
29573
+ };
29574
+
29575
+ /**
29576
+ * Decodes a FSSyncStatusRequestBody message from the specified reader or buffer.
29577
+ * @function decode
29578
+ * @memberof fs.FSSyncStatusRequestBody
29579
+ * @static
29580
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29581
+ * @param {number} [length] Message length if known beforehand
29582
+ * @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
29583
+ * @throws {Error} If the payload is not a reader or valid buffer
29584
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29585
+ */
29586
+ FSSyncStatusRequestBody.decode = function decode(reader, length, error) {
29587
+ if (!(reader instanceof $Reader))
29588
+ reader = $Reader.create(reader);
29589
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.fs.FSSyncStatusRequestBody();
29590
+ while (reader.pos < end) {
29591
+ var tag = reader.uint32();
29592
+ if (tag === error)
29593
+ break;
29594
+ switch (tag >>> 3) {
29595
+ case 1: {
29596
+ message.path = reader.string();
29597
+ break;
29598
+ }
29599
+ case 2: {
29600
+ message.skipServerCheck = reader.bool();
29601
+ break;
29602
+ }
29603
+ default:
29604
+ reader.skipType(tag & 7);
29605
+ break;
29606
+ }
29607
+ }
29608
+ return message;
29609
+ };
29610
+
29611
+ /**
29612
+ * Decodes a FSSyncStatusRequestBody message from the specified reader or buffer, length delimited.
29613
+ * @function decodeDelimited
29614
+ * @memberof fs.FSSyncStatusRequestBody
29615
+ * @static
29616
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
29617
+ * @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
29618
+ * @throws {Error} If the payload is not a reader or valid buffer
29619
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
29620
+ */
29621
+ FSSyncStatusRequestBody.decodeDelimited = function decodeDelimited(reader) {
29622
+ if (!(reader instanceof $Reader))
29623
+ reader = new $Reader(reader);
29624
+ return this.decode(reader, reader.uint32());
29625
+ };
29626
+
29627
+ /**
29628
+ * Verifies a FSSyncStatusRequestBody message.
29629
+ * @function verify
29630
+ * @memberof fs.FSSyncStatusRequestBody
29631
+ * @static
29632
+ * @param {Object.<string,*>} message Plain object to verify
29633
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
29634
+ */
29635
+ FSSyncStatusRequestBody.verify = function verify(message) {
29636
+ if (typeof message !== "object" || message === null)
29637
+ return "object expected";
29638
+ if (message.path != null && message.hasOwnProperty("path"))
29639
+ if (!$util.isString(message.path))
29640
+ return "path: string expected";
29641
+ if (message.skipServerCheck != null && message.hasOwnProperty("skipServerCheck"))
29642
+ if (typeof message.skipServerCheck !== "boolean")
29643
+ return "skipServerCheck: boolean expected";
29644
+ return null;
29645
+ };
29646
+
29647
+ /**
29648
+ * Creates a FSSyncStatusRequestBody message from a plain object. Also converts values to their respective internal types.
29649
+ * @function fromObject
29650
+ * @memberof fs.FSSyncStatusRequestBody
29651
+ * @static
29652
+ * @param {Object.<string,*>} object Plain object
29653
+ * @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
29654
+ */
29655
+ FSSyncStatusRequestBody.fromObject = function fromObject(object) {
29656
+ if (object instanceof $root.fs.FSSyncStatusRequestBody)
29657
+ return object;
29658
+ var message = new $root.fs.FSSyncStatusRequestBody();
29659
+ if (object.path != null)
29660
+ message.path = String(object.path);
29661
+ if (object.skipServerCheck != null)
29662
+ message.skipServerCheck = Boolean(object.skipServerCheck);
29663
+ return message;
29664
+ };
29665
+
29666
+ /**
29667
+ * Creates a plain object from a FSSyncStatusRequestBody message. Also converts values to other types if specified.
29668
+ * @function toObject
29669
+ * @memberof fs.FSSyncStatusRequestBody
29670
+ * @static
29671
+ * @param {fs.FSSyncStatusRequestBody} message FSSyncStatusRequestBody
29672
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
29673
+ * @returns {Object.<string,*>} Plain object
29674
+ */
29675
+ FSSyncStatusRequestBody.toObject = function toObject(message, options) {
29676
+ if (!options)
29677
+ options = {};
29678
+ var object = {};
29679
+ if (options.defaults) {
29680
+ object.path = "";
29681
+ object.skipServerCheck = false;
29682
+ }
29683
+ if (message.path != null && message.hasOwnProperty("path"))
29684
+ object.path = message.path;
29685
+ if (message.skipServerCheck != null && message.hasOwnProperty("skipServerCheck"))
29686
+ object.skipServerCheck = message.skipServerCheck;
29687
+ return object;
29688
+ };
29689
+
29690
+ /**
29691
+ * Converts this FSSyncStatusRequestBody to JSON.
29692
+ * @function toJSON
29693
+ * @memberof fs.FSSyncStatusRequestBody
29694
+ * @instance
29695
+ * @returns {Object.<string,*>} JSON object
29696
+ */
29697
+ FSSyncStatusRequestBody.prototype.toJSON = function toJSON() {
29698
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29699
+ };
29700
+
29701
+ /**
29702
+ * Gets the default type url for FSSyncStatusRequestBody
29703
+ * @function getTypeUrl
29704
+ * @memberof fs.FSSyncStatusRequestBody
29705
+ * @static
29706
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
29707
+ * @returns {string} The default type url
29708
+ */
29709
+ FSSyncStatusRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
29710
+ if (typeUrlPrefix === undefined) {
29711
+ typeUrlPrefix = "type.googleapis.com";
29712
+ }
29713
+ return typeUrlPrefix + "/fs.FSSyncStatusRequestBody";
29714
+ };
29715
+
29716
+ return FSSyncStatusRequestBody;
29717
+ })();
29718
+
29490
29719
  fs.FSSyncIsOnDiskRequestBody = (function() {
29491
29720
 
29492
29721
  /**
@@ -11972,6 +11972,235 @@ $root.fs = (function() {
11972
11972
  return ArchiveCurrentRequestBody;
11973
11973
  })();
11974
11974
 
11975
+ fs.FSSyncStatusRequestBody = (function() {
11976
+
11977
+ /**
11978
+ * Properties of a FSSyncStatusRequestBody.
11979
+ * @memberof fs
11980
+ * @interface IFSSyncStatusRequestBody
11981
+ * @property {string|null} [path] FSSyncStatusRequestBody path
11982
+ * @property {boolean|null} [skipServerCheck] FSSyncStatusRequestBody skipServerCheck
11983
+ */
11984
+
11985
+ /**
11986
+ * Constructs a new FSSyncStatusRequestBody.
11987
+ * @memberof fs
11988
+ * @classdesc Represents a FSSyncStatusRequestBody.
11989
+ * @implements IFSSyncStatusRequestBody
11990
+ * @constructor
11991
+ * @param {fs.IFSSyncStatusRequestBody=} [properties] Properties to set
11992
+ */
11993
+ function FSSyncStatusRequestBody(properties) {
11994
+ if (properties)
11995
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
11996
+ if (properties[keys[i]] != null)
11997
+ this[keys[i]] = properties[keys[i]];
11998
+ }
11999
+
12000
+ /**
12001
+ * FSSyncStatusRequestBody path.
12002
+ * @member {string} path
12003
+ * @memberof fs.FSSyncStatusRequestBody
12004
+ * @instance
12005
+ */
12006
+ FSSyncStatusRequestBody.prototype.path = "";
12007
+
12008
+ /**
12009
+ * FSSyncStatusRequestBody skipServerCheck.
12010
+ * @member {boolean} skipServerCheck
12011
+ * @memberof fs.FSSyncStatusRequestBody
12012
+ * @instance
12013
+ */
12014
+ FSSyncStatusRequestBody.prototype.skipServerCheck = false;
12015
+
12016
+ /**
12017
+ * Creates a new FSSyncStatusRequestBody instance using the specified properties.
12018
+ * @function create
12019
+ * @memberof fs.FSSyncStatusRequestBody
12020
+ * @static
12021
+ * @param {fs.IFSSyncStatusRequestBody=} [properties] Properties to set
12022
+ * @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody instance
12023
+ */
12024
+ FSSyncStatusRequestBody.create = function create(properties) {
12025
+ return new FSSyncStatusRequestBody(properties);
12026
+ };
12027
+
12028
+ /**
12029
+ * Encodes the specified FSSyncStatusRequestBody message. Does not implicitly {@link fs.FSSyncStatusRequestBody.verify|verify} messages.
12030
+ * @function encode
12031
+ * @memberof fs.FSSyncStatusRequestBody
12032
+ * @static
12033
+ * @param {fs.IFSSyncStatusRequestBody} message FSSyncStatusRequestBody message or plain object to encode
12034
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12035
+ * @returns {$protobuf.Writer} Writer
12036
+ */
12037
+ FSSyncStatusRequestBody.encode = function encode(message, writer) {
12038
+ if (!writer)
12039
+ writer = $Writer.create();
12040
+ if (message.path != null && Object.hasOwnProperty.call(message, "path"))
12041
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.path);
12042
+ if (message.skipServerCheck != null && Object.hasOwnProperty.call(message, "skipServerCheck"))
12043
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skipServerCheck);
12044
+ return writer;
12045
+ };
12046
+
12047
+ /**
12048
+ * Encodes the specified FSSyncStatusRequestBody message, length delimited. Does not implicitly {@link fs.FSSyncStatusRequestBody.verify|verify} messages.
12049
+ * @function encodeDelimited
12050
+ * @memberof fs.FSSyncStatusRequestBody
12051
+ * @static
12052
+ * @param {fs.IFSSyncStatusRequestBody} message FSSyncStatusRequestBody message or plain object to encode
12053
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12054
+ * @returns {$protobuf.Writer} Writer
12055
+ */
12056
+ FSSyncStatusRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
12057
+ return this.encode(message, writer).ldelim();
12058
+ };
12059
+
12060
+ /**
12061
+ * Decodes a FSSyncStatusRequestBody message from the specified reader or buffer.
12062
+ * @function decode
12063
+ * @memberof fs.FSSyncStatusRequestBody
12064
+ * @static
12065
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12066
+ * @param {number} [length] Message length if known beforehand
12067
+ * @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
12068
+ * @throws {Error} If the payload is not a reader or valid buffer
12069
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12070
+ */
12071
+ FSSyncStatusRequestBody.decode = function decode(reader, length, error) {
12072
+ if (!(reader instanceof $Reader))
12073
+ reader = $Reader.create(reader);
12074
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.fs.FSSyncStatusRequestBody();
12075
+ while (reader.pos < end) {
12076
+ var tag = reader.uint32();
12077
+ if (tag === error)
12078
+ break;
12079
+ switch (tag >>> 3) {
12080
+ case 1: {
12081
+ message.path = reader.string();
12082
+ break;
12083
+ }
12084
+ case 2: {
12085
+ message.skipServerCheck = reader.bool();
12086
+ break;
12087
+ }
12088
+ default:
12089
+ reader.skipType(tag & 7);
12090
+ break;
12091
+ }
12092
+ }
12093
+ return message;
12094
+ };
12095
+
12096
+ /**
12097
+ * Decodes a FSSyncStatusRequestBody message from the specified reader or buffer, length delimited.
12098
+ * @function decodeDelimited
12099
+ * @memberof fs.FSSyncStatusRequestBody
12100
+ * @static
12101
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12102
+ * @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
12103
+ * @throws {Error} If the payload is not a reader or valid buffer
12104
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12105
+ */
12106
+ FSSyncStatusRequestBody.decodeDelimited = function decodeDelimited(reader) {
12107
+ if (!(reader instanceof $Reader))
12108
+ reader = new $Reader(reader);
12109
+ return this.decode(reader, reader.uint32());
12110
+ };
12111
+
12112
+ /**
12113
+ * Verifies a FSSyncStatusRequestBody message.
12114
+ * @function verify
12115
+ * @memberof fs.FSSyncStatusRequestBody
12116
+ * @static
12117
+ * @param {Object.<string,*>} message Plain object to verify
12118
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
12119
+ */
12120
+ FSSyncStatusRequestBody.verify = function verify(message) {
12121
+ if (typeof message !== "object" || message === null)
12122
+ return "object expected";
12123
+ if (message.path != null && message.hasOwnProperty("path"))
12124
+ if (!$util.isString(message.path))
12125
+ return "path: string expected";
12126
+ if (message.skipServerCheck != null && message.hasOwnProperty("skipServerCheck"))
12127
+ if (typeof message.skipServerCheck !== "boolean")
12128
+ return "skipServerCheck: boolean expected";
12129
+ return null;
12130
+ };
12131
+
12132
+ /**
12133
+ * Creates a FSSyncStatusRequestBody message from a plain object. Also converts values to their respective internal types.
12134
+ * @function fromObject
12135
+ * @memberof fs.FSSyncStatusRequestBody
12136
+ * @static
12137
+ * @param {Object.<string,*>} object Plain object
12138
+ * @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
12139
+ */
12140
+ FSSyncStatusRequestBody.fromObject = function fromObject(object) {
12141
+ if (object instanceof $root.fs.FSSyncStatusRequestBody)
12142
+ return object;
12143
+ var message = new $root.fs.FSSyncStatusRequestBody();
12144
+ if (object.path != null)
12145
+ message.path = String(object.path);
12146
+ if (object.skipServerCheck != null)
12147
+ message.skipServerCheck = Boolean(object.skipServerCheck);
12148
+ return message;
12149
+ };
12150
+
12151
+ /**
12152
+ * Creates a plain object from a FSSyncStatusRequestBody message. Also converts values to other types if specified.
12153
+ * @function toObject
12154
+ * @memberof fs.FSSyncStatusRequestBody
12155
+ * @static
12156
+ * @param {fs.FSSyncStatusRequestBody} message FSSyncStatusRequestBody
12157
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
12158
+ * @returns {Object.<string,*>} Plain object
12159
+ */
12160
+ FSSyncStatusRequestBody.toObject = function toObject(message, options) {
12161
+ if (!options)
12162
+ options = {};
12163
+ var object = {};
12164
+ if (options.defaults) {
12165
+ object.path = "";
12166
+ object.skipServerCheck = false;
12167
+ }
12168
+ if (message.path != null && message.hasOwnProperty("path"))
12169
+ object.path = message.path;
12170
+ if (message.skipServerCheck != null && message.hasOwnProperty("skipServerCheck"))
12171
+ object.skipServerCheck = message.skipServerCheck;
12172
+ return object;
12173
+ };
12174
+
12175
+ /**
12176
+ * Converts this FSSyncStatusRequestBody to JSON.
12177
+ * @function toJSON
12178
+ * @memberof fs.FSSyncStatusRequestBody
12179
+ * @instance
12180
+ * @returns {Object.<string,*>} JSON object
12181
+ */
12182
+ FSSyncStatusRequestBody.prototype.toJSON = function toJSON() {
12183
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12184
+ };
12185
+
12186
+ /**
12187
+ * Gets the default type url for FSSyncStatusRequestBody
12188
+ * @function getTypeUrl
12189
+ * @memberof fs.FSSyncStatusRequestBody
12190
+ * @static
12191
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
12192
+ * @returns {string} The default type url
12193
+ */
12194
+ FSSyncStatusRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
12195
+ if (typeUrlPrefix === undefined) {
12196
+ typeUrlPrefix = "type.googleapis.com";
12197
+ }
12198
+ return typeUrlPrefix + "/fs.FSSyncStatusRequestBody";
12199
+ };
12200
+
12201
+ return FSSyncStatusRequestBody;
12202
+ })();
12203
+
11975
12204
  fs.FSSyncIsOnDiskRequestBody = (function() {
11976
12205
 
11977
12206
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.42.15",
3
+ "version": "0.43.0",
4
4
  "description": "3NWeb client core library, embeddable into different environments",
5
5
  "main": "build/lib-index.js",
6
6
  "types": "build/lib-index.d.ts",
package/protos/file.proto CHANGED
@@ -266,13 +266,9 @@ message ArchiveCurrentRequestBody {
266
266
  // ==== ReadonlyFileSyncAPI referable object ====
267
267
 
268
268
  // --- ReadonlyFileSyncAPI.status ---
269
- // Request body is empty
269
+ // Request body is common.BooleanValue
270
270
  // Reply body is SyncStatusMsg
271
271
 
272
- // --- ReadonlyFileSyncAPI.updateStatusInfo ---
273
- // Request body is PathOnlyRequestBody
274
- // Reply body is SyncState
275
-
276
272
  // --- ReadonlyFileSyncAPI.isRemoteVersionOnDisk ---
277
273
  message FileSyncIsOnDiskRequestBody {
278
274
  uint64 version = 1;
package/protos/fs.proto CHANGED
@@ -464,12 +464,11 @@ message ArchiveCurrentRequestBody {
464
464
  // ==== ReadonlyFSSyncAPI referable object ====
465
465
 
466
466
  // --- ReadonlyFSSyncAPI.status ---
467
- // Request body is PathOnlyRequestBody
468
- // Reply body is file.SyncState
469
-
470
- // --- ReadonlyFSSyncAPI.updateStatusInfo ---
471
- // Request body is PathOnlyRequestBody
472
- // Reply body is file.SyncState
467
+ // Reply body is file.SyncStatusMsg
468
+ message FSSyncStatusRequestBody {
469
+ string path = 1;
470
+ bool skip_server_check = 2;
471
+ }
473
472
 
474
473
  // --- ReadonlyFSSyncAPI.isRemoteVersionOnDisk ---
475
474
  message FSSyncIsOnDiskRequestBody {