@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,1469 +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
- /**
424
- * Allows the host to have the container force to be in read-only mode
425
- * @param readonly - Boolean that toggles if read-only policies will be enforced
426
- * @alpha
427
- */
428
- forceReadonly?(readonly: boolean): any;
429
- /**
430
- * Exposes the entryPoint for the container.
431
- * Use this as the primary way of getting access to the user-defined logic within the container.
432
- */
433
- getEntryPoint(): Promise<FluidObject | undefined>;
434
- }
47
+ /* Excluded from this release type: IContainer */
435
48
 
436
- /**
437
- * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the
438
- * loader layer. It gets passed into the IRuntimeFactory.instantiateRuntime call. Only include members on this interface
439
- * if you intend them to be consumed/called from the runtime layer.
440
- * @public
441
- */
442
- export declare interface IContainerContext {
443
- readonly options: ILoaderOptions;
444
- readonly clientId: string | undefined;
445
- readonly clientDetails: IClientDetails;
446
- readonly storage: IDocumentStorageService;
447
- readonly connected: boolean;
448
- readonly baseSnapshot: ISnapshotTree | undefined;
449
- /**
450
- * @deprecated Please use submitBatchFn & submitSummaryFn
451
- */
452
- readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;
453
- /**
454
- * @returns clientSequenceNumber of last message in a batch
455
- */
456
- readonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;
457
- readonly submitSummaryFn: (summaryOp: ISummaryContent, referenceSequenceNumber?: number) => number;
458
- readonly submitSignalFn: (contents: any, targetClientId?: string) => void;
459
- readonly disposeFn?: (error?: ICriticalContainerError) => void;
460
- readonly closeFn: (error?: ICriticalContainerError) => void;
461
- readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
462
- readonly quorum: IQuorumClients;
463
- /**
464
- * @deprecated This method is provided as a migration tool for customers currently reading the code details
465
- * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed
466
- * from within the Container as this requires coupling between the container contents and the code loader.
467
- * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this
468
- * migration tool will be removed.
469
- */
470
- getSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;
471
- readonly audience: IAudience | undefined;
472
- readonly loader: ILoader;
473
- readonly taggedLogger: ITelemetryBaseLogger;
474
- pendingLocalState?: unknown;
475
- /**
476
- * Ambient services provided with the context
477
- */
478
- readonly scope: FluidObject;
479
- /**
480
- * Get an absolute url for a provided container-relative request.
481
- * @param relativeUrl - A relative request within the container
482
- *
483
- * TODO: Optional for backwards compatibility. Make non-optional in version 0.19
484
- */
485
- getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;
486
- /**
487
- * Indicates the attachment state of the container to a host service.
488
- */
489
- readonly attachState: AttachState;
490
- getLoadedFromVersion(): IVersion | undefined;
491
- updateDirtyContainerState(dirty: boolean): void;
492
- readonly supportedFeatures?: ReadonlyMap<string, unknown>;
493
- /**
494
- * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption
495
- * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers
496
- * and scenarios which can change in the future.
497
- * @deprecated 2.0.0-internal.5.2.0 - The docId is already logged by the {@link IContainerContext.taggedLogger} for
498
- * telemetry purposes, so this is generally unnecessary for telemetry.
499
- * If the id is needed for other purposes it should be passed to the consumer explicitly.
500
- *
501
- * @privateremarks Tracking in AB#5714
502
- */
503
- readonly id: string;
504
- }
49
+ /* Excluded from this release type: IContainerContext */
505
50
 
506
- /**
507
- * Events emitted by the {@link IContainer} "upwards" to the Loader and Host.
508
- * @public
509
- */
510
- export declare interface IContainerEvents extends IEvent {
511
- /**
512
- * Emitted when the readonly state of the container changes.
513
- *
514
- * @remarks Listener parameters:
515
- *
516
- * - `readonly`: Whether or not the container is now in a readonly state.
517
- *
518
- * @see {@link IContainer.readOnlyInfo}
519
- */
520
- (event: "readonly", listener: (readonly: boolean) => void): void;
521
- /**
522
- * Emitted when the {@link IContainer} completes connecting to the Fluid service.
523
- *
524
- * @remarks Reflects connection state changes against the (delta) service acknowledging ops/edits.
525
- *
526
- * @see
527
- *
528
- * - {@link IContainer.connectionState}
529
- *
530
- * - {@link IContainer.connect}
531
- */
532
- (event: "connected", listener: (clientId: string) => void): any;
533
- /**
534
- * Fires when new container code details have been proposed, prior to acceptance.
535
- *
536
- * @remarks Listener parameters:
537
- *
538
- * - `codeDetails`: The code details being proposed.
539
- *
540
- * - `proposal`: NOT RECOMMENDED FOR USE.
541
- *
542
- * @see {@link IContainer.proposeCodeDetails}
543
- */
544
- (event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any;
545
- /**
546
- * Emitted when the {@link IContainer} becomes disconnected from the Fluid service.
547
- *
548
- * @remarks Reflects connection state changes against the (delta) service acknowledging ops/edits.
549
- *
550
- * @see
551
- *
552
- * - {@link IContainer.connectionState}
553
- *
554
- * - {@link IContainer.disconnect}
555
- */
556
- (event: "disconnected", listener: () => void): any;
557
- /**
558
- * Emitted when a {@link AttachState.Detached | detached} container begins the process of
559
- * {@link AttachState.Attaching | attached} to the Fluid service.
560
- *
561
- * @see
562
- *
563
- * - {@link IContainer.attachState}
564
- *
565
- * - {@link IContainer.attach}
566
- */
567
- (event: "attaching", listener: () => void): any;
568
- /**
569
- * Emitted when the {@link AttachState.Attaching | attaching} process is complete and the container is
570
- * {@link AttachState.Attached | attached} to the Fluid service.
571
- *
572
- * @see
573
- *
574
- * - {@link IContainer.attachState}
575
- *
576
- * - {@link IContainer.attach}
577
- */
578
- (event: "attached", listener: () => void): any;
579
- /**
580
- * Emitted when the {@link IContainer} is closed, which permanently disables it.
581
- *
582
- * @remarks Listener parameters:
583
- *
584
- * - `error`: If the container was closed due to error, this will contain details about the error that caused it.
585
- *
586
- * @see {@link IContainer.close}
587
- */
588
- (event: "closed", listener: (error?: ICriticalContainerError) => void): any;
589
- /**
590
- * Emitted when the {@link IContainer} is disposed, which permanently disables it.
591
- *
592
- * @remarks Listener parameters:
593
- *
594
- * - `error`: If the container was disposed due to error, this will contain details about the error that caused it.
595
- *
596
- * @see {@link IContainer.dispose}
597
- */
598
- (event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
599
- /**
600
- * Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer.
601
- *
602
- * @remarks
603
- *
604
- * Note: this event is not intended for general use.
605
- * The longer-term intention is to surface warnings more directly on the APIs that produce them.
606
- * For now, use of this should be avoided when possible.
607
- *
608
- * Listener parameters:
609
- *
610
- * - `error`: The warning describing the encountered state.
611
- */
612
- (event: "warning", listener: (error: ContainerWarning) => void): any;
613
- /**
614
- * Emitted immediately after processing an incoming operation (op).
615
- *
616
- * @remarks
617
- *
618
- * Note: this event is not intended for general use.
619
- * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the
620
- * ops directly on the {@link IContainer}.
621
- *
622
- * Listener parameters:
623
- *
624
- * - `message`: The op that was processed.
625
- */
626
- (event: "op", listener: (message: ISequencedDocumentMessage) => void): any;
627
- /**
628
- * Emitted upon the first local change while the Container is in the "saved" state.
629
- * That is, when {@link IContainer.isDirty} transitions from `true` to `false`.
630
- *
631
- * @remarks Listener parameters:
632
- *
633
- * - `dirty`: DEPRECATED. This parameter will be removed in a future release.
634
- *
635
- * @see {@link IContainer.isDirty}
636
- */
637
- (event: "dirty", listener: (dirty: boolean) => void): any;
638
- /**
639
- * Emitted when all local changes/edits have been acknowledged by the service.
640
- * I.e., when {@link IContainer.isDirty} transitions from `false` to `true`.
641
- *
642
- * @remarks Listener parameters:
643
- *
644
- * - `dirty`: DEPRECATED. This parameter will be removed in a future release.
645
- *
646
- * @see {@link IContainer.isDirty}
647
- */
648
- (event: "saved", listener: (dirty: boolean) => void): any;
649
- }
51
+ /* Excluded from this release type: IContainerEvents */
650
52
 
651
- /**
652
- * @public
653
- */
654
- export declare interface IContainerLoadMode {
655
- opsBeforeReturn?: undefined | "sequenceNumber" | "cached" | "all";
656
- deltaConnection?: "none" | "delayed" | undefined;
657
- /**
658
- * If set to true, will indefinitely pause all incoming and outgoing after the container is loaded.
659
- */
660
- pauseAfterLoad?: boolean;
661
- }
53
+ /* Excluded from this release type: IContainerLoadMode */
662
54
 
663
- /**
664
- * Represents errors raised on container.
665
- *
666
- * @see
667
- *
668
- * The following are commonly thrown error types, but `errorType` could be any string.
669
- *
670
- * - {@link @fluidframework/core-interfaces#ContainerErrorType}
671
- *
672
- * - {@link @fluidframework/driver-definitions#DriverErrorType}
673
- *
674
- * - {@link @fluidframework/odsp-driver-definitions#OdspErrorType}
675
- *
676
- * - {@link @fluidframework/routerlicious-driver#RouterliciousErrorType}
677
- *
678
- * @public
679
- */
680
- export declare type ICriticalContainerError = IErrorBase;
55
+ /* Excluded from this release type: ICriticalContainerError */
681
56
 
682
- /**
683
- * Manages the transmission of ops between the runtime and storage.
684
- * @public
685
- */
686
- export declare interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
687
- /**
688
- * The queue of inbound delta messages
689
- */
690
- readonly inbound: IDeltaQueue<T>;
691
- /**
692
- * The queue of outbound delta messages
693
- */
694
- readonly outbound: IDeltaQueue<U[]>;
695
- /**
696
- * The queue of inbound delta signals
697
- */
698
- readonly inboundSignal: IDeltaQueue<ISignalMessage>;
699
- /**
700
- * The current minimum sequence number
701
- */
702
- readonly minimumSequenceNumber: number;
703
- /**
704
- * The last sequence number processed by the delta manager
705
- */
706
- readonly lastSequenceNumber: number;
707
- /**
708
- * The last message processed by the delta manager
709
- */
710
- readonly lastMessage: ISequencedDocumentMessage | undefined;
711
- /**
712
- * The latest sequence number the delta manager is aware of
713
- */
714
- readonly lastKnownSeqNumber: number;
715
- /**
716
- * The initial sequence number set when attaching the op handler
717
- */
718
- readonly initialSequenceNumber: number;
719
- /**
720
- * Tells if current connection has checkpoint information.
721
- * I.e. we know how far behind the client was at the time of establishing connection
722
- */
723
- readonly hasCheckpointSequenceNumber: boolean;
724
- /**
725
- * Details of client
726
- */
727
- readonly clientDetails: IClientDetails;
728
- /**
729
- * Protocol version being used to communicate with the service
730
- */
731
- readonly version: string;
732
- /**
733
- * Max message size allowed to the delta manager
734
- */
735
- readonly maxMessageSize: number;
736
- /**
737
- * Service configuration provided by the service.
738
- */
739
- readonly serviceConfiguration: IClientConfiguration | undefined;
740
- /**
741
- * Flag to indicate whether the client can write or not.
742
- */
743
- readonly active: boolean;
744
- readonly readOnlyInfo: ReadOnlyInfo;
745
- /**
746
- * Submit a signal to the service to be broadcast to other connected clients, but not persisted
747
- */
748
- submitSignal(content: any, targetClientId?: string): void;
749
- }
57
+ /* Excluded from this release type: IDeltaManager */
750
58
 
751
- /**
752
- * Events emitted by {@link IDeltaManager}.
753
- * @public
754
- */
755
- export declare interface IDeltaManagerEvents extends IEvent {
756
- /**
757
- * @deprecated No replacement API recommended.
758
- */
759
- (event: "prepareSend", listener: (messageBuffer: any[]) => void): any;
760
- /**
761
- * @deprecated No replacement API recommended.
762
- */
763
- (event: "submitOp", listener: (message: IDocumentMessage) => void): any;
764
- /**
765
- * Emitted immediately after processing an incoming operation (op).
766
- *
767
- * @remarks
768
- *
769
- * Note: this event is not intended for general use.
770
- * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the
771
- * ops directly on the {@link IDeltaManager}.
772
- *
773
- * Listener parameters:
774
- *
775
- * - `message`: The op that was processed.
776
- *
777
- * - `processingTime`: The amount of time it took to process the inbound operation (op), expressed in milliseconds.
778
- */
779
- (event: "op", listener: (message: ISequencedDocumentMessage, processingTime: number) => void): any;
780
- /**
781
- * Emitted periodically with latest information on network roundtrip latency
782
- */
783
- (event: "pong", listener: (latency: number) => void): any;
784
- /**
785
- * Emitted when the {@link IDeltaManager} completes connecting to the Fluid service.
786
- *
787
- * @remarks
788
- * This occurs once we've received the connect_document_success message from the server,
789
- * and happens prior to the client's join message (if there is a join message).
790
- *
791
- * Listener parameters:
792
- *
793
- * - `details`: Connection metadata.
794
- *
795
- * - `opsBehind`: An estimate of far behind the client is relative to the service in terms of ops.
796
- * Will not be specified if an estimate cannot be determined.
797
- */
798
- (event: "connect", listener: (details: IConnectionDetails, opsBehind?: number) => void): any;
799
- /**
800
- * Emitted when the {@link IDeltaManager} becomes disconnected from the Fluid service.
801
- *
802
- * @remarks Listener parameters:
803
- *
804
- * - `reason`: Describes the reason for which the delta manager was disconnected.
805
- * - `error` : error if any for the disconnect.
806
- */
807
- (event: "disconnect", listener: (reason: string, error?: IAnyDriverError) => void): any;
808
- /**
809
- * Emitted when read/write permissions change.
810
- *
811
- * @remarks Listener parameters:
812
- *
813
- * - `readonly`: Whether or not the delta manager is now read-only.
814
- */
815
- (event: "readonly", listener: (readonly: boolean, readonlyConnectionReason?: {
816
- reason: string;
817
- error?: IErrorBase;
818
- }) => void): any;
819
- }
59
+ /* Excluded from this release type: IDeltaManagerEvents */
820
60
 
821
- /**
822
- * Queue of ops to be sent to or processed from storage
823
- * @public
824
- */
825
- export declare interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {
826
- /**
827
- * Flag indicating whether or not the queue was paused
828
- */
829
- paused: boolean;
830
- /**
831
- * The number of messages remaining in the queue
832
- */
833
- length: number;
834
- /**
835
- * Flag indicating whether or not the queue is idle.
836
- * I.e. there are no remaining messages to processes.
837
- */
838
- idle: boolean;
839
- /**
840
- * Pauses processing on the queue.
841
- *
842
- * @returns A promise which resolves when processing has been paused.
843
- */
844
- pause(): Promise<void>;
845
- /**
846
- * Resumes processing on the queue
847
- */
848
- resume(): void;
849
- /**
850
- * Peeks at the next message in the queue
851
- */
852
- peek(): T | undefined;
853
- /**
854
- * Returns all the items in the queue as an array. Does not remove them from the queue.
855
- */
856
- toArray(): T[];
857
- /**
858
- * returns number of ops processed and time it took to process these ops.
859
- * Zeros if queue did not process anything (had no messages, was paused or had hit an error before)
860
- */
861
- waitTillProcessingDone(): Promise<{
862
- count: number;
863
- duration: number;
864
- }>;
865
- }
61
+ /* Excluded from this release type: IDeltaQueue */
866
62
 
867
- /**
868
- * Events emitted by {@link IDeltaQueue}.
869
- * @public
870
- */
871
- export declare interface IDeltaQueueEvents<T> extends IErrorEvent {
872
- /**
873
- * Emitted when a task is enqueued.
874
- *
875
- * @remarks Listener parameters:
876
- *
877
- * - `task`: The task being enqueued.
878
- */
879
- (event: "push", listener: (task: T) => void): any;
880
- /**
881
- * Emitted immediately after processing an enqueued task and removing it from the queue.
882
- *
883
- * @remarks
884
- *
885
- * Note: this event is not intended for general use.
886
- * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the
887
- * ops directly on the {@link IDeltaQueue}.
888
- *
889
- * Listener parameters:
890
- *
891
- * - `task`: The task that was processed.
892
- */
893
- (event: "op", listener: (task: T) => void): any;
894
- /**
895
- * Emitted when the queue of tasks to process is emptied.
896
- *
897
- * @remarks Listener parameters:
898
- *
899
- * - `count`: The number of events (`T`) processed before becoming idle.
900
- *
901
- * - `duration`: The amount of time it took to process elements (in milliseconds).
902
- *
903
- * @see {@link IDeltaQueue.idle}
904
- */
905
- (event: "idle", listener: (count: number, duration: number) => void): any;
906
- }
63
+ /* Excluded from this release type: IDeltaQueueEvents */
907
64
 
908
- /**
909
- * Contract supporting delivery of outbound messages to the server
910
- * @public
911
- */
912
- export declare interface IDeltaSender {
913
- /**
914
- * Flush all pending messages through the outbound queue
915
- */
916
- flush(): void;
917
- }
65
+ /* Excluded from this release type: IDeltaSender */
918
66
 
919
- export { IErrorBase }
67
+ /* Excluded from this release type: IDisposable */
920
68
 
921
- /**
922
- * A Fluid package for specification for browser environments
923
- * @public
924
- */
925
- export declare interface IFluidBrowserPackage extends IFluidPackage {
926
- /**
927
- * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid}
928
- */
929
- fluid: {
930
- /**
931
- * The browser specific package information for this package
932
- */
933
- browser: IFluidBrowserPackageEnvironment;
934
- /**
935
- * {@inheritDoc @fluidframework/core-interfaces#IFluidPackage.fluid.environment}
936
- */
937
- [environment: string]: IFluidPackageEnvironment;
938
- };
939
- }
69
+ /* Excluded from this release type: IDocumentStorageService */
940
70
 
941
- /**
942
- * A specific Fluid package environment for browsers
943
- * @public
944
- */
945
- export declare interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {
946
- /**
947
- * The Universal Module Definition (umd) target specifics the scripts necessary for
948
- * loading a packages in a browser environment and finding its entry point.
949
- */
950
- umd: {
951
- /**
952
- * The bundled js files for loading this package.
953
- * These files will be loaded and executed in order.
954
- */
955
- files: string[];
956
- /**
957
- * The global name that the script entry points will be exposed.
958
- * This entry point should be an {@link @fluidframework/container-definitions#IFluidModule}.
959
- */
960
- library: string;
961
- };
962
- }
71
+ /* Excluded from this release type: IErrorBase */
963
72
 
964
- /**
965
- * Data structure used to describe the code to load on the Fluid document
966
- * @public
967
- */
968
- export declare interface IFluidCodeDetails {
969
- /**
970
- * The code package to be used on the Fluid document. This is either the package name which will be loaded
971
- * from a package manager. Or the expanded Fluid package.
972
- */
973
- readonly package: string | Readonly<IFluidPackage>;
974
- /**
975
- * Configuration details. This includes links to the package manager and base CDNs.
976
- *
977
- * @remarks This is strictly consumer-defined data.
978
- * Its contents and semantics (including whether or not this data is present) are completely up to the consumer.
979
- */
980
- readonly config?: IFluidCodeDetailsConfig;
981
- }
73
+ /* Excluded from this release type: IErrorEvent */
982
74
 
983
- /**
984
- * @public
985
- */
986
- export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
75
+ /* Excluded from this release type: IEvent */
987
76
 
988
- /**
989
- * Provides capability to compare Fluid code details.
990
- * @public
991
- */
992
- export declare interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
993
- /**
994
- * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
995
- *
996
- * Similar semantics to:
997
- * {@link https://github.com/npm/node-semver#usage}
998
- */
999
- satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
1000
- /**
1001
- * Return a number representing the ascending sort order of the `a` and `b` code details:
1002
- *
1003
- * - `< 0` if `a < b`.
1004
- *
1005
- * - `= 0` if `a === b`.
1006
- *
1007
- * - `> 0` if `a > b`.
1008
- *
1009
- * - `undefined` if `a` is not comparable to `b`.
1010
- *
1011
- * Similar semantics to:
1012
- * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}
1013
- */
1014
- compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
1015
- }
77
+ /* Excluded from this release type: IEventProvider */
1016
78
 
1017
- /**
1018
- * Package manager configuration. Provides a key value mapping of config values
1019
- * @public
1020
- */
1021
- export declare interface IFluidCodeDetailsConfig {
1022
- readonly [key: string]: string;
1023
- }
79
+ /* Excluded from this release type: IFluidBrowserPackage */
1024
80
 
1025
- /**
1026
- * Fluid code resolvers take a Fluid code details, and resolve the
1027
- * full Fluid package including absolute urls for the browser file entries.
1028
- * The Fluid code resolver is coupled to a specific cdn and knows how to resolve
1029
- * the code detail for loading from that cdn. This include resolving to the most recent
1030
- * version of package that supports the provided code details.
1031
- * @public
1032
- */
1033
- export declare interface IFluidCodeResolver {
1034
- /**
1035
- * Resolves a Fluid code details into a form that can be loaded.
1036
- * @param details - The Fluid code details to resolve.
1037
- * @returns A IResolvedFluidCodeDetails where the resolvedPackage's Fluid file entries are absolute urls, and
1038
- * an optional resolvedPackageCacheId if the loaded package should be cached.
1039
- */
1040
- resolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;
1041
- }
81
+ /* Excluded from this release type: IFluidBrowserPackageEnvironment */
1042
82
 
1043
- /**
1044
- * @public
1045
- */
1046
- export declare interface IFluidModule {
1047
- fluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
1048
- }
83
+ /* Excluded from this release type: IFluidCodeDetails */
1049
84
 
1050
- /**
1051
- * Encapsulates a module entry point with corresponding code details.
1052
- * @public
1053
- */
1054
- export declare interface IFluidModuleWithDetails {
1055
- /**
1056
- * Fluid code module that implements the runtime factory needed to instantiate the container runtime.
1057
- */
1058
- module: IFluidModule;
1059
- /**
1060
- * Code details associated with the module. Represents a document schema this module supports.
1061
- * If the code loader implements the {@link @fluidframework/core-interfaces#(IFluidCodeDetailsComparer:interface)}
1062
- * interface, it'll be called to determine whether the module code details satisfy the new code proposal in the
1063
- * quorum.
1064
- */
1065
- details: IFluidCodeDetails;
1066
- }
85
+ /* Excluded from this release type: IFluidCodeDetailsComparer */
1067
86
 
1068
- /**
1069
- * Fluid-specific properties expected on a package to be loaded by the code loader.
1070
- * While compatible with the npm package format it is not necessary that that package is an
1071
- * npm package:
1072
- * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
1073
- * @public
1074
- */
1075
- export declare interface IFluidPackage {
1076
- /**
1077
- * The name of the package that this code represnets
1078
- */
1079
- name: string;
1080
- /**
1081
- * This object represents the Fluid specific properties of the package
1082
- */
1083
- fluid: {
1084
- /**
1085
- * The name of the of the environment. This should be something like browser, or node
1086
- * and contain the necessary targets for loading this code in that environment.
1087
- */
1088
- [environment: string]: undefined | IFluidPackageEnvironment;
1089
- };
1090
- /**
1091
- * General access for extended fields as specific usages will
1092
- * likely have additional infornamation like a definition of
1093
- * compatible versions, or deployment information like rings or rollouts.
1094
- */
1095
- [key: string]: unknown;
1096
- }
87
+ /* Excluded from this release type: IFluidCodeDetailsConfig */
1097
88
 
1098
- /**
1099
- * Specifies an environment on Fluid property of a IFluidPackage.
1100
- * @public
1101
- */
1102
- export declare interface IFluidPackageEnvironment {
1103
- /**
1104
- * The name of the target. For a browser environment, this could be umd for scripts
1105
- * or css for styles.
1106
- */
1107
- [target: string]: undefined | {
1108
- /**
1109
- * List of files for the target. These can be relative or absolute.
1110
- * The code loader should resolve relative paths, and validate all
1111
- * full urls.
1112
- */
1113
- files: string[];
1114
- /**
1115
- * General access for extended fields as specific usages will
1116
- * likely have additional infornamation like a definition
1117
- * of Library, the entrypoint for umd packages.
1118
- */
1119
- [key: string]: unknown;
1120
- };
1121
- }
1122
-
1123
- export { IGenericError }
89
+ /* Excluded from this release type: IFluidCodeResolver */
1124
90
 
1125
- /**
1126
- * Defines list of properties expected for getPendingLocalState
1127
- * @alpha
1128
- */
1129
- export declare interface IGetPendingLocalStateProps {
1130
- /**
1131
- * Indicates the container will close after getting the pending state. Used internally
1132
- * to wait for blobs to be attached to a DDS and collect generated ops before closing.
1133
- */
1134
- readonly notifyImminentClosure: boolean;
1135
- /**
1136
- * Abort signal to stop waiting for blobs to get attached to a DDS. When triggered,
1137
- * only blobs attached will be collected in the pending state.
1138
- * Intended to be used in the very rare scenario in which getLocalPendingState go stale due
1139
- * to a blob failed to be referenced. Such a blob will be lost but the rest of the state will
1140
- * be preserved and collected.
1141
- */
1142
- readonly stopBlobAttachingSignal?: AbortSignal;
1143
- }
91
+ /* Excluded from this release type: IFluidModule */
1144
92
 
1145
- /**
1146
- * The Host's view of the Loader, used for loading Containers
1147
- * @public
1148
- */
1149
- export declare interface IHostLoader extends ILoader {
1150
- /**
1151
- * Creates a new container using the specified chaincode but in an unattached state. While unattached all
1152
- * updates will only be local until the user explicitly attaches the container to a service provider.
1153
- */
1154
- createDetachedContainer(codeDetails: IFluidCodeDetails, createDetachedProps?: {
1155
- canReconnect?: boolean;
1156
- clientDetailsOverride?: IClientDetails;
1157
- }): Promise<IContainer>;
1158
- /**
1159
- * Creates a new container using the specified snapshot but in an unattached state. While unattached all
1160
- * updates will only be local until the user explicitly attaches the container to a service provider.
1161
- */
1162
- rehydrateDetachedContainerFromSnapshot(snapshot: string, createDetachedProps?: {
1163
- canReconnect?: boolean;
1164
- clientDetailsOverride?: IClientDetails;
1165
- }): Promise<IContainer>;
1166
- }
93
+ /* Excluded from this release type: IFluidModuleWithDetails */
1167
94
 
1168
- /**
1169
- * The Runtime's view of the Loader, used for loading Containers
1170
- * @public
1171
- */
1172
- export declare interface ILoader extends Partial<IProvideLoader> {
1173
- /**
1174
- * Resolves the resource specified by the URL + headers contained in the request object
1175
- * to the underlying container that will resolve the request.
1176
- *
1177
- * @remarks
1178
- *
1179
- * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes
1180
- * a request against the server found from the resolve step.
1181
- */
1182
- resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;
1183
- /**
1184
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the Container's IFluidRouter/request.
1185
- */
1186
- request(request: IRequest): Promise<IResponse>;
1187
- /**
1188
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the Container's IFluidRouter/request.
1189
- */
1190
- readonly IFluidRouter: IFluidRouter;
1191
- }
95
+ /* Excluded from this release type: IFluidPackage */
1192
96
 
1193
- /**
1194
- * Set of Request Headers that the Loader understands and may inspect or modify
1195
- * @public
1196
- */
1197
- export declare interface ILoaderHeader {
1198
- /**
1199
- * @deprecated This header has been deprecated and will be removed in a future release
1200
- */
1201
- [LoaderHeader.cache]: boolean;
1202
- [LoaderHeader.clientDetails]: IClientDetails;
1203
- [LoaderHeader.loadMode]: IContainerLoadMode;
1204
- /**
1205
- * Loads the container to at least the specified sequence number.
1206
- * If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.
1207
- */
1208
- [LoaderHeader.sequenceNumber]: number;
1209
- [LoaderHeader.reconnect]: boolean;
1210
- [LoaderHeader.version]: string | undefined;
1211
- }
97
+ /* Excluded from this release type: IFluidPackageEnvironment */
1212
98
 
1213
- /**
1214
- * @public
1215
- */
1216
- export declare type ILoaderOptions = {
1217
- [key in string | number]: any;
1218
- } & {
1219
- /**
1220
- * @deprecated This option has been deprecated and will be removed in a future release
1221
- * Set caching behavior for the loader. If true, we will load a container from cache if one
1222
- * with the same id/version exists or create a new container and cache it if it does not. If
1223
- * false, always load a new container and don't cache it. If the container has already been
1224
- * closed, it will not be cached. A cache option in the LoaderHeader for an individual
1225
- * request will override the Loader's value.
1226
- * Defaults to false.
1227
- */
1228
- cache?: boolean;
1229
- /**
1230
- * Provide the current Loader through the scope object when creating Containers. It is added
1231
- * as the `ILoader` property, and will overwrite an existing property of the same name on the
1232
- * scope. Useful for when the host wants to provide the current Loader's functionality to
1233
- * individual Data Stores, which is typically expected when creating with a Loader.
1234
- * Defaults to true.
1235
- */
1236
- provideScopeLoader?: boolean;
1237
- /**
1238
- * Max time (in ms) container will wait for a leave message of a disconnected client.
1239
- */
1240
- maxClientLeaveWaitTime?: number;
1241
- };
99
+ /* Excluded from this release type: IFluidRouter */
1242
100
 
1243
- /**
1244
- * @deprecated 0.48, This API will be removed in 0.50
1245
- * No replacement since it is not expected anyone will depend on this outside container-loader
1246
- * See {@link https://github.com/microsoft/FluidFramework/issues/9711} for context.
1247
- * @public
1248
- */
1249
- export declare interface IPendingLocalState {
1250
- url: string;
1251
- pendingRuntimeState: unknown;
1252
- }
101
+ /* Excluded from this release type: IGenericError */
1253
102
 
1254
- /**
1255
- * @public
1256
- */
1257
- export declare interface IProvideFluidCodeDetailsComparer {
1258
- readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
1259
- }
103
+ /* Excluded from this release type: IGetPendingLocalStateProps */
1260
104
 
1261
- /**
1262
- * @public
1263
- */
1264
- export declare interface IProvideLoader {
1265
- readonly ILoader: ILoader;
1266
- }
105
+ /* Excluded from this release type: IHostLoader */
1267
106
 
1268
- /**
1269
- * @public
1270
- */
1271
- export declare interface IProvideRuntimeFactory {
1272
- readonly IRuntimeFactory: IRuntimeFactory;
1273
- }
107
+ /* Excluded from this release type: ILoader */
1274
108
 
1275
- /**
1276
- * The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails
1277
- * that have been resolved and are ready to load
1278
- * @public
1279
- */
1280
- export declare interface IResolvedFluidCodeDetails extends IFluidCodeDetails {
1281
- /**
1282
- * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.
1283
- */
1284
- readonly resolvedPackage: Readonly<IFluidPackage>;
1285
- /**
1286
- * If not undefined, this id will be used to cache the entry point for the code package
1287
- */
1288
- readonly resolvedPackageCacheId: string | undefined;
1289
- }
109
+ /* Excluded from this release type: ILoaderHeader */
1290
110
 
1291
- /**
1292
- * The IRuntime represents an instantiation of a code package within a Container.
1293
- * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.
1294
- * @public
1295
- */
1296
- export declare interface IRuntime extends IDisposable {
1297
- /**
1298
- * Executes a request against the runtime
1299
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
1300
- */
1301
- request(request: IRequest): Promise<IResponse>;
1302
- /**
1303
- * Notifies the runtime of a change in the connection state
1304
- */
1305
- setConnectionState(connected: boolean, clientId?: string): any;
1306
- /**
1307
- * Processes the given op (message)
1308
- */
1309
- process(message: ISequencedDocumentMessage, local: boolean): any;
1310
- /**
1311
- * Processes the given signal
1312
- */
1313
- processSignal(message: any, local: boolean): any;
1314
- /**
1315
- * Create a summary. Used when attaching or serializing a detached container.
1316
- *
1317
- * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported
1318
- * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the
1319
- * new storage IDs so requests can be redirected.
1320
- */
1321
- createSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;
1322
- /**
1323
- * Propagate the container state when container is attaching or attached.
1324
- * @param attachState - State of the container.
1325
- */
1326
- setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
1327
- /**
1328
- * Get pending local state in a serializable format to be given back to a newly loaded container
1329
- * @alpha
1330
- * {@link https://github.com/microsoft/FluidFramework/packages/tree/main/loader/container-loader/closeAndGetPendingLocalState.md}
1331
- */
1332
- getPendingLocalState(props?: IGetPendingLocalStateProps): unknown;
1333
- /**
1334
- * Notify runtime that container is moving to "Attaching" state
1335
- * @param snapshot - snapshot created at attach time
1336
- * @deprecated not necessary after op replay moved to Container
1337
- */
1338
- notifyAttaching(snapshot: ISnapshotTreeWithBlobContents): void;
1339
- /**
1340
- * Notify runtime that we have processed a saved message, so that it can do async work (applying
1341
- * stashed ops) after having processed it.
1342
- */
1343
- notifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;
1344
- /**
1345
- * Exposes the entryPoint for the container runtime.
1346
- * Use this as the primary way of getting access to the user-defined logic within the container runtime.
1347
- *
1348
- * @see {@link IContainer.getEntryPoint}
1349
- */
1350
- getEntryPoint(): Promise<FluidObject | undefined>;
1351
- }
111
+ /* Excluded from this release type: ILoaderOptions */
1352
112
 
1353
- /**
1354
- * @public
1355
- */
1356
- export declare const IRuntimeFactory: keyof IProvideRuntimeFactory;
113
+ /* Excluded from this release type: IPendingLocalState */
1357
114
 
1358
- /**
1359
- * Exported module definition
1360
- *
1361
- * Provides the entry point for the ContainerContext to load the proper IRuntime
1362
- * to start up the running instance of the Container.
1363
- * @public
1364
- */
1365
- export declare interface IRuntimeFactory extends IProvideRuntimeFactory {
1366
- /**
1367
- * Instantiates a new IRuntime for the given IContainerContext to proxy to
1368
- * This is the main entry point to the Container's business logic
1369
- *
1370
- * @param context - container context to be supplied to the runtime
1371
- * @param existing - whether to instantiate for the first time or from an existing context
1372
- */
1373
- instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
1374
- }
115
+ /* Excluded from this release type: IProvideFluidCodeDetailsComparer */
1375
116
 
1376
- /**
1377
- * Determines if any object is an IFluidBrowserPackage
1378
- * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage
1379
- * @public
1380
- */
1381
- export declare const isFluidBrowserPackage: (maybePkg: unknown) => maybePkg is Readonly<IFluidBrowserPackage>;
117
+ /* Excluded from this release type: IProvideLoader */
1382
118
 
1383
- /**
1384
- * Determines if any object is an IFluidCodeDetails
1385
- * @public
1386
- */
1387
- export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
119
+ /* Excluded from this release type: IProvideRuntimeFactory */
1388
120
 
1389
- /**
1390
- * Check if the package.json defines a Fluid package
1391
- * @param pkg - the package json data to check if it is a Fluid package.
1392
- * @public
1393
- */
1394
- export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
121
+ /* Excluded from this release type: IRequest */
1395
122
 
1396
- /**
1397
- * This is used when we rehydrate a container from the snapshot. Here we put the blob contents
1398
- * in separate property: {@link ISnapshotTreeWithBlobContents.blobsContents}.
1399
- *
1400
- * @remarks This is used as the `ContainerContext`'s base snapshot when attaching.
1401
- * @public
1402
- */
1403
- export declare interface ISnapshotTreeWithBlobContents extends ISnapshotTree {
1404
- blobsContents: {
1405
- [path: string]: ArrayBufferLike;
1406
- };
1407
- trees: {
1408
- [path: string]: ISnapshotTreeWithBlobContents;
1409
- };
1410
- }
123
+ /* Excluded from this release type: IResolvedFluidCodeDetails */
1411
124
 
1412
- export { IThrottlingWarning }
125
+ /* Excluded from this release type: IResolvedUrl */
1413
126
 
1414
- export { IUsageError }
127
+ /* Excluded from this release type: IResponse */
1415
128
 
1416
- /**
1417
- * Accepted header keys for requests coming to the Loader
1418
- * @public
1419
- */
1420
- export declare enum LoaderHeader {
1421
- /**
1422
- * @deprecated This header has been deprecated and will be removed in a future release
1423
- * Override the Loader's default caching behavior for this container.
1424
- */
1425
- cache = "fluid-cache",
1426
- clientDetails = "fluid-client-details",
1427
- /**
1428
- * Start the container in a paused, unconnected state. Defaults to false
1429
- */
1430
- loadMode = "loadMode",
1431
- reconnect = "fluid-reconnect",
1432
- /**
1433
- * Loads the container to at least the specified sequence number.
1434
- * If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.
1435
- */
1436
- sequenceNumber = "fluid-sequence-number",
1437
- /**
1438
- * One of the following:
1439
- * null or "null": use ops, no snapshots
1440
- * undefined: fetch latest snapshot
1441
- * otherwise, version sha to load snapshot
1442
- */
1443
- version = "version"
1444
- }
129
+ /* Excluded from this release type: IRuntime */
1445
130
 
1446
- /**
1447
- * @public
1448
- */
1449
- export declare type ReadOnlyInfo = {
1450
- readonly readonly: false | undefined;
1451
- } | {
1452
- readonly readonly: true;
1453
- /**
1454
- * Read-only because `forceReadOnly()` was called.
1455
- */
1456
- readonly forced: boolean;
1457
- /**
1458
- * Read-only because client does not have write permissions for document.
1459
- */
1460
- readonly permissions: boolean | undefined;
1461
- /**
1462
- * Read-only with no delta stream connection.
1463
- */
1464
- readonly storageOnly: boolean;
1465
- /**
1466
- * Extra info on why connection to delta stream is not possible.
1467
- *
1468
- * @remarks This info might be provided if {@link ReadOnlyInfo.storageOnly} is set to `true`.
1469
- */
1470
- readonly storageOnlyReason?: string;
1471
- };
131
+ /* Excluded from this release type: IRuntimeFactory */
132
+
133
+ /* Excluded from this release type: isFluidBrowserPackage */
134
+
135
+ /* Excluded from this release type: isFluidCodeDetails */
136
+
137
+ /* Excluded from this release type: isFluidPackage */
138
+
139
+ /* Excluded from this release type: ISnapshotTreeWithBlobContents */
140
+
141
+ /* Excluded from this release type: ITelemetryBaseLogger */
142
+
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 */
1472
150
 
1473
151
  export { }