@fluidframework/runtime-definitions 1.4.0-115997 → 2.0.0-dev-rc.1.0.0.224419

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 (55) hide show
  1. package/.eslintrc.cjs +12 -0
  2. package/CHANGELOG.md +330 -0
  3. package/README.md +43 -7
  4. package/api-extractor-lint.json +4 -0
  5. package/api-extractor.json +2 -2
  6. package/api-report/runtime-definitions.api.md +474 -0
  7. package/dist/attribution.d.ts +71 -0
  8. package/dist/attribution.d.ts.map +1 -0
  9. package/dist/attribution.js +7 -0
  10. package/dist/attribution.js.map +1 -0
  11. package/dist/dataStoreContext.d.ts +114 -61
  12. package/dist/dataStoreContext.d.ts.map +1 -1
  13. package/dist/dataStoreContext.js +27 -5
  14. package/dist/dataStoreContext.js.map +1 -1
  15. package/dist/dataStoreFactory.d.ts +7 -0
  16. package/dist/dataStoreFactory.d.ts.map +1 -1
  17. package/dist/dataStoreFactory.js +3 -0
  18. package/dist/dataStoreFactory.js.map +1 -1
  19. package/dist/dataStoreRegistry.d.ts +14 -4
  20. package/dist/dataStoreRegistry.d.ts.map +1 -1
  21. package/dist/dataStoreRegistry.js +3 -0
  22. package/dist/dataStoreRegistry.js.map +1 -1
  23. package/dist/garbageCollection.d.ts +35 -10
  24. package/dist/garbageCollection.d.ts.map +1 -1
  25. package/dist/garbageCollection.js +25 -3
  26. package/dist/garbageCollection.js.map +1 -1
  27. package/dist/index.d.ts +52 -6
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +26 -16
  30. package/dist/index.js.map +1 -1
  31. package/dist/protocol.d.ts +10 -3
  32. package/dist/protocol.d.ts.map +1 -1
  33. package/dist/protocol.js.map +1 -1
  34. package/dist/runtime-definitions-alpha.d.ts +993 -0
  35. package/dist/runtime-definitions-beta.d.ts +264 -0
  36. package/dist/runtime-definitions-public.d.ts +264 -0
  37. package/dist/runtime-definitions-untrimmed.d.ts +1068 -0
  38. package/dist/summary.d.ts +138 -70
  39. package/dist/summary.d.ts.map +1 -1
  40. package/dist/summary.js +13 -1
  41. package/dist/summary.js.map +1 -1
  42. package/dist/tsdoc-metadata.json +11 -0
  43. package/package.json +96 -42
  44. package/prettier.config.cjs +8 -0
  45. package/src/aliasing.md +42 -0
  46. package/src/attribution.ts +78 -0
  47. package/src/dataStoreContext.ts +432 -388
  48. package/src/dataStoreFactory.ts +21 -11
  49. package/src/dataStoreRegistry.ts +18 -6
  50. package/src/garbageCollection.ts +38 -15
  51. package/src/index.ts +111 -6
  52. package/src/protocol.ts +46 -38
  53. package/src/summary.ts +298 -225
  54. package/tsconfig.json +10 -12
  55. package/.eslintrc.js +0 -13
package/src/summary.ts CHANGED
@@ -3,29 +3,26 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { TelemetryEventPropertyType } from "@fluidframework/common-definitions";
6
+ import { TelemetryEventPropertyType } from "@fluidframework/core-interfaces";
7
7
  import {
8
- SummaryTree,
9
- ISummaryTree,
10
- ISequencedDocumentMessage,
11
- ISnapshotTree,
12
- ITree,
8
+ SummaryTree,
9
+ ISummaryTree,
10
+ ISequencedDocumentMessage,
11
+ ISnapshotTree,
12
+ ITree,
13
13
  } from "@fluidframework/protocol-definitions";
14
- import {
15
- IGarbageCollectionData,
16
- IGarbageCollectionDetailsBase,
17
- IGarbageCollectionSummaryDetails,
18
- } from "./garbageCollection";
14
+ import { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollection";
19
15
 
20
16
  /**
21
17
  * Contains the aggregation data from a Tree/Subtree.
18
+ * @public
22
19
  */
23
20
  export interface ISummaryStats {
24
- treeNodeCount: number;
25
- blobNodeCount: number;
26
- handleNodeCount: number;
27
- totalBlobSize: number;
28
- unreferencedBlobSize: number;
21
+ treeNodeCount: number;
22
+ blobNodeCount: number;
23
+ handleNodeCount: number;
24
+ totalBlobSize: number;
25
+ unreferencedBlobSize: number;
29
26
  }
30
27
 
31
28
  /**
@@ -34,273 +31,349 @@ export interface ISummaryStats {
34
31
  * each of its DDS.
35
32
  * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject
36
33
  * will be taking part of the summarization process.
34
+ * @public
37
35
  */
38
36
  export interface ISummaryTreeWithStats {
39
- /** Represents an agreggation of node counts and blob sizes associated to the current summary information */
40
- stats: ISummaryStats;
41
- /**
42
- * A recursive data structure that will be converted to a snapshot tree and uploaded
43
- * to the backend.
44
- */
45
- summary: ISummaryTree;
37
+ /**
38
+ * Represents an aggregation of node counts and blob sizes associated to the current summary information
39
+ */
40
+ stats: ISummaryStats;
41
+ /**
42
+ * A recursive data structure that will be converted to a snapshot tree and uploaded
43
+ * to the backend.
44
+ */
45
+ summary: ISummaryTree;
46
46
  }
47
47
 
48
48
  /**
49
49
  * Represents a summary at a current sequence number.
50
+ * @alpha
50
51
  */
51
52
  export interface ISummarizeResult {
52
- stats: ISummaryStats;
53
- summary: SummaryTree;
53
+ stats: ISummaryStats;
54
+ summary: SummaryTree;
54
55
  }
55
56
 
56
57
  /**
57
- * Contains the same data as ISummaryResult but in order to avoid naming colisions,
58
+ * Contains the same data as ISummaryResult but in order to avoid naming collisions,
58
59
  * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.
59
- * Ex: id:""
60
- pathPartsForChildren: ["path1"]
61
- stats: ...
62
- summary:
63
- ...
64
- "path1":
60
+ *
61
+ * @example
62
+ *
63
+ * ```typescript
64
+ * id:""
65
+ * pathPartsForChildren: ["path1"]
66
+ * stats: ...
67
+ * summary:
68
+ * ...
69
+ * "path1":
70
+ * ```
71
+ * @alpha
65
72
  */
66
73
  export interface ISummarizeInternalResult extends ISummarizeResult {
67
- id: string;
68
- /** Additional path parts between this node's ID and its children's IDs. */
69
- pathPartsForChildren?: string[];
70
- }
71
-
72
- /** The garbage collection data of each node in the reference graph. */
73
- export interface IGarbageCollectionNodeData {
74
- /** The set of routes to other nodes in the graph. */
75
- outboundRoutes: string[];
76
- /** If the node is unreferenced, the timestamp of when it was marked unreferenced. */
77
- unreferencedTimestampMs?: number;
74
+ id: string;
75
+ /**
76
+ * Additional path parts between this node's ID and its children's IDs.
77
+ */
78
+ pathPartsForChildren?: string[];
78
79
  }
79
80
 
80
81
  /**
81
- * The garbage collection state of the reference graph. It contains a list of all the nodes in the graph and their
82
- * GC data.
82
+ * @experimental - Can be deleted/changed at any time
83
+ * Contains the necessary information to allow DDSes to do incremental summaries
84
+ * @public
83
85
  */
84
- export interface IGarbageCollectionState {
85
- gcNodes: { [ id: string ]: IGarbageCollectionNodeData; };
86
+ export interface IExperimentalIncrementalSummaryContext {
87
+ /**
88
+ * The sequence number of the summary generated that will be sent to the server.
89
+ */
90
+ summarySequenceNumber: number;
91
+ /**
92
+ * The sequence number of the most recent summary that was acknowledged by the server.
93
+ */
94
+ latestSummarySequenceNumber: number;
95
+ /**
96
+ * The path to the runtime/datastore/dds that is used to generate summary handles
97
+ * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary
98
+ * instead of being a blob or tree node
99
+ *
100
+ * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,
101
+ * a layer should not know its own id. This is important for channel unification work and there has been a lot of
102
+ * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding
103
+ * more dependencies.
104
+ */
105
+ // TODO: remove summaryPath
106
+ summaryPath: string;
86
107
  }
87
108
 
109
+ /**
110
+ * @alpha
111
+ */
88
112
  export type SummarizeInternalFn = (
89
- fullTree: boolean,
90
- trackState: boolean,
91
- telemetryContext?: ITelemetryContext,
113
+ fullTree: boolean,
114
+ trackState: boolean,
115
+ telemetryContext?: ITelemetryContext,
116
+ incrementalSummaryContext?: IExperimentalIncrementalSummaryContext,
92
117
  ) => Promise<ISummarizeInternalResult>;
93
118
 
119
+ /**
120
+ * @alpha
121
+ */
94
122
  export interface ISummarizerNodeConfig {
95
- /**
96
- * True to reuse previous handle when unchanged since last acked summary.
97
- * Defaults to true.
98
- */
99
- readonly canReuseHandle?: boolean;
100
- /**
101
- * True to always stop execution on error during summarize, or false to
102
- * attempt creating a summary that is a pointer ot the last acked summary
103
- * plus outstanding ops in case of internal summarize failure.
104
- * Defaults to false.
105
- *
106
- * BUG BUG: Default to true while we investigate problem
107
- * with differential summaries
108
- */
109
- readonly throwOnFailure?: true;
123
+ /**
124
+ * True to reuse previous handle when unchanged since last acked summary.
125
+ * Defaults to true.
126
+ */
127
+ readonly canReuseHandle?: boolean;
128
+ /**
129
+ * True to always stop execution on error during summarize, or false to
130
+ * attempt creating a summary that is a pointer ot the last acked summary
131
+ * plus outstanding ops in case of internal summarize failure.
132
+ * Defaults to false.
133
+ *
134
+ * BUG BUG: Default to true while we investigate problem
135
+ * with differential summaries
136
+ */
137
+ readonly throwOnFailure?: true;
110
138
  }
111
139
 
140
+ /**
141
+ * @alpha
142
+ */
112
143
  export interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {
113
- /**
114
- * True if GC is disabled. If so, don't track GC related state for a summary.
115
- * This is propagated to all child nodes.
116
- */
117
- readonly gcDisabled?: boolean;
144
+ /**
145
+ * True if GC is disabled. If so, don't track GC related state for a summary.
146
+ * This is propagated to all child nodes.
147
+ */
148
+ readonly gcDisabled?: boolean;
118
149
  }
119
150
 
151
+ /**
152
+ * @alpha
153
+ */
120
154
  export enum CreateSummarizerNodeSource {
121
- FromSummary,
122
- FromAttach,
123
- Local,
155
+ FromSummary,
156
+ FromAttach,
157
+ Local,
124
158
  }
125
- export type CreateChildSummarizerNodeParam = {
126
- type: CreateSummarizerNodeSource.FromSummary;
127
- } | {
128
- type: CreateSummarizerNodeSource.FromAttach;
129
- sequenceNumber: number;
130
- snapshot: ITree;
131
- } | {
132
- type: CreateSummarizerNodeSource.Local;
133
- };
159
+ /**
160
+ * @alpha
161
+ */
162
+ export type CreateChildSummarizerNodeParam =
163
+ | {
164
+ type: CreateSummarizerNodeSource.FromSummary;
165
+ }
166
+ | {
167
+ type: CreateSummarizerNodeSource.FromAttach;
168
+ sequenceNumber: number;
169
+ snapshot: ITree;
170
+ }
171
+ | {
172
+ type: CreateSummarizerNodeSource.Local;
173
+ };
134
174
 
175
+ /**
176
+ * @alpha
177
+ */
135
178
  export interface ISummarizerNode {
136
- /** Latest successfully acked summary reference sequence number */
137
- readonly referenceSequenceNumber: number;
138
- /**
139
- * Marks the node as having a change with the given sequence number.
140
- * @param sequenceNumber - sequence number of change
141
- */
142
- invalidate(sequenceNumber: number): void;
143
- /**
144
- * Calls the internal summarize function and handles internal state tracking.
145
- * If unchanged and fullTree is false, it will reuse previous summary subtree.
146
- * If an error is encountered and throwOnFailure is false, it will try to make
147
- * a summary with a pointer to the previous summary + a blob of outstanding ops.
148
- * @param fullTree - true to skip optimizations and always generate the full tree
149
- * @param trackState - indicates whether the summarizer node should track the state of the summary or not
150
- * @param telemetryContext - summary data passed through the layers for telemetry purposes
151
- */
152
- summarize(
153
- fullTree: boolean,
154
- trackState?: boolean,
155
- telemetryContext?: ITelemetryContext,
156
- ): Promise<ISummarizeResult>;
157
- /**
158
- * Checks if there are any additional path parts for children that need to
159
- * be loaded from the base summary. Additional path parts represent parts
160
- * of the path between this SummarizerNode and any child SummarizerNodes
161
- * that it might have. For example: if datastore "a" contains dds "b", but the
162
- * path is "/a/.channels/b", then the additional path part is ".channels".
163
- * @param snapshot - the base summary to parse
164
- */
165
- loadBaseSummaryWithoutDifferential(snapshot: ISnapshotTree): void;
166
- /**
167
- * Does all the work of loadBaseSummaryWithoutDifferential. Additionally if
168
- * the base summary is a differential summary containing handle + outstanding ops blob,
169
- * then this will return the innermost base summary, and update the state by
170
- * tracking the outstanding ops.
171
- * @param snapshot - the base summary to parse
172
- * @param readAndParseBlob - function to read and parse blobs from storage
173
- * @returns the base summary to be used
174
- */
175
- loadBaseSummary(
176
- snapshot: ISnapshotTree,
177
- readAndParseBlob: <T>(id: string) => Promise<T>,
178
- ): Promise<{ baseSummary: ISnapshotTree; outstandingOps: ISequencedDocumentMessage[]; }>;
179
- /**
180
- * Records an op representing a change to this node/subtree.
181
- * @param op - op of change to record
182
- */
183
- recordChange(op: ISequencedDocumentMessage): void;
179
+ /**
180
+ * Latest successfully acked summary reference sequence number
181
+ */
182
+ readonly referenceSequenceNumber: number;
183
+ /**
184
+ * Marks the node as having a change with the given sequence number.
185
+ * @param sequenceNumber - sequence number of change
186
+ */
187
+ invalidate(sequenceNumber: number): void;
188
+ /**
189
+ * Calls the internal summarize function and handles internal state tracking.
190
+ * If unchanged and fullTree is false, it will reuse previous summary subtree.
191
+ * If an error is encountered and throwOnFailure is false, it will try to make
192
+ * a summary with a pointer to the previous summary + a blob of outstanding ops.
193
+ * @param fullTree - true to skip optimizations and always generate the full tree
194
+ * @param trackState - indicates whether the summarizer node should track the state of the summary or not
195
+ * @param telemetryContext - summary data passed through the layers for telemetry purposes
196
+ */
197
+ summarize(
198
+ fullTree: boolean,
199
+ trackState?: boolean,
200
+ telemetryContext?: ITelemetryContext,
201
+ ): Promise<ISummarizeResult>;
202
+ /**
203
+ * Checks if there are any additional path parts for children that need to
204
+ * be loaded from the base summary. Additional path parts represent parts
205
+ * of the path between this SummarizerNode and any child SummarizerNodes
206
+ * that it might have. For example: if datastore "a" contains dds "b", but the
207
+ * path is "/a/.channels/b", then the additional path part is ".channels".
208
+ * @param snapshot - the base summary to parse
209
+ */
210
+ updateBaseSummaryState(snapshot: ISnapshotTree): void;
211
+ /**
212
+ * Records an op representing a change to this node/subtree.
213
+ * @param op - op of change to record
214
+ */
215
+ recordChange(op: ISequencedDocumentMessage): void;
216
+
217
+ createChild(
218
+ /**
219
+ * Summarize function
220
+ */
221
+ summarizeInternalFn: SummarizeInternalFn,
222
+ /**
223
+ * Initial id or path part of this node
224
+ */
225
+ id: string,
226
+ /**
227
+ * Information needed to create the node.
228
+ * If it is from a base summary, it will assert that a summary has been seen.
229
+ * Attach information if it is created from an attach op.
230
+ * If it is local, it will throw unsupported errors on calls to summarize.
231
+ */
232
+ createParam: CreateChildSummarizerNodeParam,
233
+ /**
234
+ * Optional configuration affecting summarize behavior
235
+ */
236
+ config?: ISummarizerNodeConfig,
237
+ ): ISummarizerNode;
184
238
 
185
- createChild(
186
- /** Summarize function */
187
- summarizeInternalFn: SummarizeInternalFn,
188
- /** Initial id or path part of this node */
189
- id: string,
190
- /**
191
- * Information needed to create the node.
192
- * If it is from a base summary, it will assert that a summary has been seen.
193
- * Attach information if it is created from an attach op.
194
- * If it is local, it will throw unsupported errors on calls to summarize.
195
- */
196
- createParam: CreateChildSummarizerNodeParam,
197
- /** Optional configuration affecting summarize behavior */
198
- config?: ISummarizerNodeConfig,
199
- ): ISummarizerNode;
239
+ getChild(id: string): ISummarizerNode | undefined;
200
240
 
201
- getChild(id: string): ISummarizerNode | undefined;
241
+ /** True if a summary is currently in progress */
242
+ isSummaryInProgress?(): boolean;
202
243
  }
203
244
 
204
245
  /**
205
- * Extends the functionality of ISummarizerNode to support garbage collection. It adds / udpates the following APIs:
206
- * - usedRoutes - The routes in this node that are currently in use.
207
- * - getGCData - A new API that can be used to get the garbage collection data for this node.
208
- * - summarize - Added a trackState flag which indicates whether the summarizer node should track the state of the
209
- * summary or not.
210
- * - createChild - Added the following params:
211
- * - getGCDataFn - This gets the GC data from the caller. This must be provided in order for getGCData to work.
212
- * - getInitialGCDetailsFn - This gets the initial GC details from the caller.
213
- * - deleteChild - Deletes a child node.
214
- * - isReferenced - This tells whether this node is referenced in the document or not.
215
- * - updateUsedRoutes - Used to notify this node of routes that are currently in use in it.
246
+ * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:
247
+ *
248
+ * `usedRoutes`: The routes in this node that are currently in use.
249
+ *
250
+ * `getGCData`: A new API that can be used to get the garbage collection data for this node.
251
+ *
252
+ * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the
253
+ * summary or not.
254
+ *
255
+ * `createChild`: Added the following params:
256
+ *
257
+ * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.
258
+ *
259
+ * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.
260
+ *
261
+ * `deleteChild`: Deletes a child node.
262
+ *
263
+ * `isReferenced`: This tells whether this node is referenced in the document or not.
264
+ *
265
+ * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.
266
+ * @alpha
216
267
  */
217
268
  export interface ISummarizerNodeWithGC extends ISummarizerNode {
218
- createChild(
219
- /** Summarize function */
220
- summarizeInternalFn: SummarizeInternalFn,
221
- /** Initial id or path part of this node */
222
- id: string,
223
- /**
224
- * Information needed to create the node.
225
- * If it is from a base summary, it will assert that a summary has been seen.
226
- * Attach information if it is created from an attach op.
227
- * If it is local, it will throw unsupported errors on calls to summarize.
228
- */
229
- createParam: CreateChildSummarizerNodeParam,
230
- /** Optional configuration affecting summarize behavior */
231
- config?: ISummarizerNodeConfigWithGC,
232
- getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
233
- getInitialGCSummaryDetailsFn?: () => Promise<IGarbageCollectionSummaryDetails>,
234
- ): ISummarizerNodeWithGC;
269
+ createChild(
270
+ /**
271
+ * Summarize function
272
+ */
273
+ summarizeInternalFn: SummarizeInternalFn,
274
+ /**
275
+ * Initial id or path part of this node
276
+ */
277
+ id: string,
278
+ /**
279
+ * Information needed to create the node.
280
+ * If it is from a base summary, it will assert that a summary has been seen.
281
+ * Attach information if it is created from an attach op.
282
+ * If it is local, it will throw unsupported errors on calls to summarize.
283
+ */
284
+ createParam: CreateChildSummarizerNodeParam,
285
+ /**
286
+ * Optional configuration affecting summarize behavior
287
+ */
288
+ config?: ISummarizerNodeConfigWithGC,
289
+ getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
290
+ /**
291
+ * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.
292
+ */
293
+ getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,
294
+ ): ISummarizerNodeWithGC;
235
295
 
236
- /**
237
- * Delete the child with the given id..
238
- */
239
- deleteChild(id: string): void;
296
+ /**
297
+ * Delete the child with the given id..
298
+ */
299
+ deleteChild(id: string): void;
240
300
 
241
- getChild(id: string): ISummarizerNodeWithGC | undefined;
301
+ getChild(id: string): ISummarizerNodeWithGC | undefined;
242
302
 
243
- /**
244
- * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent
245
- * this node. Each node has a set of outbound routes to other GC nodes in the document.
246
- * @param fullGC - true to bypass optimizations and force full generation of GC data.
247
- */
248
- getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
303
+ /**
304
+ * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent
305
+ * this node. Each node has a set of outbound routes to other GC nodes in the document.
306
+ * @param fullGC - true to bypass optimizations and force full generation of GC data.
307
+ */
308
+ getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
249
309
 
250
- /** Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd */
251
- isReferenced(): boolean;
310
+ /**
311
+ * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd
312
+ */
313
+ isReferenced(): boolean;
252
314
 
253
- /**
254
- * After GC has run, called to notify this node of routes that are used in it. These are used for the following:
255
- * 1. To identify if this node is being referenced in the document or not.
256
- * 2. To identify if this node or any of its children's used routes changed since last summary.
257
- *
258
- * @param usedRoutes - The routes that are used in this node.
259
- * @param gcTimestamp - The time when GC was run that generated these used routes. If a node becomes unreferenced
260
- * as part of this GC run, this timestamp is used to update the time when it happens.
261
- */
262
- updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;
263
-
264
- /**
265
- * @deprecated - Renamed to getBaseGCDetails.
266
- * Returns the GC details that may be added to this node's summary.
267
- */
268
- getGCSummaryDetails(): IGarbageCollectionSummaryDetails;
269
-
270
- /** Returns the GC details to be added to this node's summary and is used to initialize new nodes' GC state. */
271
- getBaseGCDetails?(): IGarbageCollectionDetailsBase;
315
+ /**
316
+ * After GC has run, called to notify this node of routes that are used in it. These are used for the following:
317
+ * 1. To identify if this node is being referenced in the document or not.
318
+ * 2. To identify if this node or any of its children's used routes changed since last summary.
319
+ *
320
+ * @param usedRoutes - The routes that are used in this node.
321
+ */
322
+ updateUsedRoutes(usedRoutes: string[]): void;
272
323
  }
273
324
 
325
+ /**
326
+ * @internal
327
+ */
274
328
  export const channelsTreeName = ".channels";
275
329
 
276
330
  /**
277
331
  * Contains telemetry data relevant to summarization workflows.
278
332
  * This object is expected to be modified directly by various summarize methods.
333
+ * @public
279
334
  */
280
335
  export interface ITelemetryContext {
281
- /**
282
- * Sets value for telemetry data being tracked.
283
- * @param prefix - unique prefix to tag this data with (ex: "fluid:map:")
284
- * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
285
- * @param value - value to attribute to this summary telemetry data
286
- */
287
- set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
336
+ /**
337
+ * Sets value for telemetry data being tracked.
338
+ * @param prefix - unique prefix to tag this data with (ex: "fluid:map:")
339
+ * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
340
+ * @param value - value to attribute to this summary telemetry data
341
+ */
342
+ set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
343
+
344
+ /**
345
+ * Sets multiple values for telemetry data being tracked.
346
+ * @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
347
+ * @param property - property name of the telemetry data being tracked (ex: "Options")
348
+ * @param values - A set of values to attribute to this summary telemetry data.
349
+ */
350
+ setMultiple(
351
+ prefix: string,
352
+ property: string,
353
+ values: Record<string, TelemetryEventPropertyType>,
354
+ ): void;
288
355
 
289
- /**
290
- * Get the telemetry data being tracked
291
- * @param prefix - unique prefix for this data (ex: "fluid:map:")
292
- * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
293
- * @returns undefined if item not found
294
- */
295
- get(prefix: string, property: string): TelemetryEventPropertyType;
356
+ /**
357
+ * Get the telemetry data being tracked
358
+ * @param prefix - unique prefix for this data (ex: "fluid:map:")
359
+ * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
360
+ * @returns undefined if item not found
361
+ */
362
+ get(prefix: string, property: string): TelemetryEventPropertyType;
296
363
 
297
- /**
298
- * Returns a serialized version of all the telemetry data.
299
- * Should be used when logging in telemetry events.
300
- */
301
- serialize(): string;
364
+ /**
365
+ * Returns a serialized version of all the telemetry data.
366
+ * Should be used when logging in telemetry events.
367
+ */
368
+ serialize(): string;
302
369
  }
303
370
 
371
+ /**
372
+ * @internal
373
+ */
304
374
  export const blobCountPropertyName = "BlobCount";
305
375
 
376
+ /**
377
+ * @internal
378
+ */
306
379
  export const totalBlobSizePropertyName = "TotalBlobSize";
package/tsconfig.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
- "extends": "@fluidframework/build-common/ts-common-config.json",
3
- "exclude": [
4
- "src/test/**/*"
5
- ],
6
- "compilerOptions": {
7
- "rootDir": "./src",
8
- "outDir": "./dist",
9
- "composite": true,
10
- },
11
- "include": [
12
- "src/**/*"
13
- ]
2
+ "extends": [
3
+ "../../../common/build/build-common/tsconfig.base.json",
4
+ "../../../common/build/build-common/tsconfig.esm-only.json",
5
+ ],
6
+ "include": ["src/**/*"],
7
+ "exclude": ["src/test/**/*"],
8
+ "compilerOptions": {
9
+ "rootDir": "./src",
10
+ "outDir": "./dist",
11
+ },
14
12
  }
package/.eslintrc.js DELETED
@@ -1,13 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- module.exports = {
7
- "parserOptions": {
8
- "project": ["./tsconfig.json", "./src/test/tsconfig.json"]
9
- },
10
- "extends": [
11
- "@fluidframework/eslint-config-fluid"
12
- ]
13
- }