Skip to main content

@fluidframework/container-definitions Package

This library contains the interfaces and types concerning the Loader and loading the Container.

Interfaces

InterfaceAlertsModifiersDescription
ConnectionStatusCatchingUpLegacysealedStatus for an in-progress connection that is catching up to latest op state.
ConnectionStatusConnectedLegacysealedStatus for a full connection.
ConnectionStatusDisconnectedLegacysealedStatus for a disconnected connection.
ConnectionStatusEstablishingConnectionLegacysealedStatus for an establishing connection.
ConnectionStatusTemplateLegacysealedDefines the connection status of the container.
ContainerWarningLegacyRepresents warnings raised on container.
IAudienceRepresents all clients connected to the op stream, both read-only and read/write.
IAudienceEventsInterface describing Audience events
IAudienceOwnerLegacyManages the state and the members for IAudience
IBatchMessageLegacyPayload type for IContainerContext.submitBatchFn()
ICodeDetailsLoaderLegacyFluid code loader resolves a code module matching the document schema, i.e. code details, such as a package name and package version range.
IConnectionDetailsLegacyContract representing the result of a newly established connection to the server for syncing deltas.
IContainerLegacyThe Host's view of a Container and its connection to storage
IContainerContextLegacyIContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the loader layer. It gets passed into the instantiateRuntime(context, existing) call.
IContainerEventsLegacyEvents emitted by the IContainer "upwards" to the Loader and Host.
IContainerLoadModeLegacy
IContainerStorageServiceLegacyInterface to provide access to snapshots and policies to the Runtime layer. This should follow the Loader / Runtime layer compatibility rules.
IDeltaManagerLegacysealedManages the transmission of ops between the runtime and storage.
IDeltaManagerEventsLegacysealedEvents emitted by IDeltaManager.
IDeltaQueueLegacysealedQueue of ops to be sent to or processed from storage
IDeltaQueueEventsLegacysealedEvents emitted by IDeltaQueue.
IDeltaSenderLegacysealedContract supporting delivery of outbound messages to the server
IFluidBrowserPackageLegacyA Fluid package for specification for browser environments
IFluidBrowserPackageEnvironmentLegacyA specific Fluid package environment for browsers
IFluidCodeDetailsLegacyData structure used to describe the code to load on the Fluid document
IFluidCodeDetailsComparerLegacyProvides capability to compare Fluid code details.
IFluidCodeDetailsConfigLegacyPackage manager configuration. Provides a key value mapping of config values
IFluidModuleLegacy
IFluidModuleWithDetailsLegacyEncapsulates a module entry point with corresponding code details.
IFluidPackageLegacyFluid-specific properties expected on a package to be loaded by the code loader. While compatible with the npm package format it is not necessary that that package is an npm package: https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid
IFluidPackageEnvironmentLegacySpecifies an environment on Fluid property of a IFluidPackage.
IGetPendingLocalStatePropsLegacyDefines list of properties expected for getPendingLocalState
IHostLoaderLegacyThe Host's view of the Loader, used for loading Containers
ILoaderLegacyThe Runtime's view of the Loader, used for loading Containers
IProvideFluidCodeDetailsComparerLegacy
IProvideLoaderLegacy
IProvideRuntimeFactoryLegacy
IRuntimeLegacyThe IRuntime represents an instantiation of a code package within a Container. Primarily held by the ContainerContext to be able to interact with the running instance of the Container.
IRuntimeFactoryLegacy

Exported module definition

Provides the entry point for the ContainerContext to load the proper IRuntime to start up the running instance of the Container.

ISelfReturn type of getSelf(). Please see remarks for getSelf() to learn more details on promises.
ISnapshotTreeWithBlobContentsLegacyThis is used when we rehydrate a container from the snapshot. Here we put the blob contents in separate property: blobsContents.

Enumerations

EnumAlertsDescription
AttachStateThe attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the service. The transition from detached to attached state is a one-way transition.
LoaderHeaderLegacyAccepted header keys for requests coming to the Loader

Types

TypeAliasAlertsModifiersDescription
ConnectionStateType defining the different states of connectivity a Container can be in.
ConnectionStatusLegacysealedConnection status of the container.
ContainerErrorTypesLegacyDifferent error types the ClientSession may report out to the Host.
IContainerPoliciesLegacyPolicies to have various behaviors during container create and load.
ICriticalContainerErrorRepresents errors raised on container.
ILoaderOptionsLegacyOptions to configure various behaviors of the ILoader.
ReadOnlyInfoLegacy

Functions

FunctionAlertsReturn TypeDescription
isFluidBrowserPackage(maybePkg)LegacymaybePkg is Readonly<IFluidBrowserPackage>Determines if any object is an IFluidBrowserPackage
isFluidPackage(pkg)Legacypkg is Readonly<IFluidPackage>Check if the package.json defines a Fluid package

Variables

VariableAlertsModifiersTypeDescription
ContainerErrorTypesLegacyreadonly{ readonly clientSessionExpiredError: "clientSessionExpiredError"; readonly genericError: "genericError"; readonly throttlingError: "throttlingError"; readonly dataCorruptionError: "dataCorruptionError"; readonly dataProcessingError: "dataProcessingError"; readonly usageError: "usageError"; }Different error types the ClientSession may report out to the Host.
IFluidCodeDetailsComparerLegacyreadonlykeyof IProvideFluidCodeDetailsComparer
IRuntimeFactoryLegacyreadonlykeyof IProvideRuntimeFactory

Namespaces

NamespaceDescription
ConnectionStateNamespace for the different connection states a container can be in. PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression.

Function Details

isFluidBrowserPackage

Determines if any object is an IFluidBrowserPackage

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-definitions/legacy.

For more information about our API support guarantees, see here.

Signature

isFluidBrowserPackage: (maybePkg: unknown) => maybePkg is Readonly<IFluidBrowserPackage>

Parameters

ParameterTypeDescription
maybePkgunknownThe object to check for compatibility with IFluidBrowserPackage

Returns

Return type: maybePkg is Readonly<IFluidBrowserPackage>

isFluidPackage

Check if the package.json defines a Fluid package

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-definitions/legacy.

For more information about our API support guarantees, see here.

Signature

isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>

Parameters

ParameterTypeDescription
pkgunknownthe package json data to check if it is a Fluid package.

Returns

Return type: pkg is Readonly<IFluidPackage>

Variable Details

ContainerErrorTypes

Different error types the ClientSession may report out to the Host.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-definitions/legacy.

For more information about our API support guarantees, see here.

Signature

ContainerErrorTypes: {
readonly clientSessionExpiredError: "clientSessionExpiredError";
readonly genericError: "genericError";
readonly throttlingError: "throttlingError";
readonly dataCorruptionError: "dataCorruptionError";
readonly dataProcessingError: "dataProcessingError";
readonly usageError: "usageError";
}

Type: { readonly clientSessionExpiredError: "clientSessionExpiredError"; readonly genericError: "genericError"; readonly throttlingError: "throttlingError"; readonly dataCorruptionError: "dataCorruptionError"; readonly dataProcessingError: "dataProcessingError"; readonly usageError: "usageError"; }

IFluidCodeDetailsComparer

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-definitions/legacy.

For more information about our API support guarantees, see here.

Signature

IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer

Type: keyof IProvideFluidCodeDetailsComparer

IRuntimeFactory

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-definitions/legacy.

For more information about our API support guarantees, see here.

Signature

IRuntimeFactory: keyof IProvideRuntimeFactory

Type: keyof IProvideRuntimeFactory