@firebase/database 0.8.3-canary.fb90580e5 → 0.8.3

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 (134) hide show
  1. package/dist/index.d.ts +0 -16
  2. package/dist/index.esm.js +34 -163
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.esm2017.js +34 -161
  5. package/dist/index.esm2017.js.map +1 -1
  6. package/dist/index.node.cjs.js +34 -163
  7. package/dist/index.node.cjs.js.map +1 -1
  8. package/dist/src/api/Query.d.ts +0 -2
  9. package/dist/src/core/AuthTokenProvider.d.ts +2 -2
  10. package/dist/src/core/Repo.d.ts +21 -10
  11. package/dist/src/core/RepoManager.d.ts +2 -8
  12. package/dist/src/core/util/NextPushId.d.ts +0 -2
  13. package/dist/src/core/util/util.d.ts +0 -8
  14. package/dist/src/core/view/QueryParams.d.ts +0 -6
  15. package/package.json +13 -16
  16. package/dist/exp/exp/index.d.ts +0 -29
  17. package/dist/exp/index.d.ts +0 -49
  18. package/dist/exp/index.esm.js +0 -15735
  19. package/dist/exp/index.esm.js.map +0 -1
  20. package/dist/exp/index.esm2017.js +0 -15139
  21. package/dist/exp/index.esm2017.js.map +0 -1
  22. package/dist/exp/index.node.cjs.js +0 -15746
  23. package/dist/exp/index.node.cjs.js.map +0 -1
  24. package/dist/exp/index.node.d.ts +0 -83
  25. package/dist/exp/src/api/DataSnapshot.d.ts +0 -99
  26. package/dist/exp/src/api/Database.d.ts +0 -87
  27. package/dist/exp/src/api/Query.d.ts +0 -193
  28. package/dist/exp/src/api/Reference.d.ts +0 -106
  29. package/dist/exp/src/api/TransactionResult.d.ts +0 -30
  30. package/dist/exp/src/api/internal.d.ts +0 -55
  31. package/dist/exp/src/api/onDisconnect.d.ts +0 -60
  32. package/dist/exp/src/api/test_access.d.ts +0 -42
  33. package/dist/exp/src/core/AuthTokenProvider.d.ts +0 -50
  34. package/dist/exp/src/core/CompoundWrite.d.ts +0 -77
  35. package/dist/exp/src/core/PersistentConnection.d.ts +0 -148
  36. package/dist/exp/src/core/ReadonlyRestClient.d.ts +0 -73
  37. package/dist/exp/src/core/Repo.d.ts +0 -121
  38. package/dist/exp/src/core/RepoInfo.d.ts +0 -59
  39. package/dist/exp/src/core/RepoManager.d.ts +0 -78
  40. package/dist/exp/src/core/Repo_transaction.d.ts +0 -33
  41. package/dist/exp/src/core/ServerActions.d.ts +0 -85
  42. package/dist/exp/src/core/SnapshotHolder.d.ts +0 -28
  43. package/dist/exp/src/core/SparseSnapshotTree.d.ts +0 -61
  44. package/dist/exp/src/core/SyncPoint.d.ts +0 -84
  45. package/dist/exp/src/core/SyncTree.d.ts +0 -236
  46. package/dist/exp/src/core/WriteTree.d.ts +0 -295
  47. package/dist/exp/src/core/operation/AckUserWrite.d.ts +0 -42
  48. package/dist/exp/src/core/operation/ListenComplete.d.ts +0 -32
  49. package/dist/exp/src/core/operation/Merge.d.ts +0 -46
  50. package/dist/exp/src/core/operation/Operation.d.ts +0 -78
  51. package/dist/exp/src/core/operation/Overwrite.d.ts +0 -35
  52. package/dist/exp/src/core/snap/ChildrenNode.d.ts +0 -180
  53. package/dist/exp/src/core/snap/IndexMap.d.ts +0 -43
  54. package/dist/exp/src/core/snap/LeafNode.d.ts +0 -107
  55. package/dist/exp/src/core/snap/Node.d.ts +0 -148
  56. package/dist/exp/src/core/snap/childSet.d.ts +0 -34
  57. package/dist/exp/src/core/snap/comparators.d.ts +0 -19
  58. package/dist/exp/src/core/snap/indexes/Index.d.ts +0 -69
  59. package/dist/exp/src/core/snap/indexes/KeyIndex.d.ts +0 -54
  60. package/dist/exp/src/core/snap/indexes/PathIndex.d.ts +0 -54
  61. package/dist/exp/src/core/snap/indexes/PriorityIndex.d.ts +0 -58
  62. package/dist/exp/src/core/snap/indexes/ValueIndex.d.ts +0 -56
  63. package/dist/exp/src/core/snap/nodeFromJSON.d.ts +0 -25
  64. package/dist/exp/src/core/snap/snap.d.ts +0 -29
  65. package/dist/exp/src/core/stats/StatsCollection.d.ts +0 -28
  66. package/dist/exp/src/core/stats/StatsListener.d.ts +0 -31
  67. package/dist/exp/src/core/stats/StatsManager.d.ts +0 -24
  68. package/dist/exp/src/core/stats/StatsReporter.d.ts +0 -33
  69. package/dist/exp/src/core/storage/DOMStorageWrapper.d.ts +0 -55
  70. package/dist/exp/src/core/storage/MemoryStorage.d.ts +0 -29
  71. package/dist/exp/src/core/storage/storage.d.ts +0 -22
  72. package/dist/exp/src/core/util/EventEmitter.d.ts +0 -45
  73. package/dist/exp/src/core/util/ImmutableTree.d.ts +0 -157
  74. package/dist/exp/src/core/util/NextPushId.d.ts +0 -33
  75. package/dist/exp/src/core/util/OnlineMonitor.d.ts +0 -40
  76. package/dist/exp/src/core/util/Path.d.ts +0 -132
  77. package/dist/exp/src/core/util/ServerValues.d.ts +0 -66
  78. package/dist/exp/src/core/util/SortedMap.d.ts +0 -362
  79. package/dist/exp/src/core/util/Tree.d.ts +0 -134
  80. package/dist/exp/src/core/util/VisibilityMonitor.d.ts +0 -30
  81. package/dist/exp/src/core/util/libs/parser.d.ts +0 -37
  82. package/dist/exp/src/core/util/misc.d.ts +0 -19
  83. package/dist/exp/src/core/util/util.d.ts +0 -232
  84. package/dist/exp/src/core/util/validation.d.ts +0 -108
  85. package/dist/exp/src/core/version.d.ts +0 -19
  86. package/dist/exp/src/core/view/CacheNode.d.ts +0 -59
  87. package/dist/exp/src/core/view/Change.d.ts +0 -74
  88. package/dist/exp/src/core/view/ChildChangeAccumulator.d.ts +0 -22
  89. package/dist/exp/src/core/view/CompleteChildSource.d.ts +0 -91
  90. package/dist/exp/src/core/view/Event.d.ts +0 -102
  91. package/dist/exp/src/core/view/EventGenerator.d.ts +0 -77
  92. package/dist/exp/src/core/view/EventQueue.d.ts +0 -99
  93. package/dist/exp/src/core/view/EventRegistration.d.ts +0 -154
  94. package/dist/exp/src/core/view/QueryParams.d.ts +0 -176
  95. package/dist/exp/src/core/view/View.d.ts +0 -97
  96. package/dist/exp/src/core/view/ViewCache.d.ts +0 -70
  97. package/dist/exp/src/core/view/ViewProcessor.d.ts +0 -166
  98. package/dist/exp/src/core/view/filter/IndexedFilter.d.ts +0 -54
  99. package/dist/exp/src/core/view/filter/LimitedFilter.d.ts +0 -94
  100. package/dist/exp/src/core/view/filter/NodeFilter.d.ts +0 -75
  101. package/dist/exp/src/core/view/filter/RangedFilter.d.ts +0 -109
  102. package/dist/exp/src/exp/Database.d.ts +0 -95
  103. package/dist/exp/src/realtime/BrowserPollConnection.d.ts +0 -208
  104. package/dist/exp/src/realtime/Connection.d.ts +0 -119
  105. package/dist/exp/src/realtime/Constants.d.ts +0 -26
  106. package/dist/exp/src/realtime/Transport.d.ts +0 -62
  107. package/dist/exp/src/realtime/TransportManager.d.ts +0 -55
  108. package/dist/exp/src/realtime/WebSocketConnection.d.ts +0 -133
  109. package/dist/exp/src/realtime/polling/PacketReceiver.d.ts +0 -41
  110. package/dist/exp/test/browser/crawler_support.test.d.ts +0 -17
  111. package/dist/exp/test/compound_write.test.d.ts +0 -17
  112. package/dist/exp/test/connection.test.d.ts +0 -17
  113. package/dist/exp/test/database.test.d.ts +0 -17
  114. package/dist/exp/test/datasnapshot.test.d.ts +0 -17
  115. package/dist/exp/test/exp/integration.test.d.ts +0 -17
  116. package/dist/exp/test/helpers/EventAccumulator.d.ts +0 -34
  117. package/dist/exp/test/helpers/events.d.ts +0 -37
  118. package/dist/exp/test/helpers/util.d.ts +0 -50
  119. package/dist/exp/test/info.test.d.ts +0 -17
  120. package/dist/exp/test/node.test.d.ts +0 -17
  121. package/dist/exp/test/order.test.d.ts +0 -17
  122. package/dist/exp/test/order_by.test.d.ts +0 -17
  123. package/dist/exp/test/path.test.d.ts +0 -17
  124. package/dist/exp/test/promise.test.d.ts +0 -17
  125. package/dist/exp/test/pushid.test.d.ts +0 -17
  126. package/dist/exp/test/query.test.d.ts +0 -17
  127. package/dist/exp/test/repoinfo.test.d.ts +0 -17
  128. package/dist/exp/test/servervalues.test.d.ts +0 -17
  129. package/dist/exp/test/sortedmap.test.d.ts +0 -17
  130. package/dist/exp/test/sparsesnapshottree.test.d.ts +0 -17
  131. package/dist/exp/test/transaction.test.d.ts +0 -17
  132. package/dist/src/exp/Database.d.ts +0 -95
  133. package/dist/test/exp/integration.test.d.ts +0 -17
  134. package/dist/test/pushid.test.d.ts +0 -17
@@ -1,295 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Path } from './util/Path';
18
- import { ChildrenNode } from './snap/ChildrenNode';
19
- import { NamedNode, Node } from './snap/Node';
20
- import { CacheNode } from './view/CacheNode';
21
- import { Index } from './snap/indexes/Index';
22
- /**
23
- * Defines a single user-initiated write operation. May be the result of a set(), transaction(), or update() call. In
24
- * the case of a set() or transaction, snap wil be non-null. In the case of an update(), children will be non-null.
25
- */
26
- export interface WriteRecord {
27
- writeId: number;
28
- path: Path;
29
- snap?: Node | null;
30
- children?: {
31
- [k: string]: Node;
32
- } | null;
33
- visible: boolean;
34
- }
35
- /**
36
- * WriteTree tracks all pending user-initiated writes and has methods to calculate the result of merging them
37
- * with underlying server data (to create "event cache" data). Pending writes are added with addOverwrite()
38
- * and addMerge(), and removed with removeWrite().
39
- *
40
- * @constructor
41
- */
42
- export declare class WriteTree {
43
- /**
44
- * A tree tracking the result of applying all visible writes. This does not include transactions with
45
- * applyLocally=false or writes that are completely shadowed by other writes.
46
- *
47
- * @type {!CompoundWrite}
48
- * @private
49
- */
50
- private visibleWrites_;
51
- /**
52
- * A list of all pending writes, regardless of visibility and shadowed-ness. Used to calculate arbitrary
53
- * sets of the changed data, such as hidden writes (from transactions) or changes with certain writes excluded (also
54
- * used by transactions).
55
- *
56
- * @type {!Array.<!WriteRecord>}
57
- * @private
58
- */
59
- private allWrites_;
60
- private lastWriteId_;
61
- /**
62
- * Create a new WriteTreeRef for the given path. For use with a new sync point at the given path.
63
- *
64
- * @param {!Path} path
65
- * @return {!WriteTreeRef}
66
- */
67
- childWrites(path: Path): WriteTreeRef;
68
- /**
69
- * Record a new overwrite from user code.
70
- *
71
- * @param {!Path} path
72
- * @param {!Node} snap
73
- * @param {!number} writeId
74
- * @param {boolean=} visible This is set to false by some transactions. It should be excluded from event caches
75
- */
76
- addOverwrite(path: Path, snap: Node, writeId: number, visible?: boolean): void;
77
- /**
78
- * Record a new merge from user code.
79
- *
80
- * @param {!Path} path
81
- * @param {!Object.<string, !Node>} changedChildren
82
- * @param {!number} writeId
83
- */
84
- addMerge(path: Path, changedChildren: {
85
- [k: string]: Node;
86
- }, writeId: number): void;
87
- /**
88
- * @param {!number} writeId
89
- * @return {?WriteRecord}
90
- */
91
- getWrite(writeId: number): WriteRecord | null;
92
- /**
93
- * Remove a write (either an overwrite or merge) that has been successfully acknowledge by the server. Recalculates
94
- * the tree if necessary. We return true if it may have been visible, meaning views need to reevaluate.
95
- *
96
- * @param {!number} writeId
97
- * @return {boolean} true if the write may have been visible (meaning we'll need to reevaluate / raise
98
- * events as a result).
99
- */
100
- removeWrite(writeId: number): boolean;
101
- /**
102
- * Return a complete snapshot for the given path if there's visible write data at that path, else null.
103
- * No server data is considered.
104
- *
105
- * @param {!Path} path
106
- * @return {?Node}
107
- */
108
- getCompleteWriteData(path: Path): Node | null;
109
- /**
110
- * Given optional, underlying server data, and an optional set of constraints (exclude some sets, include hidden
111
- * writes), attempt to calculate a complete snapshot for the given path
112
- *
113
- * @param {!Path} treePath
114
- * @param {?Node} completeServerCache
115
- * @param {Array.<number>=} writeIdsToExclude An optional set to be excluded
116
- * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false
117
- * @return {?Node}
118
- */
119
- calcCompleteEventCache(treePath: Path, completeServerCache: Node | null, writeIdsToExclude?: number[], includeHiddenWrites?: boolean): Node | null;
120
- /**
121
- * With optional, underlying server data, attempt to return a children node of children that we have complete data for.
122
- * Used when creating new views, to pre-fill their complete event children snapshot.
123
- *
124
- * @param {!Path} treePath
125
- * @param {?ChildrenNode} completeServerChildren
126
- * @return {!ChildrenNode}
127
- */
128
- calcCompleteEventChildren(treePath: Path, completeServerChildren: ChildrenNode | null): Node;
129
- /**
130
- * Given that the underlying server data has updated, determine what, if anything, needs to be
131
- * applied to the event cache.
132
- *
133
- * Possibilities:
134
- *
135
- * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data
136
- *
137
- * 2. Some write is completely shadowing. No events to be raised
138
- *
139
- * 3. Is partially shadowed. Events
140
- *
141
- * Either existingEventSnap or existingServerSnap must exist
142
- *
143
- * @param {!Path} treePath
144
- * @param {!Path} childPath
145
- * @param {?Node} existingEventSnap
146
- * @param {?Node} existingServerSnap
147
- * @return {?Node}
148
- */
149
- calcEventCacheAfterServerOverwrite(treePath: Path, childPath: Path, existingEventSnap: Node | null, existingServerSnap: Node | null): Node | null;
150
- /**
151
- * Returns a complete child for a given server snap after applying all user writes or null if there is no
152
- * complete child for this ChildKey.
153
- *
154
- * @param {!Path} treePath
155
- * @param {!string} childKey
156
- * @param {!CacheNode} existingServerSnap
157
- * @return {?Node}
158
- */
159
- calcCompleteChild(treePath: Path, childKey: string, existingServerSnap: CacheNode): Node | null;
160
- /**
161
- * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at
162
- * a higher path, this will return the child of that write relative to the write and this path.
163
- * Returns null if there is no write at this path.
164
- */
165
- shadowingWrite(path: Path): Node | null;
166
- /**
167
- * This method is used when processing child remove events on a query. If we can, we pull in children that were outside
168
- * the window, but may now be in the window.
169
- */
170
- calcIndexedSlice(treePath: Path, completeServerData: Node | null, startPost: NamedNode, count: number, reverse: boolean, index: Index): NamedNode[];
171
- private recordContainsPath_;
172
- /**
173
- * Re-layer the writes and merges into a tree so we can efficiently calculate event snapshots
174
- */
175
- private resetTree_;
176
- /**
177
- * The default filter used when constructing the tree. Keep everything that's visible.
178
- */
179
- private static DefaultFilter_;
180
- /**
181
- * Static method. Given an array of WriteRecords, a filter for which ones to include, and a path, construct the tree of
182
- * event data at that path.
183
- */
184
- private static layerTree_;
185
- }
186
- /**
187
- * A WriteTreeRef wraps a WriteTree and a path, for convenient access to a particular subtree. All of the methods
188
- * just proxy to the underlying WriteTree.
189
- *
190
- * @constructor
191
- */
192
- export declare class WriteTreeRef {
193
- /**
194
- * The path to this particular write tree ref. Used for calling methods on writeTree_ while exposing a simpler
195
- * interface to callers.
196
- *
197
- * @type {!Path}
198
- * @private
199
- * @const
200
- */
201
- private readonly treePath_;
202
- /**
203
- * * A reference to the actual tree of write data. All methods are pass-through to the tree, but with the appropriate
204
- * path prefixed.
205
- *
206
- * This lets us make cheap references to points in the tree for sync points without having to copy and maintain all of
207
- * the data.
208
- *
209
- * @type {!WriteTree}
210
- * @private
211
- * @const
212
- */
213
- private readonly writeTree_;
214
- /**
215
- * @param {!Path} path
216
- * @param {!WriteTree} writeTree
217
- */
218
- constructor(path: Path, writeTree: WriteTree);
219
- /**
220
- * If possible, returns a complete event cache, using the underlying server data if possible. In addition, can be used
221
- * to get a cache that includes hidden writes, and excludes arbitrary writes. Note that customizing the returned node
222
- * can lead to a more expensive calculation.
223
- *
224
- * @param {?Node} completeServerCache
225
- * @param {Array.<number>=} writeIdsToExclude Optional writes to exclude.
226
- * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false
227
- * @return {?Node}
228
- */
229
- calcCompleteEventCache(completeServerCache: Node | null, writeIdsToExclude?: number[], includeHiddenWrites?: boolean): Node | null;
230
- /**
231
- * If possible, returns a children node containing all of the complete children we have data for. The returned data is a
232
- * mix of the given server data and write data.
233
- *
234
- * @param {?ChildrenNode} completeServerChildren
235
- * @return {!ChildrenNode}
236
- */
237
- calcCompleteEventChildren(completeServerChildren: ChildrenNode | null): ChildrenNode;
238
- /**
239
- * Given that either the underlying server data has updated or the outstanding writes have updated, determine what,
240
- * if anything, needs to be applied to the event cache.
241
- *
242
- * Possibilities:
243
- *
244
- * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data
245
- *
246
- * 2. Some write is completely shadowing. No events to be raised
247
- *
248
- * 3. Is partially shadowed. Events should be raised
249
- *
250
- * Either existingEventSnap or existingServerSnap must exist, this is validated via an assert
251
- *
252
- * @param {!Path} path
253
- * @param {?Node} existingEventSnap
254
- * @param {?Node} existingServerSnap
255
- * @return {?Node}
256
- */
257
- calcEventCacheAfterServerOverwrite(path: Path, existingEventSnap: Node | null, existingServerSnap: Node | null): Node | null;
258
- /**
259
- * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at
260
- * a higher path, this will return the child of that write relative to the write and this path.
261
- * Returns null if there is no write at this path.
262
- *
263
- * @param {!Path} path
264
- * @return {?Node}
265
- */
266
- shadowingWrite(path: Path): Node | null;
267
- /**
268
- * This method is used when processing child remove events on a query. If we can, we pull in children that were outside
269
- * the window, but may now be in the window
270
- *
271
- * @param {?Node} completeServerData
272
- * @param {!NamedNode} startPost
273
- * @param {!number} count
274
- * @param {boolean} reverse
275
- * @param {!Index} index
276
- * @return {!Array.<!NamedNode>}
277
- */
278
- calcIndexedSlice(completeServerData: Node | null, startPost: NamedNode, count: number, reverse: boolean, index: Index): NamedNode[];
279
- /**
280
- * Returns a complete child for a given server snap after applying all user writes or null if there is no
281
- * complete child for this ChildKey.
282
- *
283
- * @param {!string} childKey
284
- * @param {!CacheNode} existingServerCache
285
- * @return {?Node}
286
- */
287
- calcCompleteChild(childKey: string, existingServerCache: CacheNode): Node | null;
288
- /**
289
- * Return a WriteTreeRef for a child.
290
- *
291
- * @param {string} childName
292
- * @return {!WriteTreeRef}
293
- */
294
- child(childName: string): WriteTreeRef;
295
- }
@@ -1,42 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Path } from '../util/Path';
18
- import { Operation, OperationSource, OperationType } from './Operation';
19
- import { ImmutableTree } from '../util/ImmutableTree';
20
- export declare class AckUserWrite implements Operation {
21
- /** @inheritDoc */ path: Path;
22
- /** @inheritDoc */ affectedTree: ImmutableTree<boolean>;
23
- /** @inheritDoc */ revert: boolean;
24
- /** @inheritDoc */
25
- type: OperationType;
26
- /** @inheritDoc */
27
- source: OperationSource;
28
- /**
29
- *
30
- * @param {!Path} path
31
- * @param {!ImmutableTree<!boolean>} affectedTree A tree containing true for each affected path. Affected paths can't overlap.
32
- * @param {!boolean} revert
33
- */
34
- constructor(
35
- /** @inheritDoc */ path: Path,
36
- /** @inheritDoc */ affectedTree: ImmutableTree<boolean>,
37
- /** @inheritDoc */ revert: boolean);
38
- /**
39
- * @inheritDoc
40
- */
41
- operationForChild(childName: string): AckUserWrite;
42
- }
@@ -1,32 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Path } from '../util/Path';
18
- import { Operation, OperationSource, OperationType } from './Operation';
19
- /**
20
- * @param {!OperationSource} source
21
- * @param {!Path} path
22
- * @constructor
23
- * @implements {Operation}
24
- */
25
- export declare class ListenComplete implements Operation {
26
- source: OperationSource;
27
- path: Path;
28
- /** @inheritDoc */
29
- type: OperationType;
30
- constructor(source: OperationSource, path: Path);
31
- operationForChild(childName: string): ListenComplete;
32
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Operation, OperationSource, OperationType } from './Operation';
18
- import { Path } from '../util/Path';
19
- import { ImmutableTree } from '../util/ImmutableTree';
20
- import { Node } from '../snap/Node';
21
- /**
22
- * @param {!OperationSource} source
23
- * @param {!Path} path
24
- * @param {!ImmutableTree.<!Node>} children
25
- * @constructor
26
- * @implements {Operation}
27
- */
28
- export declare class Merge implements Operation {
29
- /** @inheritDoc */ source: OperationSource;
30
- /** @inheritDoc */ path: Path;
31
- /** @inheritDoc */ children: ImmutableTree<Node>;
32
- /** @inheritDoc */
33
- type: OperationType;
34
- constructor(
35
- /** @inheritDoc */ source: OperationSource,
36
- /** @inheritDoc */ path: Path,
37
- /** @inheritDoc */ children: ImmutableTree<Node>);
38
- /**
39
- * @inheritDoc
40
- */
41
- operationForChild(childName: string): Operation;
42
- /**
43
- * @inheritDoc
44
- */
45
- toString(): string;
46
- }
@@ -1,78 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Path } from '../util/Path';
18
- /**
19
- *
20
- * @enum
21
- */
22
- export declare enum OperationType {
23
- OVERWRITE = 0,
24
- MERGE = 1,
25
- ACK_USER_WRITE = 2,
26
- LISTEN_COMPLETE = 3
27
- }
28
- /**
29
- * @interface
30
- */
31
- export interface Operation {
32
- /**
33
- * @type {!OperationSource}
34
- */
35
- source: OperationSource;
36
- /**
37
- * @type {!OperationType}
38
- */
39
- type: OperationType;
40
- /**
41
- * @type {!Path}
42
- */
43
- path: Path;
44
- /**
45
- * @param {string} childName
46
- * @return {?Operation}
47
- */
48
- operationForChild(childName: string): Operation | null;
49
- }
50
- /**
51
- * @param {boolean} fromUser
52
- * @param {boolean} fromServer
53
- * @param {?string} queryId
54
- * @param {boolean} tagged
55
- * @constructor
56
- */
57
- export declare class OperationSource {
58
- fromUser: boolean;
59
- fromServer: boolean;
60
- queryId: string | null;
61
- tagged: boolean;
62
- constructor(fromUser: boolean, fromServer: boolean, queryId: string | null, tagged: boolean);
63
- /**
64
- * @const
65
- * @type {!OperationSource}
66
- */
67
- static User: OperationSource;
68
- /**
69
- * @const
70
- * @type {!OperationSource}
71
- */
72
- static Server: OperationSource;
73
- /**
74
- * @param {string} queryId
75
- * @return {!OperationSource}
76
- */
77
- static forServerTaggedQuery: (queryId: string) => OperationSource;
78
- }
@@ -1,35 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Operation, OperationSource, OperationType } from './Operation';
18
- import { Path } from '../util/Path';
19
- import { Node } from '../snap/Node';
20
- /**
21
- * @param {!OperationSource} source
22
- * @param {!Path} path
23
- * @param {!Node} snap
24
- * @constructor
25
- * @implements {Operation}
26
- */
27
- export declare class Overwrite implements Operation {
28
- source: OperationSource;
29
- path: Path;
30
- snap: Node;
31
- /** @inheritDoc */
32
- type: OperationType;
33
- constructor(source: OperationSource, path: Path, snap: Node);
34
- operationForChild(childName: string): Overwrite;
35
- }