@fluidframework/container-definitions 2.0.0-dev.7.4.0.216897 → 2.0.0-dev.7.4.0.217212

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 (45) hide show
  1. package/api-report/container-definitions.api.md +35 -35
  2. package/dist/audience.d.ts +2 -2
  3. package/dist/audience.js.map +1 -1
  4. package/dist/container-definitions-alpha.d.ts +1125 -56
  5. package/dist/container-definitions-untrimmed.d.ts +39 -39
  6. package/dist/deltas.d.ts +7 -7
  7. package/dist/deltas.js.map +1 -1
  8. package/dist/error.d.ts +2 -2
  9. package/dist/error.js.map +1 -1
  10. package/dist/fluidModule.d.ts +1 -1
  11. package/dist/fluidModule.js.map +1 -1
  12. package/dist/fluidPackage.d.ts +7 -7
  13. package/dist/fluidPackage.js +1 -1
  14. package/dist/fluidPackage.js.map +1 -1
  15. package/dist/loader.d.ts +12 -12
  16. package/dist/loader.js.map +1 -1
  17. package/dist/runtime.d.ts +8 -8
  18. package/dist/runtime.js +2 -2
  19. package/dist/runtime.js.map +1 -1
  20. package/lib/audience.d.ts +2 -2
  21. package/lib/audience.js.map +1 -1
  22. package/lib/container-definitions-alpha.d.ts +1125 -56
  23. package/lib/container-definitions-untrimmed.d.ts +39 -39
  24. package/lib/deltas.d.ts +7 -7
  25. package/lib/deltas.js.map +1 -1
  26. package/lib/error.d.ts +2 -2
  27. package/lib/error.js.map +1 -1
  28. package/lib/fluidModule.d.ts +1 -1
  29. package/lib/fluidModule.js.map +1 -1
  30. package/lib/fluidPackage.d.ts +7 -7
  31. package/lib/fluidPackage.js +1 -1
  32. package/lib/fluidPackage.js.map +1 -1
  33. package/lib/loader.d.ts +12 -12
  34. package/lib/loader.js.map +1 -1
  35. package/lib/runtime.d.ts +8 -8
  36. package/lib/runtime.js +2 -2
  37. package/lib/runtime.js.map +1 -1
  38. package/package.json +3 -3
  39. package/src/audience.ts +2 -2
  40. package/src/deltas.ts +7 -7
  41. package/src/error.ts +2 -2
  42. package/src/fluidModule.ts +1 -1
  43. package/src/fluidPackage.ts +7 -7
  44. package/src/loader.ts +12 -12
  45. package/src/runtime.ts +8 -8
@@ -5,130 +5,1162 @@
5
5
  */
6
6
 
7
7
  import { EventEmitter } from 'events';
8
+ import { FluidObject } from '@fluidframework/core-interfaces';
9
+ import { IAnyDriverError } from '@fluidframework/driver-definitions';
8
10
  import { IClient } from '@fluidframework/protocol-definitions';
9
11
  import { IClientConfiguration } from '@fluidframework/protocol-definitions';
10
12
  import { IClientDetails } from '@fluidframework/protocol-definitions';
13
+ import { IDisposable } from '@fluidframework/core-interfaces';
11
14
  import { IDocumentMessage } from '@fluidframework/protocol-definitions';
15
+ import { IDocumentStorageService } from '@fluidframework/driver-definitions';
16
+ import { IErrorBase } from '@fluidframework/core-interfaces';
17
+ import { IErrorEvent } from '@fluidframework/core-interfaces';
18
+ import { IEvent } from '@fluidframework/core-interfaces';
19
+ import { IEventProvider } from '@fluidframework/core-interfaces';
20
+ import { IFluidRouter } from '@fluidframework/core-interfaces';
12
21
  import { IQuorumClients } from '@fluidframework/protocol-definitions';
22
+ import { IRequest } from '@fluidframework/core-interfaces';
23
+ import { IResolvedUrl } from '@fluidframework/driver-definitions';
24
+ import { IResponse } from '@fluidframework/core-interfaces';
13
25
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
14
26
  import { ISequencedProposal } from '@fluidframework/protocol-definitions';
15
27
  import { ISignalMessage } from '@fluidframework/protocol-definitions';
16
28
  import { ISnapshotTree } from '@fluidframework/protocol-definitions';
17
29
  import { ISummaryContent } from '@fluidframework/protocol-definitions';
18
30
  import { ISummaryTree } from '@fluidframework/protocol-definitions';
31
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
19
32
  import { ITokenClaims } from '@fluidframework/protocol-definitions';
20
33
  import { IVersion } from '@fluidframework/protocol-definitions';
21
34
  import { MessageType } from '@fluidframework/protocol-definitions';
22
35
 
23
- /* Excluded from this release type: AttachState */
36
+ /**
37
+ * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the
38
+ * service. The transition from detached to attached state is a one-way transition.
39
+ * @alpha
40
+ */
41
+ export declare enum AttachState {
42
+ /**
43
+ * In detached state, the data is only present on the local client's machine. It has not yet been uploaded
44
+ * to the service.
45
+ */
46
+ Detached = "Detached",
47
+ /**
48
+ * In attaching state, the data has started the upload to the service, but has not yet completed.
49
+ */
50
+ Attaching = "Attaching",
51
+ /**
52
+ * In attached state, the data has completed upload to the service. It can be accessed by other clients after
53
+ * reaching attached state.
54
+ */
55
+ Attached = "Attached"
56
+ }
57
+
58
+ /**
59
+ * Namespace for the different connection states a container can be in.
60
+ * PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression.
61
+ * @alpha
62
+ */
63
+ export declare namespace ConnectionState {
64
+ /**
65
+ * The container is not connected to the delta server.
66
+ * Note - When in this state the container may be about to reconnect,
67
+ * or may remain disconnected until explicitly told to connect.
68
+ * @alpha
69
+ */
70
+ export type Disconnected = 0;
71
+ /**
72
+ * The container is disconnected but actively trying to establish a new connection.
73
+ * PLEASE NOTE that this numerical value falls out of the order you may expect for this state.
74
+ * @alpha
75
+ */
76
+ export type EstablishingConnection = 3;
77
+ /**
78
+ * The container has an inbound connection only, and is catching up to the latest known state from the service.
79
+ * @alpha
80
+ */
81
+ export type CatchingUp = 1;
82
+ /**
83
+ * The container is fully connected and syncing.
84
+ * @alpha
85
+ */
86
+ export type Connected = 2;
87
+ }
24
88
 
25
- /* Excluded from this release type: ConnectionState */
89
+ /**
90
+ * Type defining the different states of connectivity a Container can be in.
91
+ * @alpha
92
+ */
93
+ export declare type ConnectionState = ConnectionState.Disconnected | ConnectionState.EstablishingConnection | ConnectionState.CatchingUp | ConnectionState.Connected;
26
94
 
27
95
  /* Excluded from this release type: ContainerErrorType */
28
96
 
29
97
  /* Excluded from this release type: ContainerErrorTypes */
30
98
 
31
- /* Excluded from this release type: ContainerWarning */
32
-
33
- /* Excluded from this release type: FluidObject */
34
-
35
- /* Excluded from this release type: IAnyDriverError */
99
+ /**
100
+ * Represents warnings raised on container.
101
+ * @alpha
102
+ */
103
+ export declare interface ContainerWarning extends IErrorBase {
104
+ /**
105
+ * Whether this error has already been logged. Used to avoid logging errors twice.
106
+ *
107
+ * @defaultValue `false`
108
+ */
109
+ logged?: boolean;
110
+ }
36
111
 
37
- /* Excluded from this release type: IAudience */
112
+ /**
113
+ * Audience represents all clients connected to the op stream, both read-only and read/write.
114
+ *
115
+ * See {@link https://nodejs.org/api/events.html#class-eventemitter | here} for an overview of the `EventEmitter`
116
+ * class.
117
+ * @alpha
118
+ */
119
+ export declare interface IAudience extends EventEmitter {
120
+ /**
121
+ * See {@link https://nodejs.dev/learn/the-nodejs-event-emitter | here} for an overview of `EventEmitter.on`.
122
+ */
123
+ on(event: "addMember" | "removeMember", listener: (clientId: string, client: IClient) => void): this;
124
+ /**
125
+ * List all clients connected to the op stream, keyed off their clientId
126
+ */
127
+ getMembers(): Map<string, IClient>;
128
+ /**
129
+ * Get details about the connected client with the specified clientId,
130
+ * or undefined if the specified client isn't connected
131
+ */
132
+ getMember(clientId: string): IClient | undefined;
133
+ }
38
134
 
39
- /* Excluded from this release type: IAudienceOwner */
135
+ /**
136
+ * Manages the state and the members for {@link IAudience}
137
+ * @alpha
138
+ */
139
+ export declare interface IAudienceOwner extends IAudience {
140
+ /**
141
+ * Adds a new client to the audience
142
+ */
143
+ addMember(clientId: string, details: IClient): void;
144
+ /**
145
+ * Removes a client from the audience. Only emits an event if a client is actually removed
146
+ * @returns if a client was removed from the audience
147
+ */
148
+ removeMember(clientId: string): boolean;
149
+ }
40
150
 
41
- /* Excluded from this release type: IBatchMessage */
151
+ /**
152
+ * Payload type for IContainerContext.submitBatchFn()
153
+ * @alpha
154
+ */
155
+ export declare interface IBatchMessage {
156
+ contents?: string;
157
+ metadata: Record<string, unknown> | undefined;
158
+ compression?: string;
159
+ referenceSequenceNumber?: number;
160
+ }
42
161
 
43
162
  /* Excluded from this release type: ICodeDetailsLoader */
44
163
 
45
- /* Excluded from this release type: IConnectionDetails */
164
+ /**
165
+ * Contract representing the result of a newly established connection to the server for syncing deltas.
166
+ * @alpha
167
+ */
168
+ export declare interface IConnectionDetails {
169
+ clientId: string;
170
+ claims: ITokenClaims;
171
+ serviceConfiguration: IClientConfiguration;
172
+ /**
173
+ * Last known sequence number to ordering service at the time of connection.
174
+ *
175
+ * @remarks
176
+ *
177
+ * It may lap actual last sequence number (quite a bit, if container is very active).
178
+ * But it's the best information for client to figure out how far it is behind, at least
179
+ * for "read" connections. "write" connections may use own "join" op to similar information,
180
+ * that is likely to be more up-to-date.
181
+ */
182
+ checkpointSequenceNumber: number | undefined;
183
+ }
46
184
 
47
- /* Excluded from this release type: IContainer */
185
+ /**
186
+ * The Host's view of a Container and its connection to storage
187
+ * @alpha
188
+ */
189
+ export declare interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {
190
+ /**
191
+ * The Delta Manager supporting the op stream for this Container
192
+ */
193
+ deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
194
+ /**
195
+ * The collection of write clients which were connected as of the current sequence number.
196
+ * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.
197
+ */
198
+ getQuorum(): IQuorumClients;
199
+ /**
200
+ * Represents the resolved url to the Container.
201
+ * Will be undefined only when the container is in the {@link AttachState.Detached | detatched} state.
202
+ */
203
+ resolvedUrl: IResolvedUrl | undefined;
204
+ /**
205
+ * Indicates the attachment state of the container to a host service.
206
+ */
207
+ readonly attachState: AttachState;
208
+ /**
209
+ * Get the code details that are currently specified for the container.
210
+ * @returns The current code details if any are specified, undefined if none are specified.
211
+ */
212
+ getSpecifiedCodeDetails(): IFluidCodeDetails | undefined;
213
+ /**
214
+ * Get the code details that were used to load the container.
215
+ * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet
216
+ * loaded.
217
+ */
218
+ getLoadedCodeDetails(): IFluidCodeDetails | undefined;
219
+ /**
220
+ * Returns true if the container has been closed and/or disposed, otherwise false.
221
+ */
222
+ readonly closed: boolean;
223
+ /**
224
+ * Returns true if the container has been disposed, otherwise false.
225
+ */
226
+ readonly disposed?: boolean;
227
+ /**
228
+ * Whether or not there are any local changes that have not been saved.
229
+ */
230
+ readonly isDirty: boolean;
231
+ /**
232
+ * Disposes the container. If not already closed, this acts as a closure and then disposes runtime resources.
233
+ * The container is not expected to be used anymore once it is disposed.
234
+ *
235
+ * @param error - If the container is being disposed due to error, this provides details about the error that
236
+ * resulted in disposing it.
237
+ */
238
+ dispose(error?: ICriticalContainerError): void;
239
+ /**
240
+ * Closes the container.
241
+ *
242
+ * @param error - If the container is being closed due to error, this provides details about the error that
243
+ * resulted in closing it.
244
+ */
245
+ close(error?: ICriticalContainerError): void;
246
+ /**
247
+ * Propose new code details that define the code to be loaded for this container's runtime.
248
+ *
249
+ * The returned promise will be true when the proposal is accepted, and false if the proposal is rejected.
250
+ */
251
+ proposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>;
252
+ /**
253
+ * Attaches the Container to the Container specified by the given Request.
254
+ *
255
+ * @privateRemarks
256
+ *
257
+ * TODO - in the case of failure options should give a retry policy.
258
+ * Or some continuation function that allows attachment to a secondary document.
259
+ */
260
+ attach(request: IRequest, attachProps?: {
261
+ deltaConnection?: "none" | "delayed";
262
+ }): Promise<void>;
263
+ /**
264
+ * Extract a snapshot of the container as long as it is in detached state. Calling this on an attached container
265
+ * is an error.
266
+ */
267
+ serialize(): string;
268
+ /**
269
+ * Get an absolute URL for a provided container-relative request URL.
270
+ * If the container is not attached, this will return undefined.
271
+ *
272
+ * @param relativeUrl - A container-relative request URL.
273
+ */
274
+ getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
275
+ /**
276
+ * @deprecated Requesting will not be supported in a future major release.
277
+ * Instead, access the objects in a Fluid Container using entryPoint, and then navigate from there using
278
+ * app-specific logic (e.g. retrieving handles from the entryPoint's DDSes, or a container's entryPoint object
279
+ * could implement a request paradigm itself)
280
+ *
281
+ * IMPORTANT: This overload is provided for back-compat where IContainer.request(\{ url: "/" \}) is already implemented and used.
282
+ * The functionality it can provide (if the Container implementation is built for it) is redundant with @see {@link IContainer.getEntryPoint}.
283
+ *
284
+ * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.
285
+ *
286
+ * @param request - Only requesting \{ url: "/" \} is supported, requesting arbitrary URLs is deprecated.
287
+ */
288
+ request(request: {
289
+ url: "/";
290
+ headers?: undefined;
291
+ }): Promise<IResponse>;
292
+ /**
293
+ * Issue a request against the container for a resource.
294
+ * @param request - The request to be issued against the container
295
+ *
296
+ * @deprecated Requesting an arbitrary URL with headers will not be supported in a future major release.
297
+ * Instead, access the objects in a Fluid Container using entryPoint, and then navigate from there using
298
+ * app-specific logic (e.g. retrieving handles from the entryPoint's DDSes, or a container's entryPoint object
299
+ * could implement a request paradigm itself)
300
+ *
301
+ * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.
302
+ */
303
+ request(request: IRequest): Promise<IResponse>;
304
+ /**
305
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
306
+ */
307
+ readonly IFluidRouter: IFluidRouter;
308
+ /**
309
+ * Provides the current state of the container's connection to the ordering service.
310
+ *
311
+ * @remarks Consumers can listen for state changes via the "connected" and "disconnected" events.
312
+ */
313
+ readonly connectionState: ConnectionState;
314
+ /**
315
+ * Attempts to connect the container to the delta stream and process ops.
316
+ *
317
+ * @remarks
318
+ *
319
+ * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Connected}, and the
320
+ * "connected" event will be fired if/when connection succeeds.
321
+ */
322
+ connect(): void;
323
+ /**
324
+ * Disconnects the container from the delta stream and stops processing ops.
325
+ *
326
+ * @remarks
327
+ *
328
+ * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Disconnected}, and the
329
+ * "disconnected" event will be fired when disconnection completes.
330
+ */
331
+ disconnect(): void;
332
+ /**
333
+ * The audience information for all clients currently associated with the document in the current session.
334
+ */
335
+ readonly audience: IAudience;
336
+ /**
337
+ * The server provided ID of the client.
338
+ *
339
+ * Set once {@link IContainer.connectionState} is {@link (ConnectionState:namespace).Connected},
340
+ * otherwise will be `undefined`.
341
+ */
342
+ readonly clientId?: string | undefined;
343
+ /**
344
+ * Tells if container is in read-only mode.
345
+ *
346
+ * @remarks
347
+ *
348
+ * Data stores should listen for "readonly" notifications and disallow user making changes to data stores.
349
+ * Readonly state can be because of no storage write permission,
350
+ * or due to host forcing readonly mode for container.
351
+ *
352
+ * We do not differentiate here between no write access to storage vs. host disallowing changes to container -
353
+ * in all cases container runtime and data stores should respect readonly state and not allow local changes.
354
+ *
355
+ * It is undefined if we have not yet established websocket connection
356
+ * and do not know if user has write access to a file.
357
+ */
358
+ readonly readOnlyInfo: ReadOnlyInfo;
359
+ /**
360
+ * Allows the host to have the container force to be in read-only mode
361
+ * @param readonly - Boolean that toggles if read-only policies will be enforced
362
+ */
363
+ forceReadonly?(readonly: boolean): any;
364
+ /**
365
+ * Exposes the entryPoint for the container.
366
+ * Use this as the primary way of getting access to the user-defined logic within the container.
367
+ */
368
+ getEntryPoint(): Promise<FluidObject | undefined>;
369
+ }
48
370
 
49
- /* Excluded from this release type: IContainerContext */
371
+ /**
372
+ * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the
373
+ * loader layer. It gets passed into the IRuntimeFactory.instantiateRuntime call. Only include members on this interface
374
+ * if you intend them to be consumed/called from the runtime layer.
375
+ * @alpha
376
+ */
377
+ export declare interface IContainerContext {
378
+ readonly options: ILoaderOptions;
379
+ readonly clientId: string | undefined;
380
+ readonly clientDetails: IClientDetails;
381
+ readonly storage: IDocumentStorageService;
382
+ readonly connected: boolean;
383
+ readonly baseSnapshot: ISnapshotTree | undefined;
384
+ /**
385
+ * @deprecated Please use submitBatchFn & submitSummaryFn
386
+ */
387
+ readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;
388
+ /**
389
+ * @returns clientSequenceNumber of last message in a batch
390
+ */
391
+ readonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;
392
+ readonly submitSummaryFn: (summaryOp: ISummaryContent, referenceSequenceNumber?: number) => number;
393
+ readonly submitSignalFn: (contents: any, targetClientId?: string) => void;
394
+ readonly disposeFn?: (error?: ICriticalContainerError) => void;
395
+ readonly closeFn: (error?: ICriticalContainerError) => void;
396
+ readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
397
+ readonly quorum: IQuorumClients;
398
+ /**
399
+ * @deprecated This method is provided as a migration tool for customers currently reading the code details
400
+ * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed
401
+ * from within the Container as this requires coupling between the container contents and the code loader.
402
+ * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this
403
+ * migration tool will be removed.
404
+ */
405
+ getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
406
+ readonly audience: IAudience | undefined;
407
+ readonly loader: ILoader;
408
+ readonly taggedLogger: ITelemetryBaseLogger;
409
+ pendingLocalState?: unknown;
410
+ /**
411
+ * Ambient services provided with the context
412
+ */
413
+ readonly scope: FluidObject;
414
+ /**
415
+ * Get an absolute url for a provided container-relative request.
416
+ * @param relativeUrl - A relative request within the container
417
+ *
418
+ * TODO: Optional for backwards compatibility. Make non-optional in version 0.19
419
+ */
420
+ getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;
421
+ /**
422
+ * Indicates the attachment state of the container to a host service.
423
+ */
424
+ readonly attachState: AttachState;
425
+ getLoadedFromVersion(): IVersion | undefined;
426
+ updateDirtyContainerState(dirty: boolean): void;
427
+ readonly supportedFeatures?: ReadonlyMap<string, unknown>;
428
+ /**
429
+ * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption
430
+ * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers
431
+ * and scenarios which can change in the future.
432
+ * @deprecated 2.0.0-internal.5.2.0 - The docId is already logged by the {@link IContainerContext.taggedLogger} for
433
+ * telemetry purposes, so this is generally unnecessary for telemetry.
434
+ * If the id is needed for other purposes it should be passed to the consumer explicitly.
435
+ *
436
+ * @privateremarks Tracking in AB#5714
437
+ */
438
+ readonly id: string;
439
+ }
50
440
 
51
- /* Excluded from this release type: IContainerEvents */
441
+ /**
442
+ * Events emitted by the {@link IContainer} "upwards" to the Loader and Host.
443
+ * @alpha
444
+ */
445
+ export declare interface IContainerEvents extends IEvent {
446
+ /**
447
+ * Emitted when the readonly state of the container changes.
448
+ *
449
+ * @remarks Listener parameters:
450
+ *
451
+ * - `readonly`: Whether or not the container is now in a readonly state.
452
+ *
453
+ * @see {@link IContainer.readOnlyInfo}
454
+ */
455
+ (event: "readonly", listener: (readonly: boolean) => void): void;
456
+ /**
457
+ * Emitted when the {@link IContainer} completes connecting to the Fluid service.
458
+ *
459
+ * @remarks Reflects connection state changes against the (delta) service acknowledging ops/edits.
460
+ *
461
+ * @see
462
+ *
463
+ * - {@link IContainer.connectionState}
464
+ *
465
+ * - {@link IContainer.connect}
466
+ */
467
+ (event: "connected", listener: (clientId: string) => void): any;
468
+ /**
469
+ * Fires when new container code details have been proposed, prior to acceptance.
470
+ *
471
+ * @remarks Listener parameters:
472
+ *
473
+ * - `codeDetails`: The code details being proposed.
474
+ *
475
+ * - `proposal`: NOT RECOMMENDED FOR USE.
476
+ *
477
+ * @see {@link IContainer.proposeCodeDetails}
478
+ */
479
+ (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any;
480
+ /**
481
+ * Emitted when the {@link IContainer} becomes disconnected from the Fluid service.
482
+ *
483
+ * @remarks Reflects connection state changes against the (delta) service acknowledging ops/edits.
484
+ *
485
+ * @see
486
+ *
487
+ * - {@link IContainer.connectionState}
488
+ *
489
+ * - {@link IContainer.disconnect}
490
+ */
491
+ (event: "disconnected", listener: () => void): any;
492
+ /**
493
+ * Emitted when a {@link AttachState.Detached | detached} container begins the process of
494
+ * {@link AttachState.Attaching | attached} to the Fluid service.
495
+ *
496
+ * @see
497
+ *
498
+ * - {@link IContainer.attachState}
499
+ *
500
+ * - {@link IContainer.attach}
501
+ */
502
+ (event: "attaching", listener: () => void): any;
503
+ /**
504
+ * Emitted when the {@link AttachState.Attaching | attaching} process is complete and the container is
505
+ * {@link AttachState.Attached | attached} to the Fluid service.
506
+ *
507
+ * @see
508
+ *
509
+ * - {@link IContainer.attachState}
510
+ *
511
+ * - {@link IContainer.attach}
512
+ */
513
+ (event: "attached", listener: () => void): any;
514
+ /**
515
+ * Emitted when the {@link IContainer} is closed, which permanently disables it.
516
+ *
517
+ * @remarks Listener parameters:
518
+ *
519
+ * - `error`: If the container was closed due to error, this will contain details about the error that caused it.
520
+ *
521
+ * @see {@link IContainer.close}
522
+ */
523
+ (event: "closed", listener: (error?: ICriticalContainerError) => void): any;
524
+ /**
525
+ * Emitted when the {@link IContainer} is disposed, which permanently disables it.
526
+ *
527
+ * @remarks Listener parameters:
528
+ *
529
+ * - `error`: If the container was disposed due to error, this will contain details about the error that caused it.
530
+ *
531
+ * @see {@link IContainer.dispose}
532
+ */
533
+ (event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
534
+ /**
535
+ * Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer.
536
+ *
537
+ * @remarks
538
+ *
539
+ * Note: this event is not intended for general use.
540
+ * The longer-term intention is to surface warnings more directly on the APIs that produce them.
541
+ * For now, use of this should be avoided when possible.
542
+ *
543
+ * Listener parameters:
544
+ *
545
+ * - `error`: The warning describing the encountered state.
546
+ */
547
+ (event: "warning", listener: (error: ContainerWarning) => void): any;
548
+ /**
549
+ * Emitted immediately after processing an incoming operation (op).
550
+ *
551
+ * @remarks
552
+ *
553
+ * Note: this event is not intended for general use.
554
+ * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the
555
+ * ops directly on the {@link IContainer}.
556
+ *
557
+ * Listener parameters:
558
+ *
559
+ * - `message`: The op that was processed.
560
+ */
561
+ (event: "op", listener: (message: ISequencedDocumentMessage) => void): any;
562
+ /**
563
+ * Emitted upon the first local change while the Container is in the "saved" state.
564
+ * That is, when {@link IContainer.isDirty} transitions from `true` to `false`.
565
+ *
566
+ * @remarks Listener parameters:
567
+ *
568
+ * - `dirty`: DEPRECATED. This parameter will be removed in a future release.
569
+ *
570
+ * @see {@link IContainer.isDirty}
571
+ */
572
+ (event: "dirty", listener: (dirty: boolean) => void): any;
573
+ /**
574
+ * Emitted when all local changes/edits have been acknowledged by the service.
575
+ * I.e., when {@link IContainer.isDirty} transitions from `false` to `true`.
576
+ *
577
+ * @remarks Listener parameters:
578
+ *
579
+ * - `dirty`: DEPRECATED. This parameter will be removed in a future release.
580
+ *
581
+ * @see {@link IContainer.isDirty}
582
+ */
583
+ (event: "saved", listener: (dirty: boolean) => void): any;
584
+ }
52
585
 
53
586
  /* Excluded from this release type: IContainerLoadMode */
54
587
 
55
- /* Excluded from this release type: ICriticalContainerError */
56
-
57
- /* Excluded from this release type: IDeltaManager */
58
-
59
- /* Excluded from this release type: IDeltaManagerEvents */
60
-
61
- /* Excluded from this release type: IDeltaQueue */
62
-
63
- /* Excluded from this release type: IDeltaQueueEvents */
64
-
65
- /* Excluded from this release type: IDeltaSender */
588
+ /**
589
+ * Represents errors raised on container.
590
+ *
591
+ * @see
592
+ *
593
+ * The following are commonly thrown error types, but `errorType` could be any string.
594
+ *
595
+ * - {@link @fluidframework/core-interfaces#ContainerErrorType}
596
+ *
597
+ * - {@link @fluidframework/driver-definitions#DriverErrorType}
598
+ *
599
+ * - {@link @fluidframework/odsp-driver-definitions#OdspErrorType}
600
+ *
601
+ * - {@link @fluidframework/routerlicious-driver#RouterliciousErrorType}
602
+ * @alpha
603
+ */
604
+ export declare type ICriticalContainerError = IErrorBase;
66
605
 
67
- /* Excluded from this release type: IDisposable */
606
+ /**
607
+ * Manages the transmission of ops between the runtime and storage.
608
+ * @alpha
609
+ */
610
+ export declare interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
611
+ /**
612
+ * The queue of inbound delta messages
613
+ */
614
+ readonly inbound: IDeltaQueue<T>;
615
+ /**
616
+ * The queue of outbound delta messages
617
+ */
618
+ readonly outbound: IDeltaQueue<U[]>;
619
+ /**
620
+ * The queue of inbound delta signals
621
+ */
622
+ readonly inboundSignal: IDeltaQueue<ISignalMessage>;
623
+ /**
624
+ * The current minimum sequence number
625
+ */
626
+ readonly minimumSequenceNumber: number;
627
+ /**
628
+ * The last sequence number processed by the delta manager
629
+ */
630
+ readonly lastSequenceNumber: number;
631
+ /**
632
+ * The last message processed by the delta manager
633
+ */
634
+ readonly lastMessage: ISequencedDocumentMessage | undefined;
635
+ /**
636
+ * The latest sequence number the delta manager is aware of
637
+ */
638
+ readonly lastKnownSeqNumber: number;
639
+ /**
640
+ * The initial sequence number set when attaching the op handler
641
+ */
642
+ readonly initialSequenceNumber: number;
643
+ /**
644
+ * Tells if current connection has checkpoint information.
645
+ * I.e. we know how far behind the client was at the time of establishing connection
646
+ */
647
+ readonly hasCheckpointSequenceNumber: boolean;
648
+ /**
649
+ * Details of client
650
+ */
651
+ readonly clientDetails: IClientDetails;
652
+ /**
653
+ * Protocol version being used to communicate with the service
654
+ */
655
+ readonly version: string;
656
+ /**
657
+ * Max message size allowed to the delta manager
658
+ */
659
+ readonly maxMessageSize: number;
660
+ /**
661
+ * Service configuration provided by the service.
662
+ */
663
+ readonly serviceConfiguration: IClientConfiguration | undefined;
664
+ /**
665
+ * Flag to indicate whether the client can write or not.
666
+ */
667
+ readonly active: boolean;
668
+ readonly readOnlyInfo: ReadOnlyInfo;
669
+ /**
670
+ * Submit a signal to the service to be broadcast to other connected clients, but not persisted
671
+ */
672
+ submitSignal(content: any, targetClientId?: string): void;
673
+ }
68
674
 
69
- /* Excluded from this release type: IDocumentStorageService */
675
+ /**
676
+ * Events emitted by {@link IDeltaManager}.
677
+ * @alpha
678
+ */
679
+ export declare interface IDeltaManagerEvents extends IEvent {
680
+ /**
681
+ * @deprecated No replacement API recommended.
682
+ */
683
+ (event: "prepareSend", listener: (messageBuffer: any[]) => void): any;
684
+ /**
685
+ * @deprecated No replacement API recommended.
686
+ */
687
+ (event: "submitOp", listener: (message: IDocumentMessage) => void): any;
688
+ /**
689
+ * Emitted immediately after processing an incoming operation (op).
690
+ *
691
+ * @remarks
692
+ *
693
+ * Note: this event is not intended for general use.
694
+ * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the
695
+ * ops directly on the {@link IDeltaManager}.
696
+ *
697
+ * Listener parameters:
698
+ *
699
+ * - `message`: The op that was processed.
700
+ *
701
+ * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.
702
+ */
703
+ (event: "op", listener: (message: ISequencedDocumentMessage, processingTime: number) => void): any;
704
+ /**
705
+ * Emitted periodically with latest information on network roundtrip latency
706
+ */
707
+ (event: "pong", listener: (latency: number) => void): any;
708
+ /**
709
+ * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.
710
+ *
711
+ * @remarks
712
+ * This occurs once we've received the connect_document_success message from the server,
713
+ * and happens prior to the client's join message (if there is a join message).
714
+ *
715
+ * Listener parameters:
716
+ *
717
+ * - `details`: Connection metadata.
718
+ *
719
+ * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.
720
+ * Will not be specified if an estimate cannot be determined.
721
+ */
722
+ (event: "connect", listener: (details: IConnectionDetails, opsBehind?: number) => void): any;
723
+ /**
724
+ * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.
725
+ *
726
+ * @remarks Listener parameters:
727
+ *
728
+ * - `reason`: Describes the reason for which the delta manager was disconnected.
729
+ * - `error` : error if any for the disconnect.
730
+ */
731
+ (event: "disconnect", listener: (reason: string, error?: IAnyDriverError) => void): any;
732
+ /**
733
+ * Emitted when read/write permissions change.
734
+ *
735
+ * @remarks Listener parameters:
736
+ *
737
+ * - `readonly`: Whether or not the delta manager is now read-only.
738
+ */
739
+ (event: "readonly", listener: (readonly: boolean, readonlyConnectionReason?: {
740
+ reason: string;
741
+ error?: IErrorBase;
742
+ }) => void): any;
743
+ }
70
744
 
71
- /* Excluded from this release type: IErrorBase */
745
+ /**
746
+ * Queue of ops to be sent to or processed from storage
747
+ * @alpha
748
+ */
749
+ export declare interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {
750
+ /**
751
+ * Flag indicating whether or not the queue was paused
752
+ */
753
+ paused: boolean;
754
+ /**
755
+ * The number of messages remaining in the queue
756
+ */
757
+ length: number;
758
+ /**
759
+ * Flag indicating whether or not the queue is idle.
760
+ * I.e. there are no remaining messages to processes.
761
+ */
762
+ idle: boolean;
763
+ /**
764
+ * Pauses processing on the queue.
765
+ *
766
+ * @returns A promise which resolves when processing has been paused.
767
+ */
768
+ pause(): Promise<void>;
769
+ /**
770
+ * Resumes processing on the queue
771
+ */
772
+ resume(): void;
773
+ /**
774
+ * Peeks at the next message in the queue
775
+ */
776
+ peek(): T | undefined;
777
+ /**
778
+ * Returns all the items in the queue as an array. Does not remove them from the queue.
779
+ */
780
+ toArray(): T[];
781
+ /**
782
+ * returns number of ops processed and time it took to process these ops.
783
+ * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)
784
+ */
785
+ waitTillProcessingDone(): Promise<{
786
+ count: number;
787
+ duration: number;
788
+ }>;
789
+ }
72
790
 
73
- /* Excluded from this release type: IErrorEvent */
791
+ /**
792
+ * Events emitted by {@link IDeltaQueue}.
793
+ * @alpha
794
+ */
795
+ export declare interface IDeltaQueueEvents<T> extends IErrorEvent {
796
+ /**
797
+ * Emitted when a task is enqueued.
798
+ *
799
+ * @remarks Listener parameters:
800
+ *
801
+ * - `task`: The task being enqueued.
802
+ */
803
+ (event: "push", listener: (task: T) => void): any;
804
+ /**
805
+ * Emitted immediately after processing an enqueued task and removing it from the queue.
806
+ *
807
+ * @remarks
808
+ *
809
+ * Note: this event is not intended for general use.
810
+ * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the
811
+ * ops directly on the {@link IDeltaQueue}.
812
+ *
813
+ * Listener parameters:
814
+ *
815
+ * - `task`: The task that was processed.
816
+ */
817
+ (event: "op", listener: (task: T) => void): any;
818
+ /**
819
+ * Emitted when the queue of tasks to process is emptied.
820
+ *
821
+ * @remarks Listener parameters:
822
+ *
823
+ * - `count`: The number of events (`T`) processed before becoming idle.
824
+ *
825
+ * - `duration`: The amount of time it took to process elements (in milliseconds).
826
+ *
827
+ * @see {@link IDeltaQueue.idle}
828
+ */
829
+ (event: "idle", listener: (count: number, duration: number) => void): any;
830
+ }
74
831
 
75
- /* Excluded from this release type: IEvent */
832
+ /**
833
+ * Contract supporting delivery of outbound messages to the server
834
+ * @alpha
835
+ */
836
+ export declare interface IDeltaSender {
837
+ /**
838
+ * Flush all pending messages through the outbound queue
839
+ */
840
+ flush(): void;
841
+ }
76
842
 
77
- /* Excluded from this release type: IEventProvider */
843
+ export { IErrorBase }
78
844
 
79
845
  /* Excluded from this release type: IFluidBrowserPackage */
80
846
 
81
847
  /* Excluded from this release type: IFluidBrowserPackageEnvironment */
82
848
 
83
- /* Excluded from this release type: IFluidCodeDetails */
849
+ /**
850
+ * Data structure used to describe the code to load on the Fluid document
851
+ * @alpha
852
+ */
853
+ export declare interface IFluidCodeDetails {
854
+ /**
855
+ * The code package to be used on the Fluid document. This is either the package name which will be loaded
856
+ * from a package manager. Or the expanded Fluid package.
857
+ */
858
+ readonly package: string | Readonly<IFluidPackage>;
859
+ /**
860
+ * Configuration details. This includes links to the package manager and base CDNs.
861
+ *
862
+ * @remarks This is strictly consumer-defined data.
863
+ * Its contents and semantics (including whether or not this data is present) are completely up to the consumer.
864
+ */
865
+ readonly config?: IFluidCodeDetailsConfig;
866
+ }
867
+
868
+ /**
869
+ * @alpha
870
+ */
871
+ export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
84
872
 
85
- /* Excluded from this release type: IFluidCodeDetailsComparer */
873
+ /**
874
+ * Provides capability to compare Fluid code details.
875
+ * @alpha
876
+ */
877
+ export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
878
+ /**
879
+ * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
880
+ *
881
+ * Similar semantics to:
882
+ * {@link https://github.com/npm/node-semver#usage}
883
+ */
884
+ satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
885
+ /**
886
+ * Return a number representing the ascending sort order of the `a` and `b` code details:
887
+ *
888
+ * - `< 0` if `a < b`.
889
+ *
890
+ * - `= 0` if `a === b`.
891
+ *
892
+ * - `> 0` if `a > b`.
893
+ *
894
+ * - `undefined` if `a` is not comparable to `b`.
895
+ *
896
+ * Similar semantics to:
897
+ * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}
898
+ */
899
+ compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
900
+ }
86
901
 
87
- /* Excluded from this release type: IFluidCodeDetailsConfig */
902
+ /**
903
+ * Package manager configuration. Provides a key value mapping of config values
904
+ * @alpha
905
+ */
906
+ export declare interface IFluidCodeDetailsConfig {
907
+ readonly [key: string]: string;
908
+ }
88
909
 
89
910
  /* Excluded from this release type: IFluidCodeResolver */
90
911
 
91
- /* Excluded from this release type: IFluidModule */
912
+ /**
913
+ * @alpha
914
+ */
915
+ export declare interface IFluidModule {
916
+ fluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
917
+ }
92
918
 
93
919
  /* Excluded from this release type: IFluidModuleWithDetails */
94
920
 
95
- /* Excluded from this release type: IFluidPackage */
96
-
97
- /* Excluded from this release type: IFluidPackageEnvironment */
921
+ /**
922
+ * Fluid-specific properties expected on a package to be loaded by the code loader.
923
+ * While compatible with the npm package format it is not necessary that that package is an
924
+ * npm package:
925
+ * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
926
+ * @alpha
927
+ */
928
+ export declare interface IFluidPackage {
929
+ /**
930
+ * The name of the package that this code represnets
931
+ */
932
+ name: string;
933
+ /**
934
+ * This object represents the Fluid specific properties of the package
935
+ */
936
+ fluid: {
937
+ /**
938
+ * The name of the of the environment. This should be something like browser, or node
939
+ * and contain the necessary targets for loading this code in that environment.
940
+ */
941
+ [environment: string]: undefined | IFluidPackageEnvironment;
942
+ };
943
+ /**
944
+ * General access for extended fields as specific usages will
945
+ * likely have additional infornamation like a definition of
946
+ * compatible versions, or deployment information like rings or rollouts.
947
+ */
948
+ [key: string]: unknown;
949
+ }
98
950
 
99
- /* Excluded from this release type: IFluidRouter */
951
+ /**
952
+ * Specifies an environment on Fluid property of a IFluidPackage.
953
+ * @alpha
954
+ */
955
+ export declare interface IFluidPackageEnvironment {
956
+ /**
957
+ * The name of the target. For a browser environment, this could be umd for scripts
958
+ * or css for styles.
959
+ */
960
+ [target: string]: undefined | {
961
+ /**
962
+ * List of files for the target. These can be relative or absolute.
963
+ * The code loader should resolve relative paths, and validate all
964
+ * full urls.
965
+ */
966
+ files: string[];
967
+ /**
968
+ * General access for extended fields as specific usages will
969
+ * likely have additional infornamation like a definition
970
+ * of Library, the entrypoint for umd packages.
971
+ */
972
+ [key: string]: unknown;
973
+ };
974
+ }
100
975
 
101
976
  /* Excluded from this release type: IGenericError */
102
977
 
103
- /* Excluded from this release type: IGetPendingLocalStateProps */
978
+ /**
979
+ * Defines list of properties expected for getPendingLocalState
980
+ * @alpha
981
+ */
982
+ export declare interface IGetPendingLocalStateProps {
983
+ /**
984
+ * Indicates the container will close after getting the pending state. Used internally
985
+ * to wait for blobs to be attached to a DDS and collect generated ops before closing.
986
+ */
987
+ readonly notifyImminentClosure: boolean;
988
+ /**
989
+ * Abort signal to stop waiting for blobs to get attached to a DDS. When triggered,
990
+ * only blobs attached will be collected in the pending state.
991
+ * Intended to be used in the very rare scenario in which getLocalPendingState go stale due
992
+ * to a blob failed to be referenced. Such a blob will be lost but the rest of the state will
993
+ * be preserved and collected.
994
+ */
995
+ readonly stopBlobAttachingSignal?: AbortSignal;
996
+ }
104
997
 
105
998
  /* Excluded from this release type: IHostLoader */
106
999
 
107
- /* Excluded from this release type: ILoader */
1000
+ /**
1001
+ * The Runtime's view of the Loader, used for loading Containers
1002
+ * @alpha
1003
+ */
1004
+ export declare interface ILoader extends Partial<IProvideLoader> {
1005
+ /**
1006
+ * Resolves the resource specified by the URL + headers contained in the request object
1007
+ * to the underlying container that will resolve the request.
1008
+ *
1009
+ * @remarks
1010
+ *
1011
+ * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes
1012
+ * a request against the server found from the resolve step.
1013
+ */
1014
+ resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;
1015
+ /**
1016
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the Container's IFluidRouter/request.
1017
+ */
1018
+ request(request: IRequest): Promise<IResponse>;
1019
+ /**
1020
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the Container's IFluidRouter/request.
1021
+ */
1022
+ readonly IFluidRouter: IFluidRouter;
1023
+ }
108
1024
 
109
1025
  /* Excluded from this release type: ILoaderHeader */
110
1026
 
111
- /* Excluded from this release type: ILoaderOptions */
1027
+ /**
1028
+ * @alpha
1029
+ */
1030
+ export declare type ILoaderOptions = {
1031
+ [key in string | number]: any;
1032
+ } & {
1033
+ /**
1034
+ * @deprecated This option has been deprecated and will be removed in a future release
1035
+ * Set caching behavior for the loader. If true, we will load a container from cache if one
1036
+ * with the same id/version exists or create a new container and cache it if it does not. If
1037
+ * false, always load a new container and don't cache it. If the container has already been
1038
+ * closed, it will not be cached. A cache option in the LoaderHeader for an individual
1039
+ * request will override the Loader's value.
1040
+ * Defaults to false.
1041
+ */
1042
+ cache?: boolean;
1043
+ /**
1044
+ * Provide the current Loader through the scope object when creating Containers. It is added
1045
+ * as the `ILoader` property, and will overwrite an existing property of the same name on the
1046
+ * scope. Useful for when the host wants to provide the current Loader's functionality to
1047
+ * individual Data Stores, which is typically expected when creating with a Loader.
1048
+ * Defaults to true.
1049
+ */
1050
+ provideScopeLoader?: boolean;
1051
+ /**
1052
+ * Max time (in ms) container will wait for a leave message of a disconnected client.
1053
+ */
1054
+ maxClientLeaveWaitTime?: number;
1055
+ };
112
1056
 
113
1057
  /* Excluded from this release type: IPendingLocalState */
114
1058
 
115
- /* Excluded from this release type: IProvideFluidCodeDetailsComparer */
116
-
117
- /* Excluded from this release type: IProvideLoader */
1059
+ /**
1060
+ * @alpha
1061
+ */
1062
+ export declare interface IProvideFluidCodeDetailsComparer {
1063
+ readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
1064
+ }
118
1065
 
119
- /* Excluded from this release type: IProvideRuntimeFactory */
1066
+ /**
1067
+ * @alpha
1068
+ */
1069
+ export declare interface IProvideLoader {
1070
+ readonly ILoader: ILoader;
1071
+ }
120
1072
 
121
- /* Excluded from this release type: IRequest */
1073
+ /**
1074
+ * @alpha
1075
+ */
1076
+ export declare interface IProvideRuntimeFactory {
1077
+ readonly IRuntimeFactory: IRuntimeFactory;
1078
+ }
122
1079
 
123
1080
  /* Excluded from this release type: IResolvedFluidCodeDetails */
124
1081
 
125
- /* Excluded from this release type: IResolvedUrl */
126
-
127
- /* Excluded from this release type: IResponse */
1082
+ /**
1083
+ * The IRuntime represents an instantiation of a code package within a Container.
1084
+ * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.
1085
+ * @alpha
1086
+ */
1087
+ export declare interface IRuntime extends IDisposable {
1088
+ /**
1089
+ * Executes a request against the runtime
1090
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
1091
+ */
1092
+ request(request: IRequest): Promise<IResponse>;
1093
+ /**
1094
+ * Notifies the runtime of a change in the connection state
1095
+ */
1096
+ setConnectionState(connected: boolean, clientId?: string): any;
1097
+ /**
1098
+ * Processes the given op (message)
1099
+ */
1100
+ process(message: ISequencedDocumentMessage, local: boolean): any;
1101
+ /**
1102
+ * Processes the given signal
1103
+ */
1104
+ processSignal(message: any, local: boolean): any;
1105
+ /**
1106
+ * Create a summary. Used when attaching or serializing a detached container.
1107
+ *
1108
+ * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported
1109
+ * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the
1110
+ * new storage IDs so requests can be redirected.
1111
+ */
1112
+ createSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;
1113
+ /**
1114
+ * Propagate the container state when container is attaching or attached.
1115
+ * @param attachState - State of the container.
1116
+ */
1117
+ setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
1118
+ /**
1119
+ * Get pending local state in a serializable format to be given back to a newly loaded container
1120
+ */
1121
+ getPendingLocalState(props?: IGetPendingLocalStateProps): unknown;
1122
+ /**
1123
+ * Notify runtime that container is moving to "Attaching" state
1124
+ * @param snapshot - snapshot created at attach time
1125
+ * @deprecated not necessary after op replay moved to Container
1126
+ */
1127
+ notifyAttaching(snapshot: ISnapshotTreeWithBlobContents): void;
1128
+ /**
1129
+ * Notify runtime that we have processed a saved message, so that it can do async work (applying
1130
+ * stashed ops) after having processed it.
1131
+ */
1132
+ notifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;
1133
+ /**
1134
+ * Exposes the entryPoint for the container runtime.
1135
+ * Use this as the primary way of getting access to the user-defined logic within the container runtime.
1136
+ *
1137
+ * @see {@link IContainer.getEntryPoint}
1138
+ */
1139
+ getEntryPoint(): Promise<FluidObject | undefined>;
1140
+ }
128
1141
 
129
- /* Excluded from this release type: IRuntime */
1142
+ /**
1143
+ * @alpha
1144
+ */
1145
+ export declare const IRuntimeFactory: keyof IProvideRuntimeFactory;
130
1146
 
131
- /* Excluded from this release type: IRuntimeFactory */
1147
+ /**
1148
+ * Exported module definition
1149
+ *
1150
+ * Provides the entry point for the ContainerContext to load the proper IRuntime
1151
+ * to start up the running instance of the Container.
1152
+ * @alpha
1153
+ */
1154
+ export declare interface IRuntimeFactory extends IProvideRuntimeFactory {
1155
+ /**
1156
+ * Instantiates a new IRuntime for the given IContainerContext to proxy to
1157
+ * This is the main entry point to the Container's business logic
1158
+ *
1159
+ * @param context - container context to be supplied to the runtime
1160
+ * @param existing - whether to instantiate for the first time or from an existing context
1161
+ */
1162
+ instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
1163
+ }
132
1164
 
133
1165
  /* Excluded from this release type: isFluidBrowserPackage */
134
1166
 
@@ -136,9 +1168,21 @@ import { MessageType } from '@fluidframework/protocol-definitions';
136
1168
 
137
1169
  /* Excluded from this release type: isFluidPackage */
138
1170
 
139
- /* Excluded from this release type: ISnapshotTreeWithBlobContents */
140
-
141
- /* Excluded from this release type: ITelemetryBaseLogger */
1171
+ /**
1172
+ * This is used when we rehydrate a container from the snapshot. Here we put the blob contents
1173
+ * in separate property: {@link ISnapshotTreeWithBlobContents.blobsContents}.
1174
+ *
1175
+ * @remarks This is used as the `ContainerContext`'s base snapshot when attaching.
1176
+ * @alpha
1177
+ */
1178
+ export declare interface ISnapshotTreeWithBlobContents extends ISnapshotTree {
1179
+ blobsContents: {
1180
+ [path: string]: ArrayBufferLike;
1181
+ };
1182
+ trees: {
1183
+ [path: string]: ISnapshotTreeWithBlobContents;
1184
+ };
1185
+ }
142
1186
 
143
1187
  /* Excluded from this release type: IThrottlingWarning */
144
1188
 
@@ -146,6 +1190,31 @@ import { MessageType } from '@fluidframework/protocol-definitions';
146
1190
 
147
1191
  /* Excluded from this release type: LoaderHeader */
148
1192
 
149
- /* Excluded from this release type: ReadOnlyInfo */
1193
+ /**
1194
+ * @alpha
1195
+ */
1196
+ export declare type ReadOnlyInfo = {
1197
+ readonly readonly: false | undefined;
1198
+ } | {
1199
+ readonly readonly: true;
1200
+ /**
1201
+ * Read-only because `forceReadOnly()` was called.
1202
+ */
1203
+ readonly forced: boolean;
1204
+ /**
1205
+ * Read-only because client does not have write permissions for document.
1206
+ */
1207
+ readonly permissions: boolean | undefined;
1208
+ /**
1209
+ * Read-only with no delta stream connection.
1210
+ */
1211
+ readonly storageOnly: boolean;
1212
+ /**
1213
+ * Extra info on why connection to delta stream is not possible.
1214
+ *
1215
+ * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.
1216
+ */
1217
+ readonly storageOnlyReason?: string;
1218
+ };
150
1219
 
151
1220
  export { }