core-3nweb-client-lib 0.27.0 → 0.27.4

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 (81) hide show
  1. package/build/api-defs/files.d.ts +56 -26
  2. package/build/core/asmail/config/index.d.ts +2 -2
  3. package/build/core/asmail/config/index.js +2 -2
  4. package/build/core/asmail/config/invitations-anon.d.ts +10 -24
  5. package/build/core/asmail/config/invitations-anon.js +43 -31
  6. package/build/core/asmail/config/published-intro-key.d.ts +11 -22
  7. package/build/core/asmail/config/published-intro-key.js +47 -38
  8. package/build/core/asmail/inbox/attachments/fs.d.ts +2 -1
  9. package/build/core/asmail/inbox/attachments/fs.js +4 -3
  10. package/build/core/asmail/inbox/index.js +2 -2
  11. package/build/core/asmail/index.d.ts +1 -1
  12. package/build/core/asmail/index.js +2 -2
  13. package/build/core/asmail/keyring/correspondent-keys.d.ts +2 -2
  14. package/build/core/asmail/keyring/correspondent-keys.js +1 -1
  15. package/build/core/asmail/keyring/index.d.ts +9 -29
  16. package/build/core/asmail/keyring/index.js +82 -69
  17. package/build/core/id-manager/index.d.ts +43 -0
  18. package/build/core/{id-manager.js → id-manager/index.js} +33 -114
  19. package/build/core/id-manager/key-storage.d.ts +21 -0
  20. package/build/core/id-manager/key-storage.js +96 -0
  21. package/build/core/index.js +22 -25
  22. package/build/core/sign-in.d.ts +1 -2
  23. package/build/core/sign-in.js +5 -14
  24. package/build/core/sign-up.d.ts +2 -0
  25. package/build/core/sign-up.js +2 -1
  26. package/build/core/storage/index.d.ts +4 -2
  27. package/build/core/storage/index.js +36 -57
  28. package/build/core/storage/local/storage.d.ts +1 -1
  29. package/build/core/storage/synced/obj-files-gc.d.ts +1 -4
  30. package/build/core/storage/synced/obj-files-gc.js +1 -18
  31. package/build/core/storage/synced/obj-files.d.ts +11 -1
  32. package/build/core/storage/synced/obj-files.js +59 -34
  33. package/build/core/storage/synced/obj-status.d.ts +19 -7
  34. package/build/core/storage/synced/obj-status.js +158 -83
  35. package/build/core/storage/synced/storage.d.ts +7 -2
  36. package/build/core/storage/synced/storage.js +38 -15
  37. package/build/core/storage/synced/upsyncer.d.ts +4 -4
  38. package/build/core/storage/synced/upsyncer.js +14 -9
  39. package/build/ipc-via-protobuf/file.d.ts +7 -0
  40. package/build/ipc-via-protobuf/file.js +60 -27
  41. package/build/ipc-via-protobuf/fs.js +55 -38
  42. package/build/lib-client/3nstorage/exceptions.d.ts +13 -1
  43. package/build/lib-client/3nstorage/exceptions.js +9 -3
  44. package/build/lib-client/3nstorage/service.d.ts +6 -2
  45. package/build/lib-client/3nstorage/service.js +33 -17
  46. package/build/lib-client/3nstorage/util/file-based-json.js +2 -1
  47. package/build/lib-client/3nstorage/util/for-arrays.d.ts +1 -0
  48. package/build/lib-client/3nstorage/util/for-arrays.js +32 -0
  49. package/build/lib-client/3nstorage/xsp-fs/common.d.ts +5 -4
  50. package/build/lib-client/3nstorage/xsp-fs/common.js +1 -0
  51. package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +5 -10
  52. package/build/lib-client/3nstorage/xsp-fs/file-node.js +43 -45
  53. package/build/lib-client/3nstorage/xsp-fs/file.d.ts +7 -6
  54. package/build/lib-client/3nstorage/xsp-fs/file.js +14 -20
  55. package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +16 -5
  56. package/build/lib-client/3nstorage/xsp-fs/folder-node.js +238 -68
  57. package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +18 -17
  58. package/build/lib-client/3nstorage/xsp-fs/fs.js +32 -37
  59. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +15 -11
  60. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +72 -22
  61. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +1 -1
  62. package/build/lib-client/local-files/device-fs.js +11 -11
  63. package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +5 -2
  64. package/build/lib-client/objs-on-disk/obj-on-disk.js +16 -1
  65. package/build/lib-client/user-with-mid-session.d.ts +2 -1
  66. package/build/lib-client/user-with-mid-session.js +7 -1
  67. package/build/lib-common/async-fs-node.js +8 -8
  68. package/build/lib-common/exceptions/file.d.ts +4 -2
  69. package/build/lib-common/exceptions/file.js +24 -58
  70. package/build/lib-common/ipc/generic-ipc.js +5 -4
  71. package/build/lib-common/objs-on-disk/file-layout.js +1 -1
  72. package/build/lib-common/objs-on-disk/utils.js +1 -1
  73. package/build/lib-common/service-api/3nstorage/owner.d.ts +8 -9
  74. package/build/lib-common/service-api/3nstorage/owner.js +2 -1
  75. package/build/protos/asmail.proto.js +5943 -4348
  76. package/build/protos/file.proto.js +874 -0
  77. package/build/protos/fs.proto.js +7014 -5419
  78. package/package.json +3 -2
  79. package/protos/file.proto +23 -7
  80. package/protos/fs.proto +27 -13
  81. package/build/core/id-manager.d.ts +0 -46
@@ -1,6 +1,7 @@
1
1
  import { ScryptGenParams } from '../../key-derivation';
2
2
  import { AsyncSBoxCryptor, Subscribe, ObjSource } from 'xsp-files';
3
3
  import { Observable } from 'rxjs';
4
+ import { LogError } from '../../logging/log-to-file';
4
5
  export { AsyncSBoxCryptor } from 'xsp-files';
5
6
  export { FolderInJSON } from './folder-node';
6
7
  declare type StorageType = web3n.files.FSType;
@@ -16,7 +17,6 @@ export interface Node {
16
17
  objId: string;
17
18
  name: string;
18
19
  type: NodeType;
19
- removeObj(src?: FSChangeSrc): Promise<void>;
20
20
  }
21
21
  export declare type NodeType = 'file' | 'link' | 'folder';
22
22
  export declare type ObjId = string | null;
@@ -58,6 +58,7 @@ export interface Storage {
58
58
  readonly versioned: boolean;
59
59
  readonly cryptor: AsyncSBoxCryptor;
60
60
  readonly nodes: NodesContainer;
61
+ readonly logError: LogError;
61
62
  getNodeEvents(): Observable<NodeEvent>;
62
63
  broadcastNodeEvent(objId: ObjId, parentObjId: ObjId | undefined, childObjId: ObjId | undefined, ev: NodeEvent['event']): void;
63
64
  /**
@@ -73,10 +74,8 @@ export interface Storage {
73
74
  generateNewObjId(): Promise<string>;
74
75
  /**
75
76
  * This returns a promise, resolvable to source for a requested object.
76
- * @param objId
77
- * @param version
78
77
  */
79
- getObjSrc(objId: ObjId, version?: number): Promise<ObjSource>;
78
+ getObjSrc(objId: ObjId, version?: number, allowArchived?: boolean): Promise<ObjSource>;
80
79
  /**
81
80
  * This saves given object, asynchronously.
82
81
  * @param objId
@@ -114,6 +113,7 @@ export interface SyncedStorage extends Storage {
114
113
  getRootKeyDerivParamsFromServer(): Promise<ScryptGenParams>;
115
114
  adoptRemote(objId: ObjId, opts: OptionsToAdopteRemote | undefined): Promise<number | undefined>;
116
115
  updateStatusInfo(objId: ObjId): Promise<SyncStatus>;
116
+ isObjOnDisk(objId: ObjId): Promise<boolean>;
117
117
  isRemoteVersionOnDisk(objId: ObjId, version: number): Promise<'partial' | 'complete' | 'none'>;
118
118
  download(objId: ObjId, version: number): Promise<void>;
119
119
  upload(objId: ObjId, localVersion: number, uploadVersion: number, uploadHeader: UploadHeaderChange | undefined, createOnRemote: boolean): Promise<void>;
@@ -124,6 +124,7 @@ export interface SyncedStorage extends Storage {
124
124
  export interface SyncedObjStatus extends LocalObjStatus {
125
125
  syncStatus(): SyncStatus;
126
126
  neverUploaded(): boolean;
127
+ versionBeforeUnsyncedRemoval(): number | undefined;
127
128
  }
128
129
  export interface UploadHeaderChange {
129
130
  localVersion: number;
@@ -98,6 +98,7 @@ function wrapStorageImplementation(impl) {
98
98
  type: impl.type,
99
99
  versioned: impl.versioned,
100
100
  nodes: impl.nodes,
101
+ logError: impl.logError,
101
102
  getNodeEvents: impl.getNodeEvents.bind(impl),
102
103
  broadcastNodeEvent: impl.broadcastNodeEvent.bind(impl),
103
104
  storageForLinking: impl.storageForLinking.bind(impl),
@@ -11,6 +11,7 @@ import { NodePersistance } from './node-persistence';
11
11
  declare type FileByteSource = web3n.files.FileByteSource;
12
12
  declare type FileByteSink = web3n.files.FileByteSink;
13
13
  declare type XAttrsChanges = web3n.files.XAttrsChanges;
14
+ declare type VersionedReadFlags = web3n.files.VersionedReadFlags;
14
15
  interface FileAttrs {
15
16
  attrs: CommonAttrs;
16
17
  size: number;
@@ -19,14 +20,8 @@ interface FileAttrs {
19
20
  declare class FilePersistance extends NodePersistance {
20
21
  constructor(zNonce: Uint8Array, key: Uint8Array, cryptor: AsyncSBoxCryptor);
21
22
  getAttrs(objSrc: ObjSource): Promise<FileAttrs>;
22
- getFileSource(objSrc: ObjSource, getAttrs?: boolean): Promise<{
23
- src: FileByteSource;
24
- fileAttrs?: FileAttrs;
25
- }>;
26
- readBytes(objSrc: ObjSource, start: number | undefined, end: number | undefined, getAttrs?: boolean): Promise<{
27
- bytes?: Uint8Array;
28
- fileAttrs?: FileAttrs;
29
- }>;
23
+ getFileSource(objSrc: ObjSource): Promise<FileByteSource>;
24
+ readBytes(objSrc: ObjSource, start: number | undefined, end: number | undefined): Promise<Uint8Array | undefined>;
30
25
  saveBytes(bytes: Uint8Array | Uint8Array[], version: number, attrs: CommonAttrs, xattrs: XAttrs | undefined): Promise<Subscribe>;
31
26
  getFileSink(version: number, attrs: CommonAttrs, xattrs: XAttrs | undefined, base: ObjSource | undefined): Promise<{
32
27
  sinkPromise: Promise<FileByteSink>;
@@ -48,11 +43,11 @@ export declare class FileNode extends NodeInFS<FilePersistance> {
48
43
  protected setCurrentStateFrom(src: ObjSource): Promise<void>;
49
44
  private setUpdatedState;
50
45
  get size(): number;
51
- readSrc(): Promise<{
46
+ readSrc(flags: VersionedReadFlags | undefined): Promise<{
52
47
  src: FileByteSource;
53
48
  version: number;
54
49
  }>;
55
- readBytes(start: number | undefined, end: number | undefined): Promise<{
50
+ readBytes(start: number | undefined, end: number | undefined, flags: VersionedReadFlags | undefined): Promise<{
56
51
  bytes: Uint8Array | undefined;
57
52
  version: number;
58
53
  }>;
@@ -43,14 +43,11 @@ class FilePersistance extends node_persistence_1.NodePersistance {
43
43
  const payload = await super.readonlyPayload(objSrc);
44
44
  return await fileAttrsFrom(payload);
45
45
  }
46
- async getFileSource(objSrc, getAttrs = false) {
46
+ async getFileSource(objSrc) {
47
47
  const payload = await this.readonlyPayload(objSrc);
48
- const src = payload.makeFileByteSource();
49
- return (getAttrs ?
50
- { src, fileAttrs: await fileAttrsFrom(payload) } :
51
- { src });
48
+ return payload.makeFileByteSource();
52
49
  }
53
- async readBytes(objSrc, start, end, getAttrs = false) {
50
+ async readBytes(objSrc, start, end) {
54
51
  if ((typeof start === 'number') && (start < 0)) {
55
52
  throw new Error(`Parameter start has bad value: ${start}`);
56
53
  }
@@ -64,22 +61,18 @@ class FilePersistance extends node_persistence_1.NodePersistance {
64
61
  end = size;
65
62
  }
66
63
  else if (start >= size) {
67
- return (getAttrs ? { fileAttrs: await fileAttrsFrom(payload) } : {});
64
+ return;
68
65
  }
69
66
  if (typeof end === 'number') {
70
67
  end = Math.min(size, end);
71
68
  if (end <= start) {
72
- return (getAttrs ?
73
- { fileAttrs: await fileAttrsFrom(payload) } : {});
69
+ return;
74
70
  }
75
71
  }
76
72
  else {
77
73
  end = size;
78
74
  }
79
- const bytes = await payload.readSomeContentBytes(start, end);
80
- return (getAttrs ?
81
- { bytes, fileAttrs: await fileAttrsFrom(payload) } :
82
- { bytes });
75
+ return await payload.readSomeContentBytes(start, end);
83
76
  }
84
77
  async saveBytes(bytes, version, attrs, xattrs) {
85
78
  return super.writeWhole(bytes, version, attrs, xattrs);
@@ -139,45 +132,50 @@ class FileNode extends node_in_fs_1.NodeInFS {
139
132
  get size() {
140
133
  return this.fileSize;
141
134
  }
142
- async readSrc() {
143
- const objSrc = await this.storage.getObjSrc(this.objId);
144
- if ((this.storage.type === 'synced') || (this.storage.type === 'local')) {
145
- const version = objSrc.version;
146
- if (this.version < version) {
147
- const { src, fileAttrs } = await this.crypto.getFileSource(objSrc, true);
148
- this.setUpdatedState(version, fileAttrs);
149
- return { src, version };
150
- }
151
- else {
152
- const { src } = await this.crypto.getFileSource(objSrc);
153
- return { src, version };
154
- }
135
+ async readSrc(flags) {
136
+ const objSrc = await this.getObjSrcOfVersion(flags);
137
+ let version;
138
+ if ((this.storage.type === 'synced')
139
+ || (this.storage.type === 'local')
140
+ || (this.storage.type === 'share')) {
141
+ version = objSrc.version;
155
142
  }
156
143
  else {
157
- const { src } = await this.crypto.getFileSource(objSrc);
158
- // unversioned storage passes undefined version
159
- return { src, version: undefined };
144
+ version = undefined;
160
145
  }
146
+ const src = await this.crypto.getFileSource(objSrc);
147
+ return { src, version };
161
148
  }
162
- async readBytes(start, end) {
163
- const objSrc = await this.storage.getObjSrc(this.objId);
164
- if ((this.storage.type === 'synced') || (this.storage.type === 'local')) {
165
- const version = objSrc.version;
166
- if (this.version < version) {
167
- const { bytes, fileAttrs } = await this.crypto.readBytes(objSrc, start, end, true);
168
- this.setUpdatedState(version, fileAttrs);
169
- return { bytes, version };
170
- }
171
- else {
172
- const { bytes } = await this.crypto.readBytes(objSrc, start, end);
173
- return { bytes, version };
174
- }
149
+ async readBytes(start, end, flags) {
150
+ const objSrc = await this.getObjSrcOfVersion(flags);
151
+ let version;
152
+ if ((this.storage.type === 'synced')
153
+ || (this.storage.type === 'local')
154
+ || (this.storage.type === 'share')) {
155
+ version = objSrc.version;
175
156
  }
176
157
  else {
177
- const { bytes } = await this.crypto.readBytes(objSrc, start, end);
178
- // unversioned storage passes undefined version
179
- return { bytes, version: undefined };
158
+ version = undefined;
180
159
  }
160
+ const bytes = await this.crypto.readBytes(objSrc, start, end);
161
+ return { bytes, version };
162
+ // if ((this.storage.type === 'synced') || (this.storage.type === 'local')) {
163
+ // const version = objSrc.version;
164
+ // if (this.version < version) {
165
+ // const {
166
+ // bytes, fileAttrs
167
+ // } = await this.crypto.readBytes(objSrc, start, end, true);
168
+ // // this.setUpdatedState(version, fileAttrs!);
169
+ // return { bytes, version };
170
+ // } else {
171
+ // const { bytes } = await this.crypto.readBytes(objSrc, start, end);
172
+ // return { bytes, version };
173
+ // }
174
+ // } else {
175
+ // const { bytes } = await this.crypto.readBytes(objSrc, start, end);
176
+ // // unversioned storage passes undefined version
177
+ // return { bytes, version: (undefined as any) };
178
+ // }
181
179
  }
182
180
  async writeSink(truncate, currentVersion, changes) {
183
181
  const deferredSink = (0, deferred_1.defer)();
@@ -15,6 +15,7 @@ declare type SyncStatus = web3n.files.SyncStatus;
15
15
  declare type WritableFileVersionedAPI = web3n.files.WritableFileVersionedAPI;
16
16
  declare type OptionsToAdopteRemote = web3n.files.OptionsToAdopteRemote;
17
17
  declare type OptionsToUploadLocal = web3n.files.OptionsToUploadLocal;
18
+ declare type VersionedReadFlags = web3n.files.VersionedReadFlags;
18
19
  export declare class FileObject implements WritableFile, Linkable {
19
20
  name: string;
20
21
  isNew: boolean;
@@ -54,11 +55,11 @@ declare class V implements WritableFileVersionedAPI, N {
54
55
  getNode(): Promise<FileNode>;
55
56
  ensureIsWritable(): void;
56
57
  updateXAttrs(changes: XAttrsChanges): Promise<number>;
57
- getXAttr(xaName: string): Promise<{
58
+ getXAttr(xaName: string, flags?: VersionedReadFlags): Promise<{
58
59
  attr: any;
59
60
  version: number;
60
61
  }>;
61
- listXAttrs(): Promise<{
62
+ listXAttrs(flags?: VersionedReadFlags): Promise<{
62
63
  lst: string[];
63
64
  version: number;
64
65
  }>;
@@ -67,23 +68,23 @@ declare class V implements WritableFileVersionedAPI, N {
67
68
  sink: FileByteSink;
68
69
  version: number;
69
70
  }>;
70
- getByteSource(): Promise<{
71
+ getByteSource(flags?: VersionedReadFlags): Promise<{
71
72
  src: FileByteSource;
72
73
  version: number;
73
74
  }>;
74
75
  writeBytes(bytes: Uint8Array): Promise<number>;
75
76
  writeTxt(txt: string): Promise<number>;
76
77
  writeJSON(json: any): Promise<number>;
77
- readBytes(start?: number, end?: number): Promise<{
78
+ readBytes(start?: number, end?: number, flags?: VersionedReadFlags): Promise<{
78
79
  bytes: Uint8Array | undefined;
79
80
  version: number;
80
81
  }>;
81
- readTxt(): Promise<{
82
+ readTxt(flags?: VersionedReadFlags): Promise<{
82
83
  txt: string;
83
84
  version: number;
84
85
  }>;
85
86
  copy(file: File): Promise<number>;
86
- readJSON<T>(): Promise<{
87
+ readJSON<T>(flags?: VersionedReadFlags): Promise<{
87
88
  json: T;
88
89
  version: number;
89
90
  }>;
@@ -148,19 +148,13 @@ class V {
148
148
  const node = await this.getNode();
149
149
  return node.updateXAttrs(changes);
150
150
  }
151
- async getXAttr(xaName) {
151
+ async getXAttr(xaName, flags) {
152
152
  const node = await this.getNode();
153
- return {
154
- attr: node.getXAttr(xaName),
155
- version: node.version
156
- };
153
+ return await node.getXAttr(xaName, flags);
157
154
  }
158
- async listXAttrs() {
155
+ async listXAttrs(flags) {
159
156
  const node = await this.getNode();
160
- return {
161
- lst: node.listXAttrs(),
162
- version: node.version
163
- };
157
+ return await node.listXAttrs(flags);
164
158
  }
165
159
  async getLinkParams() {
166
160
  if (!this.node) {
@@ -176,11 +170,11 @@ class V {
176
170
  const node = await this.getNode();
177
171
  return node.writeSink(truncate, currentVersion);
178
172
  }
179
- async getByteSource() {
173
+ async getByteSource(flags) {
180
174
  if (!this.node) {
181
- throw (0, file_1.makeFileException)(file_1.Code.notFound, this.name);
175
+ throw (0, file_1.makeFileException)('notFound', this.name);
182
176
  }
183
- return this.node.readSrc();
177
+ return this.node.readSrc(flags);
184
178
  }
185
179
  async writeBytes(bytes) {
186
180
  this.ensureIsWritable();
@@ -194,14 +188,14 @@ class V {
194
188
  writeJSON(json) {
195
189
  return this.writeTxt(JSON.stringify(json));
196
190
  }
197
- async readBytes(start, end) {
191
+ async readBytes(start, end, flags) {
198
192
  if (!this.node) {
199
- throw (0, file_1.makeFileException)(file_1.Code.notFound, this.name);
193
+ throw (0, file_1.makeFileException)('notFound', this.name);
200
194
  }
201
- return await this.node.readBytes(start, end);
195
+ return await this.node.readBytes(start, end, flags);
202
196
  }
203
- async readTxt() {
204
- const { bytes, version } = await this.readBytes();
197
+ async readTxt(flags) {
198
+ const { bytes, version } = await this.readBytes(undefined, undefined, flags);
205
199
  const txt = (bytes ? buffer_utils_1.utf8.open(bytes) : '');
206
200
  return { txt, version };
207
201
  }
@@ -212,8 +206,8 @@ class V {
212
206
  await (0, pipe_1.pipe)(src, sink);
213
207
  return version;
214
208
  }
215
- async readJSON() {
216
- const { txt, version } = await this.readTxt();
209
+ async readJSON(flags) {
210
+ const { txt, version } = await this.readTxt(flags);
217
211
  const json = JSON.parse(txt);
218
212
  return { json, version };
219
213
  }
@@ -1,4 +1,4 @@
1
- import { Storage, Node, NodeType, FSChangeSrc } from './common';
1
+ import { Storage, NodeType } from './common';
2
2
  import { NodeInFS } from './node-in-fs';
3
3
  import { FileNode } from './file-node';
4
4
  import { LinkNode } from './link-node';
@@ -12,6 +12,7 @@ declare type FolderDiff = web3n.files.FolderDiff;
12
12
  declare type OptionsToAdopteRemote = web3n.files.OptionsToAdopteRemote;
13
13
  declare type OptionsToAdoptRemoteItem = web3n.files.OptionsToAdoptRemoteItem;
14
14
  declare type OptionsToUploadLocal = web3n.files.OptionsToUploadLocal;
15
+ declare type VersionedReadFlags = web3n.files.VersionedReadFlags;
15
16
  export interface NodeInfo {
16
17
  /**
17
18
  * This is a usual file name.
@@ -58,6 +59,7 @@ declare class FolderPersistance extends NodePersistance {
58
59
  attrs: CommonAttrs;
59
60
  xattrs?: XAttrs;
60
61
  }>;
62
+ static readFolderContent(objId: string | null, key: Uint8Array, src: ObjSource, cryptor: AsyncSBoxCryptor): Promise<FolderInfo>;
61
63
  }
62
64
  export interface FolderLinkParams {
63
65
  folderName: string;
@@ -74,15 +76,19 @@ export declare class FolderNode extends NodeInFS<FolderPersistance> {
74
76
  static rootFromJSON(storage: Storage, name: string | undefined, folderJson: FolderInJSON): FolderNode;
75
77
  protected setCurrentStateFrom(src: ObjSource): Promise<void>;
76
78
  adoptRemote(opts: OptionsToAdopteRemote | undefined): Promise<void>;
79
+ private callRemoveObjOn;
77
80
  list(): {
78
81
  lst: ListingEntry[];
79
82
  version: number;
80
83
  };
84
+ listNonCurrent(flags: VersionedReadFlags): Promise<{
85
+ lst: ListingEntry[];
86
+ version: number;
87
+ }>;
81
88
  childExistsInSyncedVersion(childObjId: string): Promise<boolean>;
82
- listFolders(): string[];
83
89
  getNodeInfo(name: string, undefOnMissing?: boolean): NodeInfo | undefined;
84
90
  hasChild(childName: string, throwIfMissing?: boolean): boolean;
85
- getNode<T extends Node>(type: NodeType | undefined, name: string, undefOnMissing?: boolean): Promise<T | undefined>;
91
+ getNode<T extends NodeInFS<any>>(type: NodeType | undefined, name: string, undefOnMissing?: boolean): Promise<T | undefined>;
86
92
  private getOrMakeChildNodeForInfo;
87
93
  getFolder(name: string, undefOnMissing?: boolean): Promise<FolderNode | undefined>;
88
94
  getFile(name: string, undefOnMissing?: boolean): Promise<FileNode | undefined>;
@@ -131,17 +137,22 @@ export declare class FolderNode extends NodeInFS<FolderPersistance> {
131
137
  */
132
138
  isEmpty(): boolean;
133
139
  private getAllNodes;
134
- protected delete(src: FSChangeSrc): Promise<void>;
140
+ private removeFolderObj;
141
+ private callRemoveObjOnAll;
142
+ private removeChildrenObjsInSyncedStorage;
143
+ private uploadRemovalOfObjs;
135
144
  getParamsForLink(): LinkParameters<FolderLinkParams>;
136
145
  upload(opts: OptionsToUploadLocal | undefined): Promise<void>;
146
+ private uploadRemovalOf;
147
+ private listRemovedInTreeToUploadRm;
137
148
  protected needUpload(localVersion: number | undefined): Promise<{
138
149
  localVersion: number;
139
150
  uploadVersion: number;
140
151
  createOnRemote: boolean;
141
152
  } | undefined>;
153
+ private getNodesRemovedBetweenVersions;
142
154
  adoptRemoteFolderItem(itemName: string, opts: OptionsToAdoptRemoteItem | undefined): Promise<number>;
143
155
  private addRemoteChild;
144
- private setRemoteNodeInfo;
145
156
  private replaceLocalChildWithRemote;
146
157
  diffCurrentAndRemote(remoteVersion: number | undefined): Promise<FolderDiff | undefined>;
147
158
  private diffWithArchivedRemote;