@fluidframework/shared-summary-block 2.0.0-internal.7.3.0 → 2.0.0-internal.8.0.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/api-extractor-lint.json +13 -0
  3. package/api-extractor.json +8 -3
  4. package/api-report/shared-summary-block.api.md +3 -3
  5. package/dist/interfaces.cjs.map +1 -1
  6. package/dist/interfaces.d.ts +4 -2
  7. package/dist/interfaces.d.ts.map +1 -1
  8. package/dist/packageVersion.cjs +1 -1
  9. package/dist/packageVersion.cjs.map +1 -1
  10. package/dist/packageVersion.d.ts +1 -1
  11. package/dist/shared-summary-block-alpha.d.ts +3 -114
  12. package/dist/shared-summary-block-beta.d.ts +23 -114
  13. package/dist/shared-summary-block-public.d.ts +23 -114
  14. package/dist/shared-summary-block-untrimmed.d.ts +6 -5
  15. package/dist/sharedSummaryBlock.cjs +1 -2
  16. package/dist/sharedSummaryBlock.cjs.map +1 -1
  17. package/dist/sharedSummaryBlock.d.ts +1 -2
  18. package/dist/sharedSummaryBlock.d.ts.map +1 -1
  19. package/dist/sharedSummaryBlockFactory.cjs +1 -1
  20. package/dist/sharedSummaryBlockFactory.cjs.map +1 -1
  21. package/dist/sharedSummaryBlockFactory.d.ts +1 -1
  22. package/lib/index.d.ts +3 -3
  23. package/lib/index.d.ts.map +1 -1
  24. package/lib/interfaces.d.ts +4 -2
  25. package/lib/interfaces.d.ts.map +1 -1
  26. package/lib/interfaces.mjs.map +1 -1
  27. package/lib/packageVersion.d.ts +1 -1
  28. package/lib/packageVersion.mjs +1 -1
  29. package/lib/packageVersion.mjs.map +1 -1
  30. package/lib/shared-summary-block-alpha.d.ts +3 -114
  31. package/lib/shared-summary-block-beta.d.ts +23 -114
  32. package/lib/shared-summary-block-public.d.ts +23 -114
  33. package/lib/shared-summary-block-untrimmed.d.ts +6 -5
  34. package/lib/sharedSummaryBlock.d.ts +2 -3
  35. package/lib/sharedSummaryBlock.d.ts.map +1 -1
  36. package/lib/sharedSummaryBlock.mjs +1 -2
  37. package/lib/sharedSummaryBlock.mjs.map +1 -1
  38. package/lib/sharedSummaryBlockFactory.d.ts +1 -1
  39. package/lib/sharedSummaryBlockFactory.d.ts.map +1 -1
  40. package/lib/sharedSummaryBlockFactory.mjs +1 -1
  41. package/lib/sharedSummaryBlockFactory.mjs.map +1 -1
  42. package/package.json +15 -24
  43. package/src/interfaces.ts +4 -2
  44. package/src/packageVersion.ts +1 -1
  45. package/src/sharedSummaryBlock.ts +3 -4
  46. package/src/sharedSummaryBlockFactory.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @fluidframework/shared-summary-block
2
2
 
3
+ ## 2.0.0-internal.8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - datastore-definitions: Jsonable and Serializable now require a generic parameter [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
8
+
9
+ The `Jsonable` and `Serializable` types from @fluidframework/datastore-definitions now require a generic parameter and
10
+ if that type is `any` or `unknown`will return a new result `JsonableTypeWith<>` that more accurately represents the
11
+ limitation of serialization.
12
+
13
+ Additional modifications:
14
+
15
+ - `Jsonable`'s `TReplacement` parameter default has also been changed from `void` to `never`, which now disallows
16
+ `void`.
17
+ - Unrecognized primitive types like `symbol` are now filtered to `never` instead of `{}`.
18
+ - Recursive types with arrays (`[]`) are now supported.
19
+
20
+ `Serializable` is commonly used for DDS values and now requires more precision when using them. For example SharedMatrix
21
+ (unqualified) has an `any` default that meant values were `Serializable<any>` (i.e. `any`), but now `Serializable<any>`
22
+ is `JsonableTypeWith<IFluidHandle>` which may be problematic for reading or writing. Preferred correction is to specify
23
+ the value type but casting through `any` may provide a quick fix.
24
+
25
+ ## 2.0.0-internal.7.4.0
26
+
27
+ Dependency updates only.
28
+
3
29
  ## 2.0.0-internal.7.3.0
4
30
 
5
31
  Dependency updates only.
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-lint.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ // TODO: remove once base config has this enabled as an error
7
+ "ae-incompatible-release-tags": {
8
+ "logLevel": "error",
9
+ "addToApiReportFile": false
10
+ }
11
+ }
12
+ }
13
+ }
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-base.json",
4
- "dtsRollup": {
5
- "enabled": true
3
+ "extends": "../../../common/build/build-common/api-extractor-base.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ // TODO: Add missing documentation and remove this rule override
7
+ "ae-undocumented": {
8
+ "logLevel": "none"
9
+ }
10
+ }
6
11
  }
7
12
  }
@@ -16,13 +16,13 @@ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
16
16
  import { Jsonable } from '@fluidframework/datastore-definitions';
17
17
  import { SharedObject } from '@fluidframework/shared-object-base';
18
18
 
19
- // @public
19
+ // @internal
20
20
  export interface ISharedSummaryBlock extends ISharedObject {
21
21
  get<T>(key: string): Jsonable<T>;
22
22
  set<T>(key: string, value: Jsonable<T>): void;
23
23
  }
24
24
 
25
- // @public
25
+ // @internal
26
26
  export class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
27
27
  constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
28
28
  // (undocumented)
@@ -41,7 +41,7 @@ export class SharedSummaryBlock extends SharedObject implements ISharedSummaryBl
41
41
  protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
42
42
  }
43
43
 
44
- // @public @sealed
44
+ // @internal @sealed
45
45
  export class SharedSummaryBlockFactory implements IChannelFactory {
46
46
  // (undocumented)
47
47
  static readonly Attributes: IChannelAttributes;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.cjs","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Jsonable } from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\n\n/**\n * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.\n * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,\n * the set of calls on this interface to set data should be the same. This is critical because the object does not\n * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.\n *\n * @public\n */\nexport interface ISharedSummaryBlock extends ISharedObject {\n\t/**\n\t * Retrieves the given key from the map.\n\t * @param key - Key to retrieve from.\n\t * @returns The stored value, or undefined if the key is not set.\n\t */\n\tget<T>(key: string): Jsonable<T>;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at.\n\t * @param value - Jsonable type value to set.\n\t */\n\tset<T>(key: string, value: Jsonable<T>): void;\n}\n"]}
1
+ {"version":3,"file":"interfaces.cjs","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Jsonable } from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\n\n/**\n * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.\n * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,\n * the set of calls on this interface to set data should be the same. This is critical because the object does not\n * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.\n * @internal\n */\nexport interface ISharedSummaryBlock extends ISharedObject {\n\t/**\n\t * Retrieves the given key from the map.\n\t * @param key - Key to retrieve from.\n\t * @returns The stored value, or undefined if the key is not set.\n\t *\n\t * @privateRemarks\n\t * The return type is underspecified to allow for the possibility of objects with function or undefined values.\n\t */\n\tget<T>(key: string): Jsonable<T>;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at.\n\t * @param value - Jsonable type value to set.\n\t */\n\tset<T>(key: string, value: Jsonable<T>): void;\n}\n"]}
@@ -9,14 +9,16 @@ import { ISharedObject } from "@fluidframework/shared-object-base";
9
9
  * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
10
10
  * the set of calls on this interface to set data should be the same. This is critical because the object does not
11
11
  * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
12
- *
13
- * @public
12
+ * @internal
14
13
  */
15
14
  export interface ISharedSummaryBlock extends ISharedObject {
16
15
  /**
17
16
  * Retrieves the given key from the map.
18
17
  * @param key - Key to retrieve from.
19
18
  * @returns The stored value, or undefined if the key is not set.
19
+ *
20
+ * @privateRemarks
21
+ * The return type is underspecified to allow for the possibility of objects with function or undefined values.
20
22
  */
21
23
  get<T>(key: string): Jsonable<T>;
22
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACzD;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEjC;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC9C"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACzD;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEjC;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC9C"}
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/shared-summary-block";
11
- exports.pkgVersion = "2.0.0-internal.7.3.0";
11
+ exports.pkgVersion = "2.0.0-internal.8.0.0";
12
12
  //# sourceMappingURL=packageVersion.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.cjs","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sCAAsC,CAAC;AACjD,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/shared-summary-block\";\nexport const pkgVersion = \"2.0.0-internal.7.3.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.cjs","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sCAAsC,CAAC;AACjD,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/shared-summary-block\";\nexport const pkgVersion = \"2.0.0-internal.8.0.0\";\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/shared-summary-block";
8
- export declare const pkgVersion = "2.0.0-internal.7.3.0";
8
+ export declare const pkgVersion = "2.0.0-internal.8.0.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -10,121 +10,10 @@ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
10
10
  import { Jsonable } from '@fluidframework/datastore-definitions';
11
11
  import { SharedObject } from '@fluidframework/shared-object-base';
12
12
 
13
- /**
14
- * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
15
- * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
16
- * the set of calls on this interface to set data should be the same. This is critical because the object does not
17
- * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
18
- *
19
- * @public
20
- */
21
- export declare interface ISharedSummaryBlock extends ISharedObject {
22
- /**
23
- * Retrieves the given key from the map.
24
- * @param key - Key to retrieve from.
25
- * @returns The stored value, or undefined if the key is not set.
26
- */
27
- get<T>(key: string): Jsonable<T>;
28
- /**
29
- * Sets the value stored at key to the provided value.
30
- * @param key - Key to set at.
31
- * @param value - Jsonable type value to set.
32
- */
33
- set<T>(key: string, value: Jsonable<T>): void;
34
- }
13
+ /* Excluded from this release type: ISharedSummaryBlock */
35
14
 
36
- /**
37
- * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
38
- * Data should be set in this object in response to a remote op.
39
- *
40
- * @public
41
- */
42
- export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
43
- /**
44
- * Create a new shared summary block
45
- *
46
- * @param runtime - data store runtime the new shared summary block belongs to.
47
- * @param id - optional name of the shared summary block.
48
- * @returns newly created shared summary block (but not attached yet).
49
- */
50
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
51
- /**
52
- * Get a factory for SharedSummaryBlock to register with the data store.
53
- *
54
- * @returns a factory that creates and loads SharedSummaryBlock.
55
- */
56
- static getFactory(): IChannelFactory;
57
- /**
58
- * The data held by this object.
59
- */
60
- private readonly data;
61
- /**
62
- * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
63
- * be provided.
64
- *
65
- * @param id - optional name of the shared summary block.
66
- * @param runtime - data store runtime thee object belongs to.
67
- * @param attributes - The attributes for the object.
68
- */
69
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
70
- /**
71
- * {@inheritDoc ISharedSummaryBlock.get}
72
- */
73
- get<T>(key: string): Jsonable<T>;
74
- /**
75
- * {@inheritDoc ISharedSummaryBlock.set}
76
- */
77
- set<T>(key: string, value: Jsonable<T>): void;
78
- /**
79
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
80
- */
81
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
82
- /**
83
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
84
- */
85
- protected loadCore(storage: IChannelStorageService): Promise<void>;
86
- /**
87
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
88
- */
89
- protected onDisconnect(): void;
90
- /**
91
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
92
- */
93
- protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
94
- protected applyStashedOp(): void;
95
- }
15
+ /* Excluded from this release type: SharedSummaryBlock */
96
16
 
97
- /**
98
- * The factory that defines the shared summary block.
99
- *
100
- * @sealed
101
- * @public
102
- */
103
- export declare class SharedSummaryBlockFactory implements IChannelFactory {
104
- /**
105
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
106
- */
107
- static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
108
- /**
109
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
110
- */
111
- static readonly Attributes: IChannelAttributes;
112
- /**
113
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
114
- */
115
- get type(): string;
116
- /**
117
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
118
- */
119
- get attributes(): IChannelAttributes;
120
- /**
121
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
122
- */
123
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
124
- /**
125
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
126
- */
127
- create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
128
- }
17
+ /* Excluded from this release type: SharedSummaryBlockFactory */
129
18
 
130
19
  export { }
@@ -10,121 +10,30 @@ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
10
10
  import { Jsonable } from '@fluidframework/datastore-definitions';
11
11
  import { SharedObject } from '@fluidframework/shared-object-base';
12
12
 
13
- /**
14
- * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
15
- * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
16
- * the set of calls on this interface to set data should be the same. This is critical because the object does not
17
- * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
18
- *
19
- * @public
20
- */
21
- export declare interface ISharedSummaryBlock extends ISharedObject {
22
- /**
23
- * Retrieves the given key from the map.
24
- * @param key - Key to retrieve from.
25
- * @returns The stored value, or undefined if the key is not set.
26
- */
27
- get<T>(key: string): Jsonable<T>;
28
- /**
29
- * Sets the value stored at key to the provided value.
30
- * @param key - Key to set at.
31
- * @param value - Jsonable type value to set.
32
- */
33
- set<T>(key: string, value: Jsonable<T>): void;
34
- }
13
+ /* Excluded from this release type: IChannelAttributes */
35
14
 
36
- /**
37
- * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
38
- * Data should be set in this object in response to a remote op.
39
- *
40
- * @public
41
- */
42
- export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
43
- /**
44
- * Create a new shared summary block
45
- *
46
- * @param runtime - data store runtime the new shared summary block belongs to.
47
- * @param id - optional name of the shared summary block.
48
- * @returns newly created shared summary block (but not attached yet).
49
- */
50
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
51
- /**
52
- * Get a factory for SharedSummaryBlock to register with the data store.
53
- *
54
- * @returns a factory that creates and loads SharedSummaryBlock.
55
- */
56
- static getFactory(): IChannelFactory;
57
- /**
58
- * The data held by this object.
59
- */
60
- private readonly data;
61
- /**
62
- * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
63
- * be provided.
64
- *
65
- * @param id - optional name of the shared summary block.
66
- * @param runtime - data store runtime thee object belongs to.
67
- * @param attributes - The attributes for the object.
68
- */
69
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
70
- /**
71
- * {@inheritDoc ISharedSummaryBlock.get}
72
- */
73
- get<T>(key: string): Jsonable<T>;
74
- /**
75
- * {@inheritDoc ISharedSummaryBlock.set}
76
- */
77
- set<T>(key: string, value: Jsonable<T>): void;
78
- /**
79
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
80
- */
81
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
82
- /**
83
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
84
- */
85
- protected loadCore(storage: IChannelStorageService): Promise<void>;
86
- /**
87
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
88
- */
89
- protected onDisconnect(): void;
90
- /**
91
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
92
- */
93
- protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
94
- protected applyStashedOp(): void;
95
- }
15
+ /* Excluded from this release type: IChannelFactory */
96
16
 
97
- /**
98
- * The factory that defines the shared summary block.
99
- *
100
- * @sealed
101
- * @public
102
- */
103
- export declare class SharedSummaryBlockFactory implements IChannelFactory {
104
- /**
105
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
106
- */
107
- static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
108
- /**
109
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
110
- */
111
- static readonly Attributes: IChannelAttributes;
112
- /**
113
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
114
- */
115
- get type(): string;
116
- /**
117
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
118
- */
119
- get attributes(): IChannelAttributes;
120
- /**
121
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
122
- */
123
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
124
- /**
125
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
126
- */
127
- create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
128
- }
17
+ /* Excluded from this release type: IChannelServices */
18
+
19
+ /* Excluded from this release type: IChannelStorageService */
20
+
21
+ /* Excluded from this release type: IFluidDataStoreRuntime */
22
+
23
+ /* Excluded from this release type: IFluidSerializer */
24
+
25
+ /* Excluded from this release type: ISharedObject */
26
+
27
+ /* Excluded from this release type: ISharedSummaryBlock */
28
+
29
+ /* Excluded from this release type: ISummaryTreeWithStats */
30
+
31
+ /* Excluded from this release type: Jsonable */
32
+
33
+ /* Excluded from this release type: SharedObject */
34
+
35
+ /* Excluded from this release type: SharedSummaryBlock */
36
+
37
+ /* Excluded from this release type: SharedSummaryBlockFactory */
129
38
 
130
39
  export { }
@@ -10,121 +10,30 @@ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
10
10
  import { Jsonable } from '@fluidframework/datastore-definitions';
11
11
  import { SharedObject } from '@fluidframework/shared-object-base';
12
12
 
13
- /**
14
- * Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops.
15
- * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
16
- * the set of calls on this interface to set data should be the same. This is critical because the object does not
17
- * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
18
- *
19
- * @public
20
- */
21
- export declare interface ISharedSummaryBlock extends ISharedObject {
22
- /**
23
- * Retrieves the given key from the map.
24
- * @param key - Key to retrieve from.
25
- * @returns The stored value, or undefined if the key is not set.
26
- */
27
- get<T>(key: string): Jsonable<T>;
28
- /**
29
- * Sets the value stored at key to the provided value.
30
- * @param key - Key to set at.
31
- * @param value - Jsonable type value to set.
32
- */
33
- set<T>(key: string, value: Jsonable<T>): void;
34
- }
13
+ /* Excluded from this release type: IChannelAttributes */
35
14
 
36
- /**
37
- * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
38
- * Data should be set in this object in response to a remote op.
39
- *
40
- * @public
41
- */
42
- export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
43
- /**
44
- * Create a new shared summary block
45
- *
46
- * @param runtime - data store runtime the new shared summary block belongs to.
47
- * @param id - optional name of the shared summary block.
48
- * @returns newly created shared summary block (but not attached yet).
49
- */
50
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;
51
- /**
52
- * Get a factory for SharedSummaryBlock to register with the data store.
53
- *
54
- * @returns a factory that creates and loads SharedSummaryBlock.
55
- */
56
- static getFactory(): IChannelFactory;
57
- /**
58
- * The data held by this object.
59
- */
60
- private readonly data;
61
- /**
62
- * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will
63
- * be provided.
64
- *
65
- * @param id - optional name of the shared summary block.
66
- * @param runtime - data store runtime thee object belongs to.
67
- * @param attributes - The attributes for the object.
68
- */
69
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
70
- /**
71
- * {@inheritDoc ISharedSummaryBlock.get}
72
- */
73
- get<T>(key: string): Jsonable<T>;
74
- /**
75
- * {@inheritDoc ISharedSummaryBlock.set}
76
- */
77
- set<T>(key: string, value: Jsonable<T>): void;
78
- /**
79
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
80
- */
81
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
82
- /**
83
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
84
- */
85
- protected loadCore(storage: IChannelStorageService): Promise<void>;
86
- /**
87
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
88
- */
89
- protected onDisconnect(): void;
90
- /**
91
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
92
- */
93
- protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
94
- protected applyStashedOp(): void;
95
- }
15
+ /* Excluded from this release type: IChannelFactory */
96
16
 
97
- /**
98
- * The factory that defines the shared summary block.
99
- *
100
- * @sealed
101
- * @public
102
- */
103
- export declare class SharedSummaryBlockFactory implements IChannelFactory {
104
- /**
105
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
106
- */
107
- static readonly Type = "https://graph.microsoft.com/types/shared-summary-block";
108
- /**
109
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
110
- */
111
- static readonly Attributes: IChannelAttributes;
112
- /**
113
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
114
- */
115
- get type(): string;
116
- /**
117
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
118
- */
119
- get attributes(): IChannelAttributes;
120
- /**
121
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
122
- */
123
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
124
- /**
125
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
126
- */
127
- create(runtime: IFluidDataStoreRuntime, id: string): ISharedObject;
128
- }
17
+ /* Excluded from this release type: IChannelServices */
18
+
19
+ /* Excluded from this release type: IChannelStorageService */
20
+
21
+ /* Excluded from this release type: IFluidDataStoreRuntime */
22
+
23
+ /* Excluded from this release type: IFluidSerializer */
24
+
25
+ /* Excluded from this release type: ISharedObject */
26
+
27
+ /* Excluded from this release type: ISharedSummaryBlock */
28
+
29
+ /* Excluded from this release type: ISummaryTreeWithStats */
30
+
31
+ /* Excluded from this release type: Jsonable */
32
+
33
+ /* Excluded from this release type: SharedObject */
34
+
35
+ /* Excluded from this release type: SharedSummaryBlock */
36
+
37
+ /* Excluded from this release type: SharedSummaryBlockFactory */
129
38
 
130
39
  export { }
@@ -15,14 +15,16 @@ import { SharedObject } from '@fluidframework/shared-object-base';
15
15
  * The set on this interface must only be called in response to a remote op. Basically, if we replay same ops,
16
16
  * the set of calls on this interface to set data should be the same. This is critical because the object does not
17
17
  * generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
18
- *
19
- * @public
18
+ * @internal
20
19
  */
21
20
  export declare interface ISharedSummaryBlock extends ISharedObject {
22
21
  /**
23
22
  * Retrieves the given key from the map.
24
23
  * @param key - Key to retrieve from.
25
24
  * @returns The stored value, or undefined if the key is not set.
25
+ *
26
+ * @privateRemarks
27
+ * The return type is underspecified to allow for the possibility of objects with function or undefined values.
26
28
  */
27
29
  get<T>(key: string): Jsonable<T>;
28
30
  /**
@@ -36,8 +38,7 @@ export declare interface ISharedSummaryBlock extends ISharedObject {
36
38
  /**
37
39
  * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
38
40
  * Data should be set in this object in response to a remote op.
39
- *
40
- * @public
41
+ * @internal
41
42
  */
42
43
  export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
43
44
  /**
@@ -98,7 +99,7 @@ export declare class SharedSummaryBlock extends SharedObject implements ISharedS
98
99
  * The factory that defines the shared summary block.
99
100
  *
100
101
  * @sealed
101
- * @public
102
+ * @internal
102
103
  */
103
104
  export declare class SharedSummaryBlockFactory implements IChannelFactory {
104
105
  /**
@@ -12,8 +12,7 @@ const snapshotFileName = "header";
12
12
  /**
13
13
  * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
14
14
  * Data should be set in this object in response to a remote op.
15
- *
16
- * @public
15
+ * @internal
17
16
  */
18
17
  class SharedSummaryBlock extends shared_object_base_1.SharedObject {
19
18
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sharedSummaryBlock.cjs","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,+DAA4D;AAC5D,2EAI4C;AAC5C,+EAAwE;AAGxE,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAUlC;;;;;GAKG;AACH,MAAa,kBAAmB,SAAQ,iCAAY;IACnD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,qDAAyB,CAAC,IAAI,CAAuB,CAAC;IACxF,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,qDAAyB,EAAE,CAAC;IACxC,CAAC;IAOD;;;;;;;OAOG;IACH,YAAY,EAAU,EAAE,OAA+B,EAAE,UAA8B;QACtF,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,2BAA2B,CAAC,CAAC;QAd7D;;WAEG;QACc,SAAI,GAAG,IAAI,GAAG,EAAoB,CAAC;IAYpD,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAW;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAW,EAAE,KAAkB;QAC5C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1B,mEAAmE;QACnE,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IAED;;OAEG;IACO,aAAa,CAAC,UAA4B;QACnD,MAAM,YAAY,GAAwC,EAAE,CAAC;QAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAChC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,OAAO,IAAA,4CAAuB,EAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,QAAQ,CAAC,OAA+B;QACvD,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAY,EAClC,OAAO,EACP,gBAAgB,CAChB,CAAC;QACF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACpD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC1B;IACF,CAAC;IAED;;OAEG;IACO,YAAY,KAAI,CAAC;IAE3B;;OAEG;IACO,WAAW,CAAC,OAAkC,EAAE,KAAc;QACvE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACtE,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AA7FD,gDA6FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n\tJsonable,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\nimport { SharedSummaryBlockFactory } from \"./sharedSummaryBlockFactory\";\nimport { ISharedSummaryBlock } from \"./interfaces\";\n\nconst snapshotFileName = \"header\";\n\n/**\n * Defines the in-memory object structure to be used for the conversion to/from serialized.\n * Directly used in JSON.stringify, direct result from JSON.parse.\n */\ninterface ISharedSummaryBlockDataSerializable {\n\t[key: string]: Jsonable;\n}\n\n/**\n * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.\n * Data should be set in this object in response to a remote op.\n *\n * @public\n */\nexport class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {\n\t/**\n\t * Create a new shared summary block\n\t *\n\t * @param runtime - data store runtime the new shared summary block belongs to.\n\t * @param id - optional name of the shared summary block.\n\t * @returns newly created shared summary block (but not attached yet).\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SharedSummaryBlockFactory.Type) as SharedSummaryBlock;\n\t}\n\n\t/**\n\t * Get a factory for SharedSummaryBlock to register with the data store.\n\t *\n\t * @returns a factory that creates and loads SharedSummaryBlock.\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SharedSummaryBlockFactory();\n\t}\n\n\t/**\n\t * The data held by this object.\n\t */\n\tprivate readonly data = new Map<string, Jsonable>();\n\n\t/**\n\t * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will\n\t * be provided.\n\t *\n\t * @param id - optional name of the shared summary block.\n\t * @param runtime - data store runtime thee object belongs to.\n\t * @param attributes - The attributes for the object.\n\t */\n\tconstructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes) {\n\t\tsuper(id, runtime, attributes, \"fluid_sharedSummaryBlock_\");\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedSummaryBlock.get}\n\t */\n\tpublic get<T>(key: string): Jsonable<T> {\n\t\treturn this.data.get(key) as Jsonable<T>;\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedSummaryBlock.set}\n\t */\n\tpublic set<T>(key: string, value: Jsonable<T>): void {\n\t\tthis.data.set(key, value);\n\t\t// Set this object as dirty so that it is part of the next summary.\n\t\tthis.dirty();\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}\n\t */\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tconst contentsBlob: ISharedSummaryBlockDataSerializable = {};\n\t\tthis.data.forEach((value, key) => {\n\t\t\tcontentsBlob[key] = value;\n\t\t});\n\t\treturn createSingleBlobSummary(snapshotFileName, JSON.stringify(contentsBlob));\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}\n\t */\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst contents = await readAndParse<ISharedSummaryBlockDataSerializable>(\n\t\t\tstorage,\n\t\t\tsnapshotFileName,\n\t\t);\n\t\tfor (const [key, value] of Object.entries(contents)) {\n\t\t\tthis.data.set(key, value);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}\n\t */\n\tprotected onDisconnect() {}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}\n\t */\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\tthrow new Error(\"shared summary block should not generate any ops.\");\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
1
+ {"version":3,"file":"sharedSummaryBlock.cjs","sourceRoot":"","sources":["../src/sharedSummaryBlock.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,+DAA4D;AAC5D,2EAI4C;AAC5C,+EAAwE;AAGxE,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAUlC;;;;GAIG;AACH,MAAa,kBAAmB,SAAQ,iCAAY;IACnD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,qDAAyB,CAAC,IAAI,CAAuB,CAAC;IACxF,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,qDAAyB,EAAE,CAAC;IACxC,CAAC;IAOD;;;;;;;OAOG;IACH,YAAY,EAAU,EAAE,OAA+B,EAAE,UAA8B;QACtF,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,2BAA2B,CAAC,CAAC;QAd7D;;WAEG;QACc,SAAI,GAAG,IAAI,GAAG,EAA6B,CAAC;IAY7D,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAW;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAgB,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAW,EAAE,KAAkB;QAC5C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1B,mEAAmE;QACnE,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IAED;;OAEG;IACO,aAAa,CAAC,UAA4B;QACnD,MAAM,YAAY,GAAwC,EAAE,CAAC;QAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAChC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,OAAO,IAAA,4CAAuB,EAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,QAAQ,CAAC,OAA+B;QACvD,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAY,EAClC,OAAO,EACP,gBAAgB,CAChB,CAAC;QACF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACpD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC1B;IACF,CAAC;IAED;;OAEG;IACO,YAAY,KAAI,CAAC;IAE3B;;OAEG;IACO,WAAW,CAAC,OAAkC,EAAE,KAAc;QACvE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACtE,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AA7FD,gDA6FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n\tJsonable,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\nimport { SharedSummaryBlockFactory } from \"./sharedSummaryBlockFactory\";\nimport { ISharedSummaryBlock } from \"./interfaces\";\n\nconst snapshotFileName = \"header\";\n\n/**\n * Defines the in-memory object structure to be used for the conversion to/from serialized.\n * Directly used in JSON.stringify, direct result from JSON.parse.\n */\ninterface ISharedSummaryBlockDataSerializable {\n\t[key: string]: Jsonable<unknown>;\n}\n\n/**\n * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.\n * Data should be set in this object in response to a remote op.\n * @internal\n */\nexport class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {\n\t/**\n\t * Create a new shared summary block\n\t *\n\t * @param runtime - data store runtime the new shared summary block belongs to.\n\t * @param id - optional name of the shared summary block.\n\t * @returns newly created shared summary block (but not attached yet).\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SharedSummaryBlockFactory.Type) as SharedSummaryBlock;\n\t}\n\n\t/**\n\t * Get a factory for SharedSummaryBlock to register with the data store.\n\t *\n\t * @returns a factory that creates and loads SharedSummaryBlock.\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SharedSummaryBlockFactory();\n\t}\n\n\t/**\n\t * The data held by this object.\n\t */\n\tprivate readonly data = new Map<string, Jsonable<unknown>>();\n\n\t/**\n\t * Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will\n\t * be provided.\n\t *\n\t * @param id - optional name of the shared summary block.\n\t * @param runtime - data store runtime thee object belongs to.\n\t * @param attributes - The attributes for the object.\n\t */\n\tconstructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes) {\n\t\tsuper(id, runtime, attributes, \"fluid_sharedSummaryBlock_\");\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedSummaryBlock.get}\n\t */\n\tpublic get<T>(key: string): Jsonable<T> {\n\t\treturn this.data.get(key) as Jsonable<T>;\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedSummaryBlock.set}\n\t */\n\tpublic set<T>(key: string, value: Jsonable<T>): void {\n\t\tthis.data.set(key, value);\n\t\t// Set this object as dirty so that it is part of the next summary.\n\t\tthis.dirty();\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}\n\t */\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tconst contentsBlob: ISharedSummaryBlockDataSerializable = {};\n\t\tthis.data.forEach((value, key) => {\n\t\t\tcontentsBlob[key] = value;\n\t\t});\n\t\treturn createSingleBlobSummary(snapshotFileName, JSON.stringify(contentsBlob));\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}\n\t */\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst contents = await readAndParse<ISharedSummaryBlockDataSerializable>(\n\t\t\tstorage,\n\t\t\tsnapshotFileName,\n\t\t);\n\t\tfor (const [key, value] of Object.entries(contents)) {\n\t\t\tthis.data.set(key, value);\n\t\t}\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}\n\t */\n\tprotected onDisconnect() {}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}\n\t */\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\tthrow new Error(\"shared summary block should not generate any ops.\");\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
@@ -10,8 +10,7 @@ import { ISharedSummaryBlock } from "./interfaces";
10
10
  /**
11
11
  * Implementation of a shared summary block. It does not generate any ops. It is only part of the summary.
12
12
  * Data should be set in this object in response to a remote op.
13
- *
14
- * @public
13
+ * @internal
15
14
  */
16
15
  export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock {
17
16
  /**