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

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