@fluidframework/datastore-definitions 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @fluidframework/datastore-definitions
2
2
 
3
+ ## 2.0.0-internal.8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - datastore-definitions: Removed request and IFluidRouter from IFluidDataStoreRuntime [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
8
+
9
+ The `request` method and `IFluidRouter` property have been removed from `IFluidDataStoreRuntime`. Please migrate all
10
+ usage to the `IFluidDataStoreRuntime.entryPoint` API.
11
+
12
+ See
13
+ [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
14
+ for more details.
15
+
16
+ - datastore-definitions: Jsonable and Serializable now require a generic parameter [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
17
+
18
+ The `Jsonable` and `Serializable` types from @fluidframework/datastore-definitions now require a generic parameter and
19
+ if that type is `any` or `unknown`will return a new result `JsonableTypeWith<>` that more accurately represents the
20
+ limitation of serialization.
21
+
22
+ Additional modifications:
23
+
24
+ - `Jsonable`'s `TReplacement` parameter default has also been changed from `void` to `never`, which now disallows
25
+ `void`.
26
+ - Unrecognized primitive types like `symbol` are now filtered to `never` instead of `{}`.
27
+ - Recursive types with arrays (`[]`) are now supported.
28
+
29
+ `Serializable` is commonly used for DDS values and now requires more precision when using them. For example SharedMatrix
30
+ (unqualified) has an `any` default that meant values were `Serializable<any>` (i.e. `any`), but now `Serializable<any>`
31
+ is `JsonableTypeWith<IFluidHandle>` which may be problematic for reading or writing. Preferred correction is to specify
32
+ the value type but casting through `any` may provide a quick fix.
33
+
34
+ ## 2.0.0-internal.7.4.0
35
+
36
+ Dependency updates only.
37
+
3
38
  ## 2.0.0-internal.7.3.0
4
39
 
5
40
  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,10 +1,10 @@
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",
3
+ "extends": "../../../common/build/build-common/api-extractor-base.json",
4
4
  "messages": {
5
5
  "extractorMessageReporting": {
6
- "ae-missing-release-tag": {
7
- // TODO: Fix violations and remove this rule override
6
+ // TODO: Add missing documentation and remove this rule override
7
+ "ae-undocumented": {
8
8
  "logLevel": "none"
9
9
  }
10
10
  }
@@ -16,21 +16,18 @@ import { IExperimentalIncrementalSummaryContext } from '@fluidframework/runtime-
16
16
  import { IFluidHandle } from '@fluidframework/core-interfaces';
17
17
  import { IFluidHandleContext } from '@fluidframework/core-interfaces';
18
18
  import { IFluidLoadable } from '@fluidframework/core-interfaces';
19
- import { IFluidRouter } from '@fluidframework/core-interfaces';
20
19
  import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
21
- import { IIdCompressor } from '@fluidframework/runtime-definitions';
20
+ import { IIdCompressor } from '@fluidframework/id-compressor';
22
21
  import { IInboundSignalMessage } from '@fluidframework/runtime-definitions';
23
22
  import { ILoaderOptions } from '@fluidframework/container-definitions';
24
23
  import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
25
24
  import { IQuorumClients } from '@fluidframework/protocol-definitions';
26
- import { IRequest } from '@fluidframework/core-interfaces';
27
- import { IResponse } from '@fluidframework/core-interfaces';
28
25
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
29
26
  import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
30
27
  import { ITelemetryContext } from '@fluidframework/runtime-definitions';
31
28
  import { ITelemetryLogger } from '@fluidframework/core-interfaces';
32
29
 
33
- // @public (undocumented)
30
+ // @alpha (undocumented)
34
31
  export interface IChannel extends IFluidLoadable {
35
32
  // (undocumented)
36
33
  readonly attributes: IChannelAttributes;
@@ -42,14 +39,14 @@ export interface IChannel extends IFluidLoadable {
42
39
  summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext): Promise<ISummaryTreeWithStats>;
43
40
  }
44
41
 
45
- // @public
42
+ // @alpha
46
43
  export interface IChannelAttributes {
47
44
  readonly packageVersion?: string;
48
45
  readonly snapshotFormatVersion: string;
49
46
  readonly type: string;
50
47
  }
51
48
 
52
- // @public
49
+ // @alpha
53
50
  export interface IChannelFactory {
54
51
  readonly attributes: IChannelAttributes;
55
52
  create(runtime: IFluidDataStoreRuntime, id: string): IChannel;
@@ -57,7 +54,7 @@ export interface IChannelFactory {
57
54
  readonly type: string;
58
55
  }
59
56
 
60
- // @public
57
+ // @alpha
61
58
  export interface IChannelServices {
62
59
  // (undocumented)
63
60
  deltaConnection: IDeltaConnection;
@@ -65,14 +62,14 @@ export interface IChannelServices {
65
62
  objectStorage: IChannelStorageService;
66
63
  }
67
64
 
68
- // @public
65
+ // @alpha
69
66
  export interface IChannelStorageService {
70
67
  contains(path: string): Promise<boolean>;
71
68
  list(path: string): Promise<string[]>;
72
69
  readBlob(path: string): Promise<ArrayBufferLike>;
73
70
  }
74
71
 
75
- // @public
72
+ // @alpha
76
73
  export interface IDeltaConnection {
77
74
  addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
78
75
  attach(handler: IDeltaHandler): void;
@@ -82,7 +79,7 @@ export interface IDeltaConnection {
82
79
  submit(messageContent: any, localOpMetadata: unknown): void;
83
80
  }
84
81
 
85
- // @public
82
+ // @alpha
86
83
  export interface IDeltaHandler {
87
84
  applyStashedOp(message: any): unknown;
88
85
  process: (message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) => void;
@@ -91,7 +88,7 @@ export interface IDeltaHandler {
91
88
  setConnectionState(connected: boolean): void;
92
89
  }
93
90
 
94
- // @public
91
+ // @alpha
95
92
  export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRuntimeEvents>, IDisposable, Partial<IProvideFluidDataStoreRegistry> {
96
93
  readonly attachState: AttachState;
97
94
  bindChannel(channel: IChannel): void;
@@ -115,16 +112,12 @@ export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRu
115
112
  readonly idCompressor?: IIdCompressor;
116
113
  // (undocumented)
117
114
  readonly IFluidHandleContext: IFluidHandleContext;
118
- // @deprecated (undocumented)
119
- readonly IFluidRouter: IFluidRouter;
120
115
  // (undocumented)
121
116
  readonly logger: ITelemetryLogger;
122
117
  // (undocumented)
123
118
  readonly objectsRoutingContext: IFluidHandleContext;
124
119
  // (undocumented)
125
120
  readonly options: ILoaderOptions;
126
- // @deprecated (undocumented)
127
- request(request: IRequest): Promise<IResponse>;
128
121
  // (undocumented)
129
122
  readonly rootRoutingContext: IFluidHandleContext;
130
123
  submitSignal(type: string, content: any, targetClientId?: string): void;
@@ -132,7 +125,7 @@ export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRu
132
125
  waitAttached(): Promise<void>;
133
126
  }
134
127
 
135
- // @public (undocumented)
128
+ // @alpha
136
129
  export interface IFluidDataStoreRuntimeEvents extends IEvent {
137
130
  // (undocumented)
138
131
  (event: "disconnected" | "dispose" | "attaching" | "attached", listener: () => void): any;
@@ -144,12 +137,21 @@ export interface IFluidDataStoreRuntimeEvents extends IEvent {
144
137
  (event: "connected", listener: (clientId: string) => void): any;
145
138
  }
146
139
 
147
- // @public
148
- export type Jsonable<T = any, TReplaced = void> = T extends undefined | null | boolean | number | string | TReplaced ? T : Extract<T, Function> extends never ? {
140
+ // @alpha (undocumented)
141
+ export interface Internal_InterfaceOfJsonableTypesWith<T> {
142
+ // (undocumented)
143
+ [index: string | number]: JsonableTypeWith<T>;
144
+ }
145
+
146
+ // @alpha
147
+ export type Jsonable<T, TReplaced = never> = boolean extends (T extends never ? true : false) ? JsonableTypeWith<TReplaced> : unknown extends T ? JsonableTypeWith<TReplaced> : T extends undefined | null | boolean | number | string | TReplaced ? T : Extract<T, Function> extends never ? T extends object ? T extends (infer U)[] ? Jsonable<U, TReplaced>[] : {
149
148
  [K in keyof T]: Extract<K, symbol> extends never ? Jsonable<T[K], TReplaced> : never;
150
- } : never;
149
+ } : never : never;
150
+
151
+ // @alpha
152
+ export type JsonableTypeWith<T> = undefined | null | boolean | number | string | T | Internal_InterfaceOfJsonableTypesWith<T> | ArrayLike<JsonableTypeWith<T>>;
151
153
 
152
- // @public
153
- export type Serializable<T = any> = Jsonable<T, IFluidHandle>;
154
+ // @alpha
155
+ export type Serializable<T> = Jsonable<T, IFluidHandle>;
154
156
 
155
157
  ```
package/dist/channel.d.ts CHANGED
@@ -7,6 +7,9 @@ import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions"
7
7
  import { IGarbageCollectionData, IExperimentalIncrementalSummaryContext, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
8
8
  import { IChannelAttributes } from "./storage";
9
9
  import { IFluidDataStoreRuntime } from "./dataStoreRuntime";
10
+ /**
11
+ * @alpha
12
+ */
10
13
  export interface IChannel extends IFluidLoadable {
11
14
  /**
12
15
  * A readonly identifier for the channel
@@ -92,6 +95,7 @@ export interface IChannel extends IFluidLoadable {
92
95
  }
93
96
  /**
94
97
  * Handler provided by shared data structure to process requests from the runtime.
98
+ * @alpha
95
99
  */
96
100
  export interface IDeltaHandler {
97
101
  /**
@@ -134,6 +138,7 @@ export interface IDeltaHandler {
134
138
  }
135
139
  /**
136
140
  * Interface to represent a connection to a delta notification stream.
141
+ * @alpha
137
142
  */
138
143
  export interface IDeltaConnection {
139
144
  connected: boolean;
@@ -164,6 +169,7 @@ export interface IDeltaConnection {
164
169
  }
165
170
  /**
166
171
  * Storage services to read the objects at a given path.
172
+ * @alpha
167
173
  */
168
174
  export interface IChannelStorageService {
169
175
  /**
@@ -181,6 +187,7 @@ export interface IChannelStorageService {
181
187
  }
182
188
  /**
183
189
  * Storage services to read the objects at a given path using the given delta connection.
190
+ * @alpha
184
191
  */
185
192
  export interface IChannelServices {
186
193
  deltaConnection: IDeltaConnection;
@@ -205,6 +212,7 @@ export interface IChannelServices {
205
212
  *
206
213
  * If a collaboration includes a {@link https://fluidframework.com/docs/data-structures/map/ | SharedMap},
207
214
  * the collaborating clients will need to have access to a factory that can produce the `SharedMap` object.
215
+ * @alpha
208
216
  */
209
217
  export interface IChannelFactory {
210
218
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACN,sBAAsB,EACtB,sCAAsC,EACtC,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,gBAAgB,CACf,QAAQ,CAAC,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE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AExC;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACH,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,iBAAiB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAC7C,OAAO,CAAC,QAAQ,CAAC,CAAC;IAErB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.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 { IFluidHandle, IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIGarbageCollectionData,\n\tIExperimentalIncrementalSummaryContext,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport { IChannelAttributes } from \"./storage\";\nimport { IFluidDataStoreRuntime } from \"./dataStoreRuntime\";\n\nexport interface IChannel extends IFluidLoadable {\n\t/**\n\t * A readonly identifier for the channel\n\t */\n\treadonly id: string;\n\n\treadonly attributes: IChannelAttributes;\n\n\t/**\n\t * Generates summary of the channel synchronously. It is called when an `attach message`\n\t * for a local channel is generated. In other words, when the channel is being attached\n\t * to make it visible to other clients.\n\t *\n\t * @remarks\n\t *\n\t * Note: Since the Attach Summary is generated for local channels when making them visible to\n\t * remote clients, they don't have any previous summaries to compare against. For this reason,\n\t * the attach summary cannot contain summary handles (paths to sub-trees or blobs).\n\t * It can, however, contain {@link @fluidframework/protocol-definitions#ISummaryAttachment}\n\t * (handles to blobs uploaded async via the blob manager).\n\t *\n\t * @param fullTree - A flag indicating whether the attempt should generate a full\n\t * summary tree without any handles for unchanged subtrees.\n\t *\n\t * Default: `false`\n\t *\n\t * @param trackState - An optimization for tracking state of objects across summaries. If the state\n\t * of an object did not change since last successful summary, an\n\t * {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used\n\t * instead of re-summarizing it. If this is `false`, the expectation is that you should never\n\t * send an `ISummaryHandle`, since you are not expected to track state.\n\t *\n\t * Note: The goal is to remove the trackState and automatically decided whether the\n\t * handles will be used or not: {@link https://github.com/microsoft/FluidFramework/issues/10455}\n\t *\n\t * Default: `false`\n\t *\n\t * @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.\n\t *\n\t * @returns A summary capturing the current state of the channel.\n\t */\n\tgetAttachSummary(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): ISummaryTreeWithStats;\n\n\t/**\n\t * Generates summary of the channel asynchronously.\n\t * This should not be called where the channel can be modified while summarization is in progress.\n\t *\n\t * @param fullTree - flag indicating whether the attempt should generate a full\n\t * summary tree without any handles for unchanged subtrees. It should only be set to true when generating\n\t * a summary from the entire container.\n\t *\n\t * Default: `false`\n\t *\n\t * @param trackState - An optimization for tracking state of objects across summaries. If the state\n\t * of an object did not change since last successful summary, an\n\t * {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used\n\t * instead of re-summarizing it. If this is `false`, the expectation is that you should never\n\t * send an `ISummaryHandle`, since you are not expected to track state.\n\t *\n\t * Default: `false`\n\t *\n\t * Note: The goal is to remove the trackState and automatically decided whether the\n\t * handles will be used or not: {@link https://github.com/microsoft/FluidFramework/issues/10455}\n\t *\n\t * @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.\n\t *\n\t * @returns A summary capturing the current state of the channel.\n\t */\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n\t): Promise<ISummaryTreeWithStats>;\n\n\t/**\n\t * Checks if the channel is attached to storage.\n\t * @returns True iff the channel is attached.\n\t */\n\tisAttached(): boolean;\n\n\t/**\n\t * Enables the channel to send and receive ops.\n\t * @param services - The services to connect to.\n\t */\n\tconnect(services: IChannelServices): void;\n\n\t/**\n\t * Returns the GC data for this channel. It contains a list of GC nodes that contains references to\n\t * other GC nodes.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): IGarbageCollectionData;\n}\n\n/**\n * Handler provided by shared data structure to process requests from the runtime.\n */\nexport interface IDeltaHandler {\n\t/**\n\t * Processes the op.\n\t * @param message - The message to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t */\n\tprocess: (message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) => void;\n\n\t/**\n\t * State change events to indicate changes to the delta connection\n\t * @param connected - true if connected, false otherwise\n\t */\n\tsetConnectionState(connected: boolean): void;\n\n\t/**\n\t * Called when the runtime asks the client to resubmit an op. This may be because the Container reconnected and\n\t * this op was not acked.\n\t * The client can choose to resubmit the same message, submit different / multiple messages or not submit anything\n\t * at all.\n\t * @param message - The original message that was submitted.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\treSubmit(message: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Apply changes from an op. Used when rehydrating an attached container\n\t * with pending changes. This prepares the SharedObject for seeing an ACK\n\t * for the op or resubmitting the op upon reconnection.\n\t * @param message - Contents of a stashed op.\n\t * @returns localMetadata of the op, to be passed to process() or resubmit()\n\t * when the op is ACKed or resubmitted, respectively\n\t */\n\tapplyStashedOp(message: any): unknown;\n\n\t/**\n\t * Revert a local op.\n\t * @param message - The original message that was submitted.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\trollback?(message: any, localOpMetadata: unknown): void;\n}\n\n/**\n * Interface to represent a connection to a delta notification stream.\n */\nexport interface IDeltaConnection {\n\tconnected: boolean;\n\n\t/**\n\t * Send new messages to the server.\n\t * @param messageContent - The content of the message to be sent.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally by the runtime\n\t * and not sent to the server. It will be provided back when this message is acknowledged by the server. It will\n\t * also be provided back when asked to resubmit the message.\n\t */\n\tsubmit(messageContent: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Attaches a message handler to the delta connection\n\t */\n\tattach(handler: IDeltaHandler): void;\n\n\t/**\n\t * Indicates that the channel is dirty and needs to be part of the summary. It is called by a SharedSummaryBlock\n\t * that needs to be part of the summary but does not generate ops.\n\t */\n\tdirty(): void;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t * @param srcHandle - The handle of the node that added the reference.\n\t * @param outboundHandle - The handle of the outbound node that is referenced.\n\t */\n\taddedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\n/**\n * Storage services to read the objects at a given path.\n */\nexport interface IChannelStorageService {\n\t/**\n\t * Reads the object contained at the given path. Returns a buffer representation for the object.\n\t */\n\treadBlob(path: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Determines if there is an object contained at the given path.\n\t */\n\tcontains(path: string): Promise<boolean>;\n\n\t/**\n\t * Lists the blobs that exist at a specific path.\n\t */\n\tlist(path: string): Promise<string[]>;\n}\n\n/**\n * Storage services to read the objects at a given path using the given delta connection.\n */\nexport interface IChannelServices {\n\tdeltaConnection: IDeltaConnection;\n\n\tobjectStorage: IChannelStorageService;\n}\n\n/**\n * Definitions of a channel factory.\n *\n * @remarks\n *\n * The runtime must be able to produce \"channels\" of the correct in-memory object type for the collaborative session.\n * Here \"channels\" are typically distributed data structures (DDSs).\n *\n * The runtime will consult with a registry of such factories during\n * {@link https://fluidframework.com/docs/build/containers/ | Container} load and when receiving \"attach\" operations\n * (ops), which indicate a new instance of a channel being introduced to the collaboration session, to produce the\n * appropriate in-memory object.\n *\n * Factories follow a common model but enable custom behavior.\n *\n * @example\n *\n * If a collaboration includes a {@link https://fluidframework.com/docs/data-structures/map/ | SharedMap},\n * the collaborating clients will need to have access to a factory that can produce the `SharedMap` object.\n */\nexport interface IChannelFactory {\n\t/**\n\t * String representing the type of the factory.\n\t */\n\treadonly type: string;\n\n\t/**\n\t * Attributes of the channel.\n\t */\n\treadonly attributes: IChannelAttributes;\n\n\t/**\n\t * Loads the given channel. This call is only ever invoked internally as the only thing\n\t * that is ever directly loaded is the document itself. Load will then only be called on documents that\n\t * were created and added to a channel.\n\t * @param runtime - Data store runtime containing state/info/helper methods about the data store.\n\t * @param id - ID of the channel.\n\t * @param services - Services to read objects at a given path using the delta connection.\n\t * @param channelAttributes - The attributes for the the channel to be loaded.\n\t * @returns The loaded object\n\t *\n\t * @privateRemarks\n\t * Thought: should the storage object include the version information and limit access to just files\n\t * for the given object? The latter seems good in general. But both are probably good things. We then just\n\t * need a way to allow the document to provide later storage for the object.\n\t */\n\tload(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tchannelAttributes: Readonly<IChannelAttributes>,\n\t): Promise<IChannel>;\n\n\t/**\n\t * Creates a local version of the channel.\n\t * Calling attach on the object later will insert it into the object stream.\n\t * @param runtime - The runtime the new object will be associated with\n\t * @param id - The unique ID of the new object\n\t * @returns The newly created object.\n\t *\n\t * @privateRemarks\n\t * NOTE here - When we attach we need to submit all the pending ops prior to actually doing the attach\n\t * for consistency.\n\t */\n\tcreate(runtime: IFluidDataStoreRuntime, id: string): IChannel;\n}\n"]}
1
+ {"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.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 { IFluidHandle, IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIGarbageCollectionData,\n\tIExperimentalIncrementalSummaryContext,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport { IChannelAttributes } from \"./storage\";\nimport { IFluidDataStoreRuntime } from \"./dataStoreRuntime\";\n\n/**\n * @alpha\n */\nexport interface IChannel extends IFluidLoadable {\n\t/**\n\t * A readonly identifier for the channel\n\t */\n\treadonly id: string;\n\n\treadonly attributes: IChannelAttributes;\n\n\t/**\n\t * Generates summary of the channel synchronously. It is called when an `attach message`\n\t * for a local channel is generated. In other words, when the channel is being attached\n\t * to make it visible to other clients.\n\t *\n\t * @remarks\n\t *\n\t * Note: Since the Attach Summary is generated for local channels when making them visible to\n\t * remote clients, they don't have any previous summaries to compare against. For this reason,\n\t * the attach summary cannot contain summary handles (paths to sub-trees or blobs).\n\t * It can, however, contain {@link @fluidframework/protocol-definitions#ISummaryAttachment}\n\t * (handles to blobs uploaded async via the blob manager).\n\t *\n\t * @param fullTree - A flag indicating whether the attempt should generate a full\n\t * summary tree without any handles for unchanged subtrees.\n\t *\n\t * Default: `false`\n\t *\n\t * @param trackState - An optimization for tracking state of objects across summaries. If the state\n\t * of an object did not change since last successful summary, an\n\t * {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used\n\t * instead of re-summarizing it. If this is `false`, the expectation is that you should never\n\t * send an `ISummaryHandle`, since you are not expected to track state.\n\t *\n\t * Note: The goal is to remove the trackState and automatically decided whether the\n\t * handles will be used or not: {@link https://github.com/microsoft/FluidFramework/issues/10455}\n\t *\n\t * Default: `false`\n\t *\n\t * @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.\n\t *\n\t * @returns A summary capturing the current state of the channel.\n\t */\n\tgetAttachSummary(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): ISummaryTreeWithStats;\n\n\t/**\n\t * Generates summary of the channel asynchronously.\n\t * This should not be called where the channel can be modified while summarization is in progress.\n\t *\n\t * @param fullTree - flag indicating whether the attempt should generate a full\n\t * summary tree without any handles for unchanged subtrees. It should only be set to true when generating\n\t * a summary from the entire container.\n\t *\n\t * Default: `false`\n\t *\n\t * @param trackState - An optimization for tracking state of objects across summaries. If the state\n\t * of an object did not change since last successful summary, an\n\t * {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used\n\t * instead of re-summarizing it. If this is `false`, the expectation is that you should never\n\t * send an `ISummaryHandle`, since you are not expected to track state.\n\t *\n\t * Default: `false`\n\t *\n\t * Note: The goal is to remove the trackState and automatically decided whether the\n\t * handles will be used or not: {@link https://github.com/microsoft/FluidFramework/issues/10455}\n\t *\n\t * @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.\n\t *\n\t * @returns A summary capturing the current state of the channel.\n\t */\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n\t): Promise<ISummaryTreeWithStats>;\n\n\t/**\n\t * Checks if the channel is attached to storage.\n\t * @returns True iff the channel is attached.\n\t */\n\tisAttached(): boolean;\n\n\t/**\n\t * Enables the channel to send and receive ops.\n\t * @param services - The services to connect to.\n\t */\n\tconnect(services: IChannelServices): void;\n\n\t/**\n\t * Returns the GC data for this channel. It contains a list of GC nodes that contains references to\n\t * other GC nodes.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): IGarbageCollectionData;\n}\n\n/**\n * Handler provided by shared data structure to process requests from the runtime.\n * @alpha\n */\nexport interface IDeltaHandler {\n\t/**\n\t * Processes the op.\n\t * @param message - The message to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t */\n\tprocess: (message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) => void;\n\n\t/**\n\t * State change events to indicate changes to the delta connection\n\t * @param connected - true if connected, false otherwise\n\t */\n\tsetConnectionState(connected: boolean): void;\n\n\t/**\n\t * Called when the runtime asks the client to resubmit an op. This may be because the Container reconnected and\n\t * this op was not acked.\n\t * The client can choose to resubmit the same message, submit different / multiple messages or not submit anything\n\t * at all.\n\t * @param message - The original message that was submitted.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\treSubmit(message: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Apply changes from an op. Used when rehydrating an attached container\n\t * with pending changes. This prepares the SharedObject for seeing an ACK\n\t * for the op or resubmitting the op upon reconnection.\n\t * @param message - Contents of a stashed op.\n\t * @returns localMetadata of the op, to be passed to process() or resubmit()\n\t * when the op is ACKed or resubmitted, respectively\n\t */\n\tapplyStashedOp(message: any): unknown;\n\n\t/**\n\t * Revert a local op.\n\t * @param message - The original message that was submitted.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\trollback?(message: any, localOpMetadata: unknown): void;\n}\n\n/**\n * Interface to represent a connection to a delta notification stream.\n * @alpha\n */\nexport interface IDeltaConnection {\n\tconnected: boolean;\n\n\t/**\n\t * Send new messages to the server.\n\t * @param messageContent - The content of the message to be sent.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally by the runtime\n\t * and not sent to the server. It will be provided back when this message is acknowledged by the server. It will\n\t * also be provided back when asked to resubmit the message.\n\t */\n\tsubmit(messageContent: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Attaches a message handler to the delta connection\n\t */\n\tattach(handler: IDeltaHandler): void;\n\n\t/**\n\t * Indicates that the channel is dirty and needs to be part of the summary. It is called by a SharedSummaryBlock\n\t * that needs to be part of the summary but does not generate ops.\n\t */\n\tdirty(): void;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t * @param srcHandle - The handle of the node that added the reference.\n\t * @param outboundHandle - The handle of the outbound node that is referenced.\n\t */\n\taddedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\n/**\n * Storage services to read the objects at a given path.\n * @alpha\n */\nexport interface IChannelStorageService {\n\t/**\n\t * Reads the object contained at the given path. Returns a buffer representation for the object.\n\t */\n\treadBlob(path: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Determines if there is an object contained at the given path.\n\t */\n\tcontains(path: string): Promise<boolean>;\n\n\t/**\n\t * Lists the blobs that exist at a specific path.\n\t */\n\tlist(path: string): Promise<string[]>;\n}\n\n/**\n * Storage services to read the objects at a given path using the given delta connection.\n * @alpha\n */\nexport interface IChannelServices {\n\tdeltaConnection: IDeltaConnection;\n\n\tobjectStorage: IChannelStorageService;\n}\n\n/**\n * Definitions of a channel factory.\n *\n * @remarks\n *\n * The runtime must be able to produce \"channels\" of the correct in-memory object type for the collaborative session.\n * Here \"channels\" are typically distributed data structures (DDSs).\n *\n * The runtime will consult with a registry of such factories during\n * {@link https://fluidframework.com/docs/build/containers/ | Container} load and when receiving \"attach\" operations\n * (ops), which indicate a new instance of a channel being introduced to the collaboration session, to produce the\n * appropriate in-memory object.\n *\n * Factories follow a common model but enable custom behavior.\n *\n * @example\n *\n * If a collaboration includes a {@link https://fluidframework.com/docs/data-structures/map/ | SharedMap},\n * the collaborating clients will need to have access to a factory that can produce the `SharedMap` object.\n * @alpha\n */\nexport interface IChannelFactory {\n\t/**\n\t * String representing the type of the factory.\n\t */\n\treadonly type: string;\n\n\t/**\n\t * Attributes of the channel.\n\t */\n\treadonly attributes: IChannelAttributes;\n\n\t/**\n\t * Loads the given channel. This call is only ever invoked internally as the only thing\n\t * that is ever directly loaded is the document itself. Load will then only be called on documents that\n\t * were created and added to a channel.\n\t * @param runtime - Data store runtime containing state/info/helper methods about the data store.\n\t * @param id - ID of the channel.\n\t * @param services - Services to read objects at a given path using the delta connection.\n\t * @param channelAttributes - The attributes for the the channel to be loaded.\n\t * @returns The loaded object\n\t *\n\t * @privateRemarks\n\t * Thought: should the storage object include the version information and limit access to just files\n\t * for the given object? The latter seems good in general. But both are probably good things. We then just\n\t * need a way to allow the document to provide later storage for the object.\n\t */\n\tload(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tchannelAttributes: Readonly<IChannelAttributes>,\n\t): Promise<IChannel>;\n\n\t/**\n\t * Creates a local version of the channel.\n\t * Calling attach on the object later will insert it into the object stream.\n\t * @param runtime - The runtime the new object will be associated with\n\t * @param id - The unique ID of the new object\n\t * @returns The newly created object.\n\t *\n\t * @privateRemarks\n\t * NOTE here - When we attach we need to submit all the pending ops prior to actually doing the attach\n\t * for consistency.\n\t */\n\tcreate(runtime: IFluidDataStoreRuntime, id: string): IChannel;\n}\n"]}
@@ -2,11 +2,16 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IEvent, IEventProvider, ITelemetryLogger, IDisposable, IFluidHandleContext, IFluidRouter, IFluidHandle, FluidObject, IRequest, IResponse } from "@fluidframework/core-interfaces";
5
+ import { IEvent, IEventProvider, ITelemetryLogger, IDisposable, IFluidHandleContext, IFluidHandle, FluidObject } from "@fluidframework/core-interfaces";
6
6
  import { IAudience, IDeltaManager, AttachState, ILoaderOptions } from "@fluidframework/container-definitions";
7
7
  import { IDocumentMessage, IQuorumClients, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
8
- import { IIdCompressor, IInboundSignalMessage, IProvideFluidDataStoreRegistry } from "@fluidframework/runtime-definitions";
8
+ import { IInboundSignalMessage, IProvideFluidDataStoreRegistry } from "@fluidframework/runtime-definitions";
9
+ import { IIdCompressor } from "@fluidframework/id-compressor";
9
10
  import { IChannel } from ".";
11
+ /**
12
+ * Events emitted by {@link IFluidDataStoreRuntime}.
13
+ * @alpha
14
+ */
10
15
  export interface IFluidDataStoreRuntimeEvents extends IEvent {
11
16
  (event: "disconnected" | "dispose" | "attaching" | "attached", listener: () => void): any;
12
17
  (event: "op", listener: (message: ISequencedDocumentMessage) => void): any;
@@ -15,6 +20,7 @@ export interface IFluidDataStoreRuntimeEvents extends IEvent {
15
20
  }
16
21
  /**
17
22
  * Represents the runtime for the data store. Contains helper functions/state of the data store.
23
+ * @alpha
18
24
  */
19
25
  export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRuntimeEvents>, IDisposable, Partial<IProvideFluidDataStoreRegistry> {
20
26
  readonly id: string;
@@ -85,13 +91,5 @@ export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRu
85
91
  * with it.
86
92
  */
87
93
  readonly entryPoint: IFluidHandle<FluidObject>;
88
- /**
89
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
90
- */
91
- request(request: IRequest): Promise<IResponse>;
92
- /**
93
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
94
- */
95
- readonly IFluidRouter: IFluidRouter;
96
94
  }
97
95
  //# sourceMappingURL=dataStoreRuntime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EAEnB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACN,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACN,aAAa,EACb,qBAAqB,EACrB,8BAA8B,EAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAE7B,MAAM,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AM,GAAG,SAAS,CAAC;IAEtC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAElC,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC;IAEtC;;OAEG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE1C;;;;;;;OAOG;IACH,wBAAwB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;IAElD;;;;OAIG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;IAE9D;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IAGrC;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC;IAEhG;;;;;OAKG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExE;;OAEG;IACH,SAAS,IAAI,cAAc,CAAC;IAE5B;;OAEG;IACH,WAAW,IAAI,SAAS,CAAC;IAEzB;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;CAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreRuntime.js","sourceRoot":"","sources":["../src/dataStoreRuntime.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 {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryLogger,\n\tIDisposable,\n\tIFluidHandleContext,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n\tIFluidHandle,\n\tFluidObject,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport {\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n\tIIdCompressor,\n\tIInboundSignalMessage,\n\tIProvideFluidDataStoreRegistry,\n} from \"@fluidframework/runtime-definitions\";\nimport { IChannel } from \".\";\n\nexport interface IFluidDataStoreRuntimeEvents extends IEvent {\n\t(event: \"disconnected\" | \"dispose\" | \"attaching\" | \"attached\", listener: () => void);\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\t(event: \"connected\", listener: (clientId: string) => void);\n}\n\n/**\n * Represents the runtime for the data store. Contains helper functions/state of the data store.\n */\nexport interface IFluidDataStoreRuntime\n\textends IEventProvider<IFluidDataStoreRuntimeEvents>,\n\t\tIDisposable,\n\t\tPartial<IProvideFluidDataStoreRegistry> {\n\treadonly id: string;\n\n\treadonly IFluidHandleContext: IFluidHandleContext;\n\n\treadonly rootRoutingContext: IFluidHandleContext;\n\treadonly channelsRoutingContext: IFluidHandleContext;\n\treadonly objectsRoutingContext: IFluidHandleContext;\n\n\treadonly options: ILoaderOptions;\n\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n\treadonly clientId: string | undefined;\n\n\treadonly connected: boolean;\n\n\treadonly logger: ITelemetryLogger;\n\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly idCompressor?: IIdCompressor;\n\n\t/**\n\t * Returns the channel with the given id\n\t */\n\tgetChannel(id: string): Promise<IChannel>;\n\n\t/**\n\t * Invokes the given callback and expects that no ops are submitted\n\t * until execution finishes. If an op is submitted, an error will be raised.\n\t *\n\t * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`\n\t *\n\t * @param callback - the callback to be invoked\n\t */\n\tensureNoDataModelChanges<T>(callback: () => T): T;\n\n\t/**\n\t * Creates a new channel of the given type.\n\t * @param id - ID of the channel to be created. A unique ID will be generated if left undefined.\n\t * @param type - Type of the channel.\n\t */\n\tcreateChannel(id: string | undefined, type: string): IChannel;\n\n\t/**\n\t * Bind the channel with the data store runtime. If the runtime\n\t * is attached then we attach the channel to make it live.\n\t */\n\tbindChannel(channel: IChannel): void;\n\n\t// Blob related calls\n\t/**\n\t * Api to upload a blob of data.\n\t * @param blob - blob to be uploaded.\n\t */\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal(type: string, content: any, targetClientId?: string): void;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Resolves when a local data store is attached.\n\t */\n\twaitAttached(): Promise<void>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\treadonly IFluidRouter: IFluidRouter;\n}\n"]}
1
+ {"version":3,"file":"dataStoreRuntime.js","sourceRoot":"","sources":["../src/dataStoreRuntime.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 {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryLogger,\n\tIDisposable,\n\tIFluidHandleContext,\n\tIFluidHandle,\n\tFluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport {\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n\tIInboundSignalMessage,\n\tIProvideFluidDataStoreRegistry,\n} from \"@fluidframework/runtime-definitions\";\nimport { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { IChannel } from \".\";\n\n/**\n * Events emitted by {@link IFluidDataStoreRuntime}.\n * @alpha\n */\nexport interface IFluidDataStoreRuntimeEvents extends IEvent {\n\t(event: \"disconnected\" | \"dispose\" | \"attaching\" | \"attached\", listener: () => void);\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\t(event: \"connected\", listener: (clientId: string) => void);\n}\n\n/**\n * Represents the runtime for the data store. Contains helper functions/state of the data store.\n * @alpha\n */\nexport interface IFluidDataStoreRuntime\n\textends IEventProvider<IFluidDataStoreRuntimeEvents>,\n\t\tIDisposable,\n\t\tPartial<IProvideFluidDataStoreRegistry> {\n\treadonly id: string;\n\n\treadonly IFluidHandleContext: IFluidHandleContext;\n\n\treadonly rootRoutingContext: IFluidHandleContext;\n\treadonly channelsRoutingContext: IFluidHandleContext;\n\treadonly objectsRoutingContext: IFluidHandleContext;\n\n\treadonly options: ILoaderOptions;\n\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n\treadonly clientId: string | undefined;\n\n\treadonly connected: boolean;\n\n\treadonly logger: ITelemetryLogger;\n\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly idCompressor?: IIdCompressor;\n\n\t/**\n\t * Returns the channel with the given id\n\t */\n\tgetChannel(id: string): Promise<IChannel>;\n\n\t/**\n\t * Invokes the given callback and expects that no ops are submitted\n\t * until execution finishes. If an op is submitted, an error will be raised.\n\t *\n\t * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`\n\t *\n\t * @param callback - the callback to be invoked\n\t */\n\tensureNoDataModelChanges<T>(callback: () => T): T;\n\n\t/**\n\t * Creates a new channel of the given type.\n\t * @param id - ID of the channel to be created. A unique ID will be generated if left undefined.\n\t * @param type - Type of the channel.\n\t */\n\tcreateChannel(id: string | undefined, type: string): IChannel;\n\n\t/**\n\t * Bind the channel with the data store runtime. If the runtime\n\t * is attached then we attach the channel to make it live.\n\t */\n\tbindChannel(channel: IChannel): void;\n\n\t// Blob related calls\n\t/**\n\t * Api to upload a blob of data.\n\t * @param blob - blob to be uploaded.\n\t */\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal(type: string, content: any, targetClientId?: string): void;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Resolves when a local data store is attached.\n\t */\n\twaitAttached(): Promise<void>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n}\n"]}