fluid-framework 2.116.1 → 2.118.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.
- package/CHANGELOG.md +202 -0
- package/api-report/fluid-framework.alpha.api.md +122 -31
- package/api-report/fluid-framework.beta.api.md +50 -9
- package/api-report/fluid-framework.legacy.beta.api.md +50 -9
- package/dist/alpha.d.ts +11 -0
- package/dist/beta.d.ts +3 -0
- package/dist/legacy.d.ts +3 -0
- package/lib/alpha.d.ts +11 -0
- package/lib/beta.d.ts +3 -0
- package/lib/legacy.d.ts +3 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,207 @@
|
|
|
1
1
|
# fluid-framework
|
|
2
2
|
|
|
3
|
+
## 2.118.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Preserve enabled staged schema upgrades by default ([#28155](https://github.com/microsoft/FluidFramework/pull/28155)) [9b61289e943](https://github.com/microsoft/FluidFramework/commit/9b61289e9432a4e84e18d834b76d1d6818a3a6a7)
|
|
8
|
+
|
|
9
|
+
[`TreeView.upgradeSchema()`](https://fluidframework.com/docs/api/tree/treeview-interface#upgradeschema-method) now includes staged schema upgrades that are already enabled in the document, even when the view's staged upgrade policy does not select them.
|
|
10
|
+
This prevents a schema upgrade from accidentally attempting to narrow stored schema enabled by another client.
|
|
11
|
+
|
|
12
|
+
Set [`includeAlreadyEnabledUpgrades`](https://fluidframework.com/docs/api/tree/stagedschemaupgradepolicy-interface#includealreadyenabledupgrades-property) to `false` when creating the staged upgrade policy to require upgrades to be selected explicitly:
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
const config = new TreeViewConfigurationAlpha({
|
|
16
|
+
schema: AppSchema,
|
|
17
|
+
stagedUpgradePolicy: {
|
|
18
|
+
includeAlreadyEnabledUpgrades: false,
|
|
19
|
+
...StagedSchemaUpgradePolicy.enabledStagedUpgrades(myUpgrade),
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- Expose schema incompatibility details on TreeViewBeta ([#28155](https://github.com/microsoft/FluidFramework/pull/28155)) [9b61289e943](https://github.com/microsoft/FluidFramework/commit/9b61289e9432a4e84e18d834b76d1d6818a3a6a7)
|
|
25
|
+
|
|
26
|
+
`TreeViewBeta.compatibility.discrepancies` now provides typed `SchemaDiscrepancy` objects when a view cannot access a tree because its view schema is incompatible with the stored schema.
|
|
27
|
+
The readonly array may include application-defined schema identifiers and field keys.
|
|
28
|
+
Each entry includes a `mismatch` discriminator so consumers can distinguish allowed-type, field-kind, value-schema, and node-kind differences.
|
|
29
|
+
Allowed-type discrepancies include staged types that are absent from the stored schema in `stagedView`, while discrepancies on staged optional fields include `viewIsStagedOptional: true`.
|
|
30
|
+
Staged-only differences remain compatible and do not produce discrepancies by themselves.
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
const sf = new SchemaFactory("com.example");
|
|
34
|
+
class Todo extends sf.object("Todo", {
|
|
35
|
+
title: sf.number,
|
|
36
|
+
}) {}
|
|
37
|
+
|
|
38
|
+
const view = asBeta(
|
|
39
|
+
tree.viewWith(new TreeViewConfiguration({ schema: Todo })),
|
|
40
|
+
);
|
|
41
|
+
if (!view.compatibility.canView) {
|
|
42
|
+
console.error(view.compatibility.discrepancies);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If the stored schema allows `string` for `Todo.title`, the output is:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
[
|
|
50
|
+
{
|
|
51
|
+
"mismatch": "allowedTypes",
|
|
52
|
+
"location": { "nodeType": "com.example.Todo", "fieldKey": "title" },
|
|
53
|
+
"view": ["com.fluidframework.leaf.number"],
|
|
54
|
+
"stored": ["com.fluidframework.leaf.string"]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Applications can see from `mismatch: "allowedTypes"` that the schemas differ in their allowed types, compare `view` with `stored` to determine which types each schema permits, and use `location` to find the field where the mismatch occurs.
|
|
60
|
+
|
|
61
|
+
- SharedTree schema errors now explain the mismatch ([#28153](https://github.com/microsoft/FluidFramework/pull/28153)) [850aa1f1c47](https://github.com/microsoft/FluidFramework/commit/850aa1f1c47ea737b0c8a34e826f8caac97f0a7b)
|
|
62
|
+
|
|
63
|
+
Schema validation errors now report the mismatch category and attach relevant diagnostic context. Depending on the mismatch, tagged telemetry properties identify the node type, field kind, child count, expected leaf value type, actual value type, unexpected fields, or path, making invalid content easier to diagnose while allowing consumers to filter potentially sensitive user data.
|
|
64
|
+
|
|
65
|
+
When a view schema cannot access a document's stored schema, the error now reports the first schema mismatch and explains whether to initialize the document, upgrade its stored schema, use a compatible view schema, or explicitly migrate the document.
|
|
66
|
+
|
|
67
|
+
- TreeViewAlpha can now query whether a staged schema upgrade has been applied ([#28154](https://github.com/microsoft/FluidFramework/pull/28154)) [0ea7aa88589](https://github.com/microsoft/FluidFramework/commit/0ea7aa885896ba58fb063fdbc3ee1c66dbd6b8e1)
|
|
68
|
+
|
|
69
|
+
A new [`isStagedUpgradeEnabled`](https://fluidframework.com/docs/api/tree/treeviewalpha-interface#isstagedupgradeenabled-methodsignature) method on [`TreeViewAlpha`](https://fluidframework.com/docs/api/tree/treeviewalpha-interface) checks whether a given [`SchemaUpgrade`](https://fluidframework.com/docs/api/tree/schemaupgrade-typealias) token has already been applied to a document's stored schema.
|
|
70
|
+
|
|
71
|
+
This is useful when gradually rolling out a staged schema upgrade via feature flags — for example, to conditionally include the upgrade token in the view configuration after a flag rollback, or to show UI that depends on the upgraded schema.
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
const view = tree.viewWith(
|
|
75
|
+
new TreeViewConfigurationAlpha({
|
|
76
|
+
schema: mySchema,
|
|
77
|
+
stagedUpgradePolicy: featureFlag.isEnabled
|
|
78
|
+
? StagedSchemaUpgradePolicy.enabledStagedUpgrades(myUpgrade)
|
|
79
|
+
: StagedSchemaUpgradePolicy.restrictive,
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
// Show a "create poll" button only if the document supports the new poll schema
|
|
84
|
+
if (view.isStagedUpgradeEnabled(myUpgrade)) {
|
|
85
|
+
showCreatePollButton();
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## 2.117.0
|
|
90
|
+
|
|
91
|
+
### Minor Changes
|
|
92
|
+
|
|
93
|
+
- Rename TreeBranch and TreeBranchAlpha to UntypedTreeView ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
|
|
94
|
+
|
|
95
|
+
`UntypedTreeView` and `UntypedTreeViewAlpha` replace the beta `TreeBranch` and alpha `TreeBranchAlpha` interfaces, clarifying that they represent tree views without known schemas. The old names remain available as deprecated compatibility aliases and will be removed in a future release.
|
|
96
|
+
|
|
97
|
+
Update API imports and type annotations to use the new names:
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
// Before
|
|
101
|
+
import type { TreeBranch } from "fluid-framework/beta";
|
|
102
|
+
import type { TreeBranchAlpha } from "fluid-framework/alpha";
|
|
103
|
+
const betaBranch: TreeBranch = betaView.fork();
|
|
104
|
+
const alphaBranch: TreeBranchAlpha = alphaView.fork();
|
|
105
|
+
|
|
106
|
+
// After
|
|
107
|
+
import type { UntypedTreeView } from "fluid-framework/beta";
|
|
108
|
+
import type { UntypedTreeViewAlpha } from "fluid-framework/alpha";
|
|
109
|
+
const betaForkedView: UntypedTreeView = betaView.fork();
|
|
110
|
+
const alphaForkedView: UntypedTreeViewAlpha = alphaView.fork();
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- New alpha API for attaching custom metadata to commits ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
|
|
114
|
+
|
|
115
|
+
Applications can now attach arbitrary, JSON-serializable metadata to a commit, replicate it to collaborating clients, and persist it in the document.
|
|
116
|
+
|
|
117
|
+
Supply it via the new `customMetadata` field on [`RunTransactionParamsAlpha`](https://fluidframework.com/docs/api/fluid-framework/runtransactionparamsalpha-interface):
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
view.runTransaction(
|
|
121
|
+
() => {
|
|
122
|
+
view.root.insertAtEnd("new item");
|
|
123
|
+
},
|
|
124
|
+
{ customMetadata: { author: "alice", intent: "add-item" } },
|
|
125
|
+
);
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The commit produced by reverting a `Revertible`, or by `revertTo`, can be annotated the same way via a new options argument:
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
revertible.revert({
|
|
132
|
+
customMetadata: { author: "alice", intent: "undo-add" },
|
|
133
|
+
});
|
|
134
|
+
view.revertTo(revision, {
|
|
135
|
+
customMetadata: { author: "alice", intent: "undo-add" },
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Read it back while walking the branch's [history](https://fluidframework.com/docs/api/fluid-framework/treebranchhistory-interface), via the new `custom` property on `TreeBranchCommitMetadata`:
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
for (
|
|
143
|
+
let commit = view.branchHistory.getHead();
|
|
144
|
+
commit !== undefined;
|
|
145
|
+
commit = commit.getParent()
|
|
146
|
+
) {
|
|
147
|
+
const metadata = commit.custom;
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Because a commit may be produced by nested transactions, each of which may supply metadata, `custom` is the flattened combination of them all, with the outermost transaction winning on conflicting properties.
|
|
152
|
+
The structural view is available as `commit.customTree`, a `CustomMetadataTree` mirroring the transaction nesting — the same relationship `labels.tree` has to a change's label set.
|
|
153
|
+
|
|
154
|
+
Metadata shares the lifetime of the commit it is attached to, so it is dropped when that commit is trimmed from the trunk, or lasts as long as the document under the `retainHistory` option on `SharedTreeOptions`.
|
|
155
|
+
It also travels on every annotated op and occupies summary space for as long as its commit survives, so it should be kept small.
|
|
156
|
+
|
|
157
|
+
Persisting the metadata requires new op and summary format versions, which are written only when `minVersionForCollab` is set to `2.117.0` or later; until then, metadata is kept in memory for the local session but is neither replicated nor persisted.
|
|
158
|
+
Raising that floor makes every subsequent op and summary use the new versions, whether or not any commit carries metadata, so deploy metadata-capable code everywhere first.
|
|
159
|
+
Lowering it again is lossy: a client configured to write the older format can still read metadata but strips it when encoding.
|
|
160
|
+
|
|
161
|
+
- Bug fix: forking during changed event callback is now safe ([#28074](https://github.com/microsoft/FluidFramework/pull/28074)) [ca9458aa1a](https://github.com/microsoft/FluidFramework/commit/ca9458aa1ae9061928c5c7ff837b61d888468174)
|
|
162
|
+
|
|
163
|
+
[Forking](https://fluidframework.com/docs/api/fluid-framework/treeviewbeta-interface#fork-methodsignature) (beta) a view during the callback for the ["changed" event](https://fluidframework.com/docs/api/fluid-framework/treebranchevents-interface#changed-methodsignature) (alpha) emitted when a transaction is committed would create a fork with malformed change data.
|
|
164
|
+
This could result in asserts being triggered when utilizing the fork (including, but not limited to, error code `0x7ce`).
|
|
165
|
+
|
|
166
|
+
- Remove the deprecated TreeAlpha.branch API ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
|
|
167
|
+
|
|
168
|
+
The deprecated alpha `TreeAlpha.branch(node)` API has been removed. Use [`TreeAlpha.context(node)`](https://fluidframework.com/docs/api/fluid-framework/treealpha-interface#context-methodsignature) and check [`isView()`](https://fluidframework.com/docs/api/fluid-framework/treecontextalpha-interface#isview-methodsignature) to access the untyped view for a hydrated node:
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
const context = TreeAlpha.context(node);
|
|
172
|
+
if (context.isView()) {
|
|
173
|
+
// `context` is an UntypedTreeViewAlpha here.
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
- retainHistory now retains history in summaries ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
|
|
178
|
+
|
|
179
|
+
The `retainHistory` option on `SharedTreeOptions` is documented as causing growth in summaries/snapshots as well as in memory, but it only ever prevented trunk commits from being evicted from memory.
|
|
180
|
+
Summaries continued to contain just the collaboration window, so retained history was discarded at the next summary and was unavailable to clients that loaded from it.
|
|
181
|
+
|
|
182
|
+
Summaries produced by a client with `retainHistory` enabled now contain the full trunk, matching the option's documented behavior.
|
|
183
|
+
History accumulated while the flag is enabled survives summarization and is available to clients that join later.
|
|
184
|
+
History is only retained from the point at which the flag is enabled: commits that were already evicted by a prior session cannot be recovered.
|
|
185
|
+
|
|
186
|
+
There is no change to the default (`retainHistory: false`) behavior, and no change to the persisted format.
|
|
187
|
+
|
|
188
|
+
- New alpha APIs for inspecting history and restoring past states ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
|
|
189
|
+
|
|
190
|
+
`UntypedTreeViewAlpha` (formerly [`TreeBranchAlpha`](https://fluidframework.com/docs/api/fluid-framework/treebranchalpha-interface)) now exposes a `branchHistory` property which returns a `TreeBranchHistory` object with:
|
|
191
|
+
- `commitCount`: the number of commits currently in the branch's history.
|
|
192
|
+
This number grows when a new edit is made on the branch, when a branch containing new commits is merged into it, or when it is rebased onto a branch containing new commits.
|
|
193
|
+
It shrinks when past commits are trimmed from the history.
|
|
194
|
+
- `getHeadCommit()`: returns the `TreeBranchCommitMetadata` for the branch's head commit, or `undefined` if the branch has no commits.
|
|
195
|
+
Each `TreeBranchCommitMetadata` exposes the commit's `revision` string and its `parent` commit metadata, so the history can be walked backwards from the head.
|
|
196
|
+
|
|
197
|
+
A `revision` obtained this way can be passed to either of two new methods on `UntypedTreeViewAlpha` implementations:
|
|
198
|
+
- `revertTo(revision)`: applies a new change which reverts all changes made since `revision`.
|
|
199
|
+
The generated change is subject to the same merge semantics as the reverts of individual commits, so concurrent changes sequenced before the revert which affect different parts of the document are not overwritten.
|
|
200
|
+
- `rewindTo(revision)`: switches the view to a new underlying branch whose head is the commit at `revision`, without applying a change.
|
|
201
|
+
The original underlying branch is disposed unless it is the main branch or a shared branch, so consider `fork()`ing before rewinding if it needs to be retained.
|
|
202
|
+
|
|
203
|
+
How much history is available depends on how many commits the client retains; see the `retainHistory` option on `SharedTreeOptions`.
|
|
204
|
+
|
|
3
205
|
## 2.116.0
|
|
4
206
|
|
|
5
207
|
### Minor Changes
|
|
@@ -230,6 +230,9 @@ export enum CommitOutcome {
|
|
|
230
230
|
NewContentOnly = 2
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
// @alpha
|
|
234
|
+
export type CommitRevision = string;
|
|
235
|
+
|
|
233
236
|
// @alpha
|
|
234
237
|
export function comparePersistedSchema(persisted: JsonCompatible, view: ImplicitFieldSchema, options: ICodecOptions): Omit<SchemaCompatibilityStatus, "canInitialize">;
|
|
235
238
|
|
|
@@ -342,6 +345,12 @@ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey e
|
|
|
342
345
|
// @beta
|
|
343
346
|
export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
|
|
344
347
|
|
|
348
|
+
// @alpha @sealed
|
|
349
|
+
export interface CustomMetadataTree {
|
|
350
|
+
readonly children: readonly CustomMetadataTree[];
|
|
351
|
+
readonly metadata: JsonCompatibleReadOnlyObject | undefined;
|
|
352
|
+
}
|
|
353
|
+
|
|
345
354
|
// @alpha @sealed
|
|
346
355
|
export interface DataStoreContext extends SharedObjectCreator {
|
|
347
356
|
}
|
|
@@ -565,6 +574,7 @@ export const FluidClientVersion: {
|
|
|
565
574
|
readonly v2_73: "2.73.0";
|
|
566
575
|
readonly v2_74: "2.74.0";
|
|
567
576
|
readonly v2_80: "2.80.0";
|
|
577
|
+
readonly v2_117: "2.117.0";
|
|
568
578
|
};
|
|
569
579
|
|
|
570
580
|
// @alpha @sealed
|
|
@@ -1259,7 +1269,7 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
|
|
|
1259
1269
|
readonly schema: TSchema;
|
|
1260
1270
|
}
|
|
1261
1271
|
|
|
1262
|
-
// @alpha
|
|
1272
|
+
// @alpha @input
|
|
1263
1273
|
export interface ITreeViewConfigurationAlpha<TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> extends ITreeViewConfiguration<TSchema> {
|
|
1264
1274
|
readonly stagedUpgradePolicy?: StagedSchemaUpgradePolicy;
|
|
1265
1275
|
}
|
|
@@ -1734,7 +1744,10 @@ export interface Revertible {
|
|
|
1734
1744
|
|
|
1735
1745
|
// @alpha @sealed
|
|
1736
1746
|
export interface RevertibleAlpha extends Revertible {
|
|
1737
|
-
clone: (
|
|
1747
|
+
clone: (view: UntypedTreeView) => RevertibleAlpha;
|
|
1748
|
+
revert(): void;
|
|
1749
|
+
revert(dispose: boolean): void;
|
|
1750
|
+
revert(options: RevertOptionsAlpha): void;
|
|
1738
1751
|
}
|
|
1739
1752
|
|
|
1740
1753
|
// @alpha @sealed
|
|
@@ -1749,6 +1762,17 @@ export enum RevertibleStatus {
|
|
|
1749
1762
|
Valid = 0
|
|
1750
1763
|
}
|
|
1751
1764
|
|
|
1765
|
+
// @alpha @sealed
|
|
1766
|
+
export interface RevertOptionsAlpha {
|
|
1767
|
+
readonly customMetadata?: JsonCompatibleReadOnlyObject;
|
|
1768
|
+
readonly dispose?: boolean;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
// @alpha @sealed
|
|
1772
|
+
export interface RevertToOptionsAlpha {
|
|
1773
|
+
readonly customMetadata?: JsonCompatibleReadOnlyObject;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1752
1776
|
// @public
|
|
1753
1777
|
export const rollback: unique symbol;
|
|
1754
1778
|
|
|
@@ -1771,6 +1795,7 @@ export interface RunTransaction {
|
|
|
1771
1795
|
|
|
1772
1796
|
// @alpha @input
|
|
1773
1797
|
export interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {
|
|
1798
|
+
readonly customMetadata?: JsonCompatibleReadOnlyObject;
|
|
1774
1799
|
readonly postProcessor?: TransactionPostProcessor;
|
|
1775
1800
|
readonly preconditions?: readonly TransactionConstraintAlpha[];
|
|
1776
1801
|
}
|
|
@@ -1788,6 +1813,43 @@ export interface SchemaCompatibilityStatus {
|
|
|
1788
1813
|
readonly isEquivalent: boolean;
|
|
1789
1814
|
}
|
|
1790
1815
|
|
|
1816
|
+
// @beta @sealed
|
|
1817
|
+
export interface SchemaCompatibilityStatusBeta extends SchemaCompatibilityStatus {
|
|
1818
|
+
readonly discrepancies: readonly SchemaDiscrepancy[] | undefined;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
// @beta @sealed
|
|
1822
|
+
export type SchemaDiscrepancy = {
|
|
1823
|
+
readonly mismatch: "allowedTypes";
|
|
1824
|
+
readonly location: "root" | {
|
|
1825
|
+
readonly nodeType: string;
|
|
1826
|
+
readonly fieldKey: string | undefined;
|
|
1827
|
+
};
|
|
1828
|
+
readonly view: readonly string[];
|
|
1829
|
+
readonly stagedView?: readonly string[];
|
|
1830
|
+
readonly stored: readonly string[];
|
|
1831
|
+
readonly viewIsStagedOptional?: true;
|
|
1832
|
+
} | {
|
|
1833
|
+
readonly mismatch: "fieldKind";
|
|
1834
|
+
readonly location: "root" | {
|
|
1835
|
+
readonly nodeType: string;
|
|
1836
|
+
readonly fieldKey: string | undefined;
|
|
1837
|
+
};
|
|
1838
|
+
readonly view: string;
|
|
1839
|
+
readonly stored: string;
|
|
1840
|
+
readonly viewIsStagedOptional?: true;
|
|
1841
|
+
} | {
|
|
1842
|
+
readonly mismatch: "valueSchema";
|
|
1843
|
+
readonly nodeType: string;
|
|
1844
|
+
readonly view: string | undefined;
|
|
1845
|
+
readonly stored: string | undefined;
|
|
1846
|
+
} | {
|
|
1847
|
+
readonly mismatch: "nodeKind";
|
|
1848
|
+
readonly nodeType: string;
|
|
1849
|
+
readonly view: string;
|
|
1850
|
+
readonly stored: string;
|
|
1851
|
+
};
|
|
1852
|
+
|
|
1791
1853
|
// @public @sealed
|
|
1792
1854
|
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
1793
1855
|
constructor(
|
|
@@ -2111,6 +2173,7 @@ export interface SnapshotSchemaCompatibilityOptions {
|
|
|
2111
2173
|
|
|
2112
2174
|
// @alpha @input
|
|
2113
2175
|
export interface StagedSchemaUpgradePolicy {
|
|
2176
|
+
readonly includeAlreadyEnabledUpgrades?: boolean;
|
|
2114
2177
|
includeStaged(upgrade: SchemaUpgrade): boolean;
|
|
2115
2178
|
includeStagedOptional(upgrade: SchemaUpgrade): boolean;
|
|
2116
2179
|
}
|
|
@@ -2125,6 +2188,9 @@ export interface StagedSchemaUpgradePolicyFactory {
|
|
|
2125
2188
|
readonly restrictive: StagedSchemaUpgradePolicy;
|
|
2126
2189
|
}
|
|
2127
2190
|
|
|
2191
|
+
// @alpha
|
|
2192
|
+
export type StagedUpgradeStatus = "disabled" | "partial" | "enabled";
|
|
2193
|
+
|
|
2128
2194
|
// @alpha @sealed @system
|
|
2129
2195
|
export type StringSchema = LeafSchema<"string", string> & SimpleLeafNodeSchema;
|
|
2130
2196
|
|
|
@@ -2433,8 +2499,6 @@ export const Tree: Tree;
|
|
|
2433
2499
|
|
|
2434
2500
|
// @alpha @sealed
|
|
2435
2501
|
export interface TreeAlpha {
|
|
2436
|
-
// @deprecated
|
|
2437
|
-
branch(node: TreeNode): TreeBranchAlpha | undefined;
|
|
2438
2502
|
child(node: TreeNode, key: string | number): TreeNode | TreeLeafValue | undefined;
|
|
2439
2503
|
children(node: TreeNode): Iterable<[propertyKey: string | number, child: TreeNode | TreeLeafValue]>;
|
|
2440
2504
|
context(node: TreeNode): TreeContextAlpha;
|
|
@@ -2514,27 +2578,18 @@ export interface TreeBeta {
|
|
|
2514
2578
|
// @beta
|
|
2515
2579
|
export const TreeBeta: TreeBeta;
|
|
2516
2580
|
|
|
2517
|
-
// @beta @
|
|
2518
|
-
export
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
rebaseOnto(branch: TreeBranch): void;
|
|
2523
|
-
}
|
|
2581
|
+
// @beta @deprecated
|
|
2582
|
+
export type TreeBranch = UntypedTreeView;
|
|
2583
|
+
|
|
2584
|
+
// @alpha @deprecated
|
|
2585
|
+
export type TreeBranchAlpha = UntypedTreeViewAlpha;
|
|
2524
2586
|
|
|
2525
2587
|
// @alpha @sealed
|
|
2526
|
-
export interface
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
fork(): TreeBranchAlpha;
|
|
2532
|
-
hasRootSchema<TSchema extends ImplicitFieldSchema>(schema: TSchema): this is TreeViewAlpha<TSchema>;
|
|
2533
|
-
isMissingEditsFrom(branch: TreeBranch): boolean;
|
|
2534
|
-
runTransaction<TSuccessValue, TFailureValue>(transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TSuccessValue, TFailureValue>;
|
|
2535
|
-
runTransaction(transaction: () => VoidTransactionCallbackStatusAlpha | void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
|
|
2536
|
-
runTransactionAsync<TSuccessValue, TFailureValue>(transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
|
|
2537
|
-
runTransactionAsync(transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
|
|
2588
|
+
export interface TreeBranchCommitMetadata {
|
|
2589
|
+
readonly custom: JsonCompatibleReadOnlyObject | undefined;
|
|
2590
|
+
readonly customTree: CustomMetadataTree | undefined;
|
|
2591
|
+
getParent(): TreeBranchCommitMetadata | undefined;
|
|
2592
|
+
readonly revision: CommitRevision;
|
|
2538
2593
|
}
|
|
2539
2594
|
|
|
2540
2595
|
// @alpha @sealed
|
|
@@ -2542,6 +2597,12 @@ export interface TreeBranchEvents {
|
|
|
2542
2597
|
changed(data: ChangeMetadata, getRevertible?: RevertibleAlphaFactory): void;
|
|
2543
2598
|
}
|
|
2544
2599
|
|
|
2600
|
+
// @alpha @sealed
|
|
2601
|
+
export interface TreeBranchHistory {
|
|
2602
|
+
getHead(): TreeBranchCommitMetadata | undefined;
|
|
2603
|
+
readonly length: number;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2545
2606
|
// @public @sealed
|
|
2546
2607
|
export interface TreeChangeEvents {
|
|
2547
2608
|
nodeChanged(unstable?: unknown): void;
|
|
@@ -2568,7 +2629,9 @@ export enum TreeCompressionStrategy {
|
|
|
2568
2629
|
|
|
2569
2630
|
// @alpha
|
|
2570
2631
|
export interface TreeContextAlpha {
|
|
2571
|
-
|
|
2632
|
+
// @deprecated
|
|
2633
|
+
isBranch(): this is UntypedTreeViewAlpha;
|
|
2634
|
+
isView(): this is UntypedTreeViewAlpha;
|
|
2572
2635
|
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TValue, TValue>;
|
|
2573
2636
|
runTransaction(transaction: () => void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
|
|
2574
2637
|
runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TValue, TValue>>;
|
|
@@ -2595,10 +2658,10 @@ export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = Fie
|
|
|
2595
2658
|
// @alpha @sealed
|
|
2596
2659
|
export interface TreeIdentifierUtils {
|
|
2597
2660
|
(node: TreeNode): string | undefined;
|
|
2598
|
-
create(
|
|
2661
|
+
create(view: UntypedTreeView): string;
|
|
2599
2662
|
getShort(node: TreeNode): number | undefined;
|
|
2600
|
-
lengthen(
|
|
2601
|
-
shorten(
|
|
2663
|
+
lengthen(view: UntypedTreeView, nodeIdentifier: number): string;
|
|
2664
|
+
shorten(view: UntypedTreeView, nodeIdentifier: string): number | undefined;
|
|
2602
2665
|
}
|
|
2603
2666
|
|
|
2604
2667
|
// @beta @sealed
|
|
@@ -2738,21 +2801,23 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
2738
2801
|
}
|
|
2739
2802
|
|
|
2740
2803
|
// @alpha @sealed
|
|
2741
|
-
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">,
|
|
2804
|
+
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">, UntypedTreeViewAlpha {
|
|
2742
2805
|
// (undocumented)
|
|
2743
2806
|
readonly events: Listenable<TreeViewEvents & TreeBranchEvents>;
|
|
2744
2807
|
// (undocumented)
|
|
2745
|
-
fork(): ReturnType<
|
|
2808
|
+
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewAlpha<TSchema>;
|
|
2746
2809
|
initialize(content: InsertableField<TSchema>): void;
|
|
2810
|
+
isStagedUpgradeEnabled(upgrade: SchemaUpgrade): StagedUpgradeStatus;
|
|
2747
2811
|
// (undocumented)
|
|
2748
2812
|
get root(): ReadableField<TSchema>;
|
|
2749
2813
|
set root(newRoot: InsertableField<TSchema>);
|
|
2750
2814
|
}
|
|
2751
2815
|
|
|
2752
2816
|
// @beta @sealed
|
|
2753
|
-
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>,
|
|
2817
|
+
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
|
|
2818
|
+
readonly compatibility: SchemaCompatibilityStatusBeta;
|
|
2754
2819
|
// (undocumented)
|
|
2755
|
-
fork(): ReturnType<
|
|
2820
|
+
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
|
|
2756
2821
|
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
2757
2822
|
runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
|
|
2758
2823
|
}
|
|
@@ -2823,6 +2888,32 @@ export const UnsafeUnknownSchema: unique symbol;
|
|
|
2823
2888
|
// @alpha
|
|
2824
2889
|
export type UnsafeUnknownSchema = typeof UnsafeUnknownSchema;
|
|
2825
2890
|
|
|
2891
|
+
// @beta @sealed
|
|
2892
|
+
export interface UntypedTreeView extends IDisposable {
|
|
2893
|
+
dispose(error?: Error): void;
|
|
2894
|
+
fork(): UntypedTreeView;
|
|
2895
|
+
merge(view: UntypedTreeView, disposeMerged?: boolean): void;
|
|
2896
|
+
rebaseOnto(view: UntypedTreeView): void;
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
// @alpha @sealed
|
|
2900
|
+
export interface UntypedTreeViewAlpha extends UntypedTreeView, TreeContextAlpha {
|
|
2901
|
+
applyChange(change: JsonCompatibleReadOnly): void;
|
|
2902
|
+
readonly branchHistory: TreeBranchHistory;
|
|
2903
|
+
computeNetChangeIfRebasedOnto(view: UntypedTreeView): JsonCompatibleReadOnly | undefined;
|
|
2904
|
+
readonly events: Listenable<TreeBranchEvents>;
|
|
2905
|
+
// (undocumented)
|
|
2906
|
+
fork(): UntypedTreeViewAlpha;
|
|
2907
|
+
hasRootSchema<TSchema extends ImplicitFieldSchema>(schema: TSchema): this is TreeViewAlpha<TSchema>;
|
|
2908
|
+
isMissingEditsFrom(view: UntypedTreeView): boolean;
|
|
2909
|
+
revertTo(revision: CommitRevision, options?: RevertToOptionsAlpha): void;
|
|
2910
|
+
rewindTo(revision: CommitRevision): void;
|
|
2911
|
+
runTransaction<TSuccessValue, TFailureValue>(transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TSuccessValue, TFailureValue>;
|
|
2912
|
+
runTransaction(transaction: () => VoidTransactionCallbackStatusAlpha | void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
|
|
2913
|
+
runTransactionAsync<TSuccessValue, TFailureValue>(transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
|
|
2914
|
+
runTransactionAsync(transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2826
2917
|
// @public
|
|
2827
2918
|
export type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;
|
|
2828
2919
|
|
|
@@ -994,6 +994,43 @@ export interface SchemaCompatibilityStatus {
|
|
|
994
994
|
readonly isEquivalent: boolean;
|
|
995
995
|
}
|
|
996
996
|
|
|
997
|
+
// @beta @sealed
|
|
998
|
+
export interface SchemaCompatibilityStatusBeta extends SchemaCompatibilityStatus {
|
|
999
|
+
readonly discrepancies: readonly SchemaDiscrepancy[] | undefined;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
// @beta @sealed
|
|
1003
|
+
export type SchemaDiscrepancy = {
|
|
1004
|
+
readonly mismatch: "allowedTypes";
|
|
1005
|
+
readonly location: "root" | {
|
|
1006
|
+
readonly nodeType: string;
|
|
1007
|
+
readonly fieldKey: string | undefined;
|
|
1008
|
+
};
|
|
1009
|
+
readonly view: readonly string[];
|
|
1010
|
+
readonly stagedView?: readonly string[];
|
|
1011
|
+
readonly stored: readonly string[];
|
|
1012
|
+
readonly viewIsStagedOptional?: true;
|
|
1013
|
+
} | {
|
|
1014
|
+
readonly mismatch: "fieldKind";
|
|
1015
|
+
readonly location: "root" | {
|
|
1016
|
+
readonly nodeType: string;
|
|
1017
|
+
readonly fieldKey: string | undefined;
|
|
1018
|
+
};
|
|
1019
|
+
readonly view: string;
|
|
1020
|
+
readonly stored: string;
|
|
1021
|
+
readonly viewIsStagedOptional?: true;
|
|
1022
|
+
} | {
|
|
1023
|
+
readonly mismatch: "valueSchema";
|
|
1024
|
+
readonly nodeType: string;
|
|
1025
|
+
readonly view: string | undefined;
|
|
1026
|
+
readonly stored: string | undefined;
|
|
1027
|
+
} | {
|
|
1028
|
+
readonly mismatch: "nodeKind";
|
|
1029
|
+
readonly nodeType: string;
|
|
1030
|
+
readonly view: string;
|
|
1031
|
+
readonly stored: string;
|
|
1032
|
+
};
|
|
1033
|
+
|
|
997
1034
|
// @public @sealed
|
|
998
1035
|
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
999
1036
|
constructor(
|
|
@@ -1459,13 +1496,8 @@ export interface TreeBeta {
|
|
|
1459
1496
|
// @beta
|
|
1460
1497
|
export const TreeBeta: TreeBeta;
|
|
1461
1498
|
|
|
1462
|
-
// @beta @
|
|
1463
|
-
export
|
|
1464
|
-
dispose(error?: Error): void;
|
|
1465
|
-
fork(): TreeBranch;
|
|
1466
|
-
merge(branch: TreeBranch, disposeMerged?: boolean): void;
|
|
1467
|
-
rebaseOnto(branch: TreeBranch): void;
|
|
1468
|
-
}
|
|
1499
|
+
// @beta @deprecated
|
|
1500
|
+
export type TreeBranch = UntypedTreeView;
|
|
1469
1501
|
|
|
1470
1502
|
// @public @sealed
|
|
1471
1503
|
export interface TreeChangeEvents {
|
|
@@ -1602,9 +1634,10 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
1602
1634
|
}
|
|
1603
1635
|
|
|
1604
1636
|
// @beta @sealed
|
|
1605
|
-
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>,
|
|
1637
|
+
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
|
|
1638
|
+
readonly compatibility: SchemaCompatibilityStatusBeta;
|
|
1606
1639
|
// (undocumented)
|
|
1607
|
-
fork(): ReturnType<
|
|
1640
|
+
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
|
|
1608
1641
|
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
1609
1642
|
runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
|
|
1610
1643
|
}
|
|
@@ -1659,6 +1692,14 @@ export type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) e
|
|
|
1659
1692
|
// @beta @system
|
|
1660
1693
|
export type UnionToTuple<Union, A extends unknown[] = [], First = PopUnion<Union>> = IsUnion<Union> extends true ? UnionToTuple<Exclude<Union, First>, [First, ...A]> : [Union, ...A];
|
|
1661
1694
|
|
|
1695
|
+
// @beta @sealed
|
|
1696
|
+
export interface UntypedTreeView extends IDisposable {
|
|
1697
|
+
dispose(error?: Error): void;
|
|
1698
|
+
fork(): UntypedTreeView;
|
|
1699
|
+
merge(view: UntypedTreeView, disposeMerged?: boolean): void;
|
|
1700
|
+
rebaseOnto(view: UntypedTreeView): void;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1662
1703
|
// @public
|
|
1663
1704
|
export type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;
|
|
1664
1705
|
|
|
@@ -1280,6 +1280,43 @@ export interface SchemaCompatibilityStatus {
|
|
|
1280
1280
|
readonly isEquivalent: boolean;
|
|
1281
1281
|
}
|
|
1282
1282
|
|
|
1283
|
+
// @beta @sealed
|
|
1284
|
+
export interface SchemaCompatibilityStatusBeta extends SchemaCompatibilityStatus {
|
|
1285
|
+
readonly discrepancies: readonly SchemaDiscrepancy[] | undefined;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
// @beta @sealed
|
|
1289
|
+
export type SchemaDiscrepancy = {
|
|
1290
|
+
readonly mismatch: "allowedTypes";
|
|
1291
|
+
readonly location: "root" | {
|
|
1292
|
+
readonly nodeType: string;
|
|
1293
|
+
readonly fieldKey: string | undefined;
|
|
1294
|
+
};
|
|
1295
|
+
readonly view: readonly string[];
|
|
1296
|
+
readonly stagedView?: readonly string[];
|
|
1297
|
+
readonly stored: readonly string[];
|
|
1298
|
+
readonly viewIsStagedOptional?: true;
|
|
1299
|
+
} | {
|
|
1300
|
+
readonly mismatch: "fieldKind";
|
|
1301
|
+
readonly location: "root" | {
|
|
1302
|
+
readonly nodeType: string;
|
|
1303
|
+
readonly fieldKey: string | undefined;
|
|
1304
|
+
};
|
|
1305
|
+
readonly view: string;
|
|
1306
|
+
readonly stored: string;
|
|
1307
|
+
readonly viewIsStagedOptional?: true;
|
|
1308
|
+
} | {
|
|
1309
|
+
readonly mismatch: "valueSchema";
|
|
1310
|
+
readonly nodeType: string;
|
|
1311
|
+
readonly view: string | undefined;
|
|
1312
|
+
readonly stored: string | undefined;
|
|
1313
|
+
} | {
|
|
1314
|
+
readonly mismatch: "nodeKind";
|
|
1315
|
+
readonly nodeType: string;
|
|
1316
|
+
readonly view: string;
|
|
1317
|
+
readonly stored: string;
|
|
1318
|
+
};
|
|
1319
|
+
|
|
1283
1320
|
// @public @sealed
|
|
1284
1321
|
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
1285
1322
|
constructor(
|
|
@@ -1825,13 +1862,8 @@ export interface TreeBeta {
|
|
|
1825
1862
|
// @beta
|
|
1826
1863
|
export const TreeBeta: TreeBeta;
|
|
1827
1864
|
|
|
1828
|
-
// @beta @
|
|
1829
|
-
export
|
|
1830
|
-
dispose(error?: Error): void;
|
|
1831
|
-
fork(): TreeBranch;
|
|
1832
|
-
merge(branch: TreeBranch, disposeMerged?: boolean): void;
|
|
1833
|
-
rebaseOnto(branch: TreeBranch): void;
|
|
1834
|
-
}
|
|
1865
|
+
// @beta @deprecated
|
|
1866
|
+
export type TreeBranch = UntypedTreeView;
|
|
1835
1867
|
|
|
1836
1868
|
// @public @sealed
|
|
1837
1869
|
export interface TreeChangeEvents {
|
|
@@ -1968,9 +2000,10 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
1968
2000
|
}
|
|
1969
2001
|
|
|
1970
2002
|
// @beta @sealed
|
|
1971
|
-
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>,
|
|
2003
|
+
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
|
|
2004
|
+
readonly compatibility: SchemaCompatibilityStatusBeta;
|
|
1972
2005
|
// (undocumented)
|
|
1973
|
-
fork(): ReturnType<
|
|
2006
|
+
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
|
|
1974
2007
|
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
1975
2008
|
runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
|
|
1976
2009
|
}
|
|
@@ -2025,6 +2058,14 @@ export type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) e
|
|
|
2025
2058
|
// @beta @system
|
|
2026
2059
|
export type UnionToTuple<Union, A extends unknown[] = [], First = PopUnion<Union>> = IsUnion<Union> extends true ? UnionToTuple<Exclude<Union, First>, [First, ...A]> : [Union, ...A];
|
|
2027
2060
|
|
|
2061
|
+
// @beta @sealed
|
|
2062
|
+
export interface UntypedTreeView extends IDisposable {
|
|
2063
|
+
dispose(error?: Error): void;
|
|
2064
|
+
fork(): UntypedTreeView;
|
|
2065
|
+
merge(view: UntypedTreeView, disposeMerged?: boolean): void;
|
|
2066
|
+
rebaseOnto(view: UntypedTreeView): void;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2028
2069
|
// @public
|
|
2029
2070
|
export type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;
|
|
2030
2071
|
|
package/dist/alpha.d.ts
CHANGED
|
@@ -179,6 +179,8 @@ export {
|
|
|
179
179
|
PopUnion,
|
|
180
180
|
RecordNodeInsertableData,
|
|
181
181
|
RunTransactionParamsBeta,
|
|
182
|
+
SchemaCompatibilityStatusBeta,
|
|
183
|
+
SchemaDiscrepancy,
|
|
182
184
|
SchemaFactoryBeta,
|
|
183
185
|
SchemaStaticsBeta,
|
|
184
186
|
SchemaUpgrade,
|
|
@@ -206,6 +208,7 @@ export {
|
|
|
206
208
|
UnannotateAllowedTypesList,
|
|
207
209
|
UnannotateAllowedTypesListUnsafe,
|
|
208
210
|
UnionToTuple,
|
|
211
|
+
UntypedTreeView,
|
|
209
212
|
VoidTransactionCallbackStatusBeta,
|
|
210
213
|
WithValue,
|
|
211
214
|
adaptEnum,
|
|
@@ -238,8 +241,10 @@ export {
|
|
|
238
241
|
CodecName,
|
|
239
242
|
CodecWriteOptions,
|
|
240
243
|
CommitOutcome,
|
|
244
|
+
CommitRevision,
|
|
241
245
|
Component,
|
|
242
246
|
CreateIndependentTreeAlphaOptions,
|
|
247
|
+
CustomMetadataTree,
|
|
243
248
|
DataStoreContext,
|
|
244
249
|
DataStoreCreator,
|
|
245
250
|
DataStoreKey,
|
|
@@ -325,6 +330,8 @@ export {
|
|
|
325
330
|
Registry,
|
|
326
331
|
RegistryKey,
|
|
327
332
|
RemoteChangeMetadata,
|
|
333
|
+
RevertOptionsAlpha,
|
|
334
|
+
RevertToOptionsAlpha,
|
|
328
335
|
RevertibleAlpha,
|
|
329
336
|
RevertibleAlphaFactory,
|
|
330
337
|
RunTransactionParamsAlpha,
|
|
@@ -353,6 +360,7 @@ export {
|
|
|
353
360
|
SimpleTreeSchema,
|
|
354
361
|
StagedSchemaUpgradePolicy,
|
|
355
362
|
StagedSchemaUpgradePolicyFactory,
|
|
363
|
+
StagedUpgradeStatus,
|
|
356
364
|
StringSchema,
|
|
357
365
|
TransactionCallbackStatusAlpha,
|
|
358
366
|
TransactionConstraintAlpha,
|
|
@@ -361,7 +369,9 @@ export {
|
|
|
361
369
|
TreeAlpha,
|
|
362
370
|
TreeArrayNodeAlpha,
|
|
363
371
|
TreeBranchAlpha,
|
|
372
|
+
TreeBranchCommitMetadata,
|
|
364
373
|
TreeBranchEvents,
|
|
374
|
+
TreeBranchHistory,
|
|
365
375
|
TreeChangeEventsAlpha,
|
|
366
376
|
TreeCompressionStrategy,
|
|
367
377
|
TreeContextAlpha,
|
|
@@ -374,6 +384,7 @@ export {
|
|
|
374
384
|
TreeViewAlpha,
|
|
375
385
|
TreeViewConfigurationAlpha,
|
|
376
386
|
UnsafeUnknownSchema,
|
|
387
|
+
UntypedTreeViewAlpha,
|
|
377
388
|
ValueSchema,
|
|
378
389
|
VerboseTree,
|
|
379
390
|
VerboseTreeNode,
|
package/dist/beta.d.ts
CHANGED
|
@@ -179,6 +179,8 @@ export {
|
|
|
179
179
|
PopUnion,
|
|
180
180
|
RecordNodeInsertableData,
|
|
181
181
|
RunTransactionParamsBeta,
|
|
182
|
+
SchemaCompatibilityStatusBeta,
|
|
183
|
+
SchemaDiscrepancy,
|
|
182
184
|
SchemaFactoryBeta,
|
|
183
185
|
SchemaStaticsBeta,
|
|
184
186
|
SchemaUpgrade,
|
|
@@ -206,6 +208,7 @@ export {
|
|
|
206
208
|
UnannotateAllowedTypesList,
|
|
207
209
|
UnannotateAllowedTypesListUnsafe,
|
|
208
210
|
UnionToTuple,
|
|
211
|
+
UntypedTreeView,
|
|
209
212
|
VoidTransactionCallbackStatusBeta,
|
|
210
213
|
WithValue,
|
|
211
214
|
adaptEnum,
|
package/dist/legacy.d.ts
CHANGED
|
@@ -186,6 +186,8 @@ export {
|
|
|
186
186
|
PopUnion,
|
|
187
187
|
RecordNodeInsertableData,
|
|
188
188
|
RunTransactionParamsBeta,
|
|
189
|
+
SchemaCompatibilityStatusBeta,
|
|
190
|
+
SchemaDiscrepancy,
|
|
189
191
|
SchemaFactoryBeta,
|
|
190
192
|
SchemaStaticsBeta,
|
|
191
193
|
SchemaUpgrade,
|
|
@@ -213,6 +215,7 @@ export {
|
|
|
213
215
|
UnannotateAllowedTypesList,
|
|
214
216
|
UnannotateAllowedTypesListUnsafe,
|
|
215
217
|
UnionToTuple,
|
|
218
|
+
UntypedTreeView,
|
|
216
219
|
VoidTransactionCallbackStatusBeta,
|
|
217
220
|
WithValue,
|
|
218
221
|
adaptEnum,
|
package/lib/alpha.d.ts
CHANGED
|
@@ -179,6 +179,8 @@ export {
|
|
|
179
179
|
PopUnion,
|
|
180
180
|
RecordNodeInsertableData,
|
|
181
181
|
RunTransactionParamsBeta,
|
|
182
|
+
SchemaCompatibilityStatusBeta,
|
|
183
|
+
SchemaDiscrepancy,
|
|
182
184
|
SchemaFactoryBeta,
|
|
183
185
|
SchemaStaticsBeta,
|
|
184
186
|
SchemaUpgrade,
|
|
@@ -206,6 +208,7 @@ export {
|
|
|
206
208
|
UnannotateAllowedTypesList,
|
|
207
209
|
UnannotateAllowedTypesListUnsafe,
|
|
208
210
|
UnionToTuple,
|
|
211
|
+
UntypedTreeView,
|
|
209
212
|
VoidTransactionCallbackStatusBeta,
|
|
210
213
|
WithValue,
|
|
211
214
|
adaptEnum,
|
|
@@ -238,8 +241,10 @@ export {
|
|
|
238
241
|
CodecName,
|
|
239
242
|
CodecWriteOptions,
|
|
240
243
|
CommitOutcome,
|
|
244
|
+
CommitRevision,
|
|
241
245
|
Component,
|
|
242
246
|
CreateIndependentTreeAlphaOptions,
|
|
247
|
+
CustomMetadataTree,
|
|
243
248
|
DataStoreContext,
|
|
244
249
|
DataStoreCreator,
|
|
245
250
|
DataStoreKey,
|
|
@@ -325,6 +330,8 @@ export {
|
|
|
325
330
|
Registry,
|
|
326
331
|
RegistryKey,
|
|
327
332
|
RemoteChangeMetadata,
|
|
333
|
+
RevertOptionsAlpha,
|
|
334
|
+
RevertToOptionsAlpha,
|
|
328
335
|
RevertibleAlpha,
|
|
329
336
|
RevertibleAlphaFactory,
|
|
330
337
|
RunTransactionParamsAlpha,
|
|
@@ -353,6 +360,7 @@ export {
|
|
|
353
360
|
SimpleTreeSchema,
|
|
354
361
|
StagedSchemaUpgradePolicy,
|
|
355
362
|
StagedSchemaUpgradePolicyFactory,
|
|
363
|
+
StagedUpgradeStatus,
|
|
356
364
|
StringSchema,
|
|
357
365
|
TransactionCallbackStatusAlpha,
|
|
358
366
|
TransactionConstraintAlpha,
|
|
@@ -361,7 +369,9 @@ export {
|
|
|
361
369
|
TreeAlpha,
|
|
362
370
|
TreeArrayNodeAlpha,
|
|
363
371
|
TreeBranchAlpha,
|
|
372
|
+
TreeBranchCommitMetadata,
|
|
364
373
|
TreeBranchEvents,
|
|
374
|
+
TreeBranchHistory,
|
|
365
375
|
TreeChangeEventsAlpha,
|
|
366
376
|
TreeCompressionStrategy,
|
|
367
377
|
TreeContextAlpha,
|
|
@@ -374,6 +384,7 @@ export {
|
|
|
374
384
|
TreeViewAlpha,
|
|
375
385
|
TreeViewConfigurationAlpha,
|
|
376
386
|
UnsafeUnknownSchema,
|
|
387
|
+
UntypedTreeViewAlpha,
|
|
377
388
|
ValueSchema,
|
|
378
389
|
VerboseTree,
|
|
379
390
|
VerboseTreeNode,
|
package/lib/beta.d.ts
CHANGED
|
@@ -179,6 +179,8 @@ export {
|
|
|
179
179
|
PopUnion,
|
|
180
180
|
RecordNodeInsertableData,
|
|
181
181
|
RunTransactionParamsBeta,
|
|
182
|
+
SchemaCompatibilityStatusBeta,
|
|
183
|
+
SchemaDiscrepancy,
|
|
182
184
|
SchemaFactoryBeta,
|
|
183
185
|
SchemaStaticsBeta,
|
|
184
186
|
SchemaUpgrade,
|
|
@@ -206,6 +208,7 @@ export {
|
|
|
206
208
|
UnannotateAllowedTypesList,
|
|
207
209
|
UnannotateAllowedTypesListUnsafe,
|
|
208
210
|
UnionToTuple,
|
|
211
|
+
UntypedTreeView,
|
|
209
212
|
VoidTransactionCallbackStatusBeta,
|
|
210
213
|
WithValue,
|
|
211
214
|
adaptEnum,
|
package/lib/legacy.d.ts
CHANGED
|
@@ -186,6 +186,8 @@ export {
|
|
|
186
186
|
PopUnion,
|
|
187
187
|
RecordNodeInsertableData,
|
|
188
188
|
RunTransactionParamsBeta,
|
|
189
|
+
SchemaCompatibilityStatusBeta,
|
|
190
|
+
SchemaDiscrepancy,
|
|
189
191
|
SchemaFactoryBeta,
|
|
190
192
|
SchemaStaticsBeta,
|
|
191
193
|
SchemaUpgrade,
|
|
@@ -213,6 +215,7 @@ export {
|
|
|
213
215
|
UnannotateAllowedTypesList,
|
|
214
216
|
UnannotateAllowedTypesListUnsafe,
|
|
215
217
|
UnionToTuple,
|
|
218
|
+
UntypedTreeView,
|
|
216
219
|
VoidTransactionCallbackStatusBeta,
|
|
217
220
|
WithValue,
|
|
218
221
|
adaptEnum,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluid-framework",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.118.0",
|
|
4
4
|
"description": "The main entry point into Fluid Framework public packages",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
"main": "lib/index.js",
|
|
58
58
|
"types": "lib/public.d.ts",
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@fluidframework/container-definitions": "~2.
|
|
61
|
-
"@fluidframework/container-loader": "~2.
|
|
62
|
-
"@fluidframework/core-interfaces": "~2.
|
|
63
|
-
"@fluidframework/core-utils": "~2.
|
|
64
|
-
"@fluidframework/driver-definitions": "~2.
|
|
65
|
-
"@fluidframework/fluid-static": "~2.
|
|
66
|
-
"@fluidframework/map": "~2.
|
|
67
|
-
"@fluidframework/runtime-utils": "~2.
|
|
68
|
-
"@fluidframework/sequence": "~2.
|
|
69
|
-
"@fluidframework/shared-object-base": "~2.
|
|
70
|
-
"@fluidframework/tree": "~2.
|
|
60
|
+
"@fluidframework/container-definitions": "~2.118.0",
|
|
61
|
+
"@fluidframework/container-loader": "~2.118.0",
|
|
62
|
+
"@fluidframework/core-interfaces": "~2.118.0",
|
|
63
|
+
"@fluidframework/core-utils": "~2.118.0",
|
|
64
|
+
"@fluidframework/driver-definitions": "~2.118.0",
|
|
65
|
+
"@fluidframework/fluid-static": "~2.118.0",
|
|
66
|
+
"@fluidframework/map": "~2.118.0",
|
|
67
|
+
"@fluidframework/runtime-utils": "~2.118.0",
|
|
68
|
+
"@fluidframework/sequence": "~2.118.0",
|
|
69
|
+
"@fluidframework/shared-object-base": "~2.118.0",
|
|
70
|
+
"@fluidframework/tree": "~2.118.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@arethetypeswrong/cli": "^0.18.5",
|