@fluidframework/driver-definitions Package

Packages > @fluidframework/driver-definitions

Interfaces

Interface Description
DriverPreCheckInfo Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL for driver compatibility and preload information.
IAuthorizationError
IContainerPackageInfo Container package info handed off to resolver.
IDeltasFetchResult
IDeltaStorageService Interface to provide access to stored deltas for a shared object
IDocumentDeltaConnection
IDocumentDeltaConnectionEvents
IDocumentDeltaStorageService Interface to provide access to stored deltas for a shared object
IDocumentService
IDocumentServiceFactory
IDocumentServicePolicies
IDocumentStorageService Interface to provide access to snapshots saved for a shared object
IDocumentStorageServicePolicies
IDriverBasicError Having this uber interface without types that have their own interfaces allows compiler to differentiate interfaces based on error type
IDriverErrorBase Base interface for all errors and warnings
IDriverHeader
IFluidResolvedUrl
IGenericNetworkError
IResolvedUrlBase
IStream Read interface for the Queue
ISummaryContext Context for uploading a summary to storage. Indicates the previously acked summary.
IThrottlingWarning
IUrlResolver
IWebResolvedUrl

Enumerations

Enum Description
DriverErrorType Driver Error types Lists types that are likely to be used by all drivers
DriverHeader Additional key in the loader request header
LoaderCachingPolicy

Types

TypeAlias Description
DriverError
IResolvedUrl
IStreamResult

Enumeration Details

DriverErrorType

Driver Error types Lists types that are likely to be used by all drivers

Signature

export declare enum DriverErrorType 

Flags

Flag Description
authorizationError Access denied - user does not have enough privileges to open a file, or continue to operate on a file
deltaStreamConnectionForbidden The document is read-only and delta stream connection is forbidden.
fetchFailure A generic fetch failure that indicates we were not able to get a response from the server. This may be due to the client being offline (though, if we are able to detect offline state it will be logged as an offlineError instead). Other possibilities could be DNS errors, malformed fetch request, CSP violation, etc.
fileNotFoundOrAccessDeniedError File not found, or file deleted during session
fileOverwrittenInStorage This error occurs when the file is modified externally (not through Fluid protocol) in storage. It will occur in cases where client has some state or cache that is based on old content (identity) of a file, and storage / driver / loader detects such mismatch. When it's hit, client needs to forget all the knowlege about this file and start over.
genericError A fatal error with no specific interpretation covered by other DriverErrorType values
genericNetworkError Some non-categorized (below) networking error Include errors like fatal server error (usually 500).
incorrectServerResponse Unexpected response from server. Either JSON is malformed, or some required properties are missing
offlineError We can not reach server due to computer being offline.
throttlingError Throttling error from server. Server is busy and is asking not to reconnect for some time
unsupportedClientProtocolVersion
writeError User does not have write permissions to a file, but is changing content of a file. That might be indication of some data store error - data stores should not generate ops in readonly mode.

FlagDetails

authorizationError

Access denied - user does not have enough privileges to open a file, or continue to operate on a file

Signature
authorizationError = "authorizationError"
deltaStreamConnectionForbidden

The document is read-only and delta stream connection is forbidden.

Signature
deltaStreamConnectionForbidden = "deltaStreamConnectionForbidden"
fetchFailure

A generic fetch failure that indicates we were not able to get a response from the server. This may be due to the client being offline (though, if we are able to detect offline state it will be logged as an offlineError instead). Other possibilities could be DNS errors, malformed fetch request, CSP violation, etc.

Signature
fetchFailure = "fetchFailure"
fileNotFoundOrAccessDeniedError

File not found, or file deleted during session

Signature
fileNotFoundOrAccessDeniedError = "fileNotFoundOrAccessDeniedError"
fileOverwrittenInStorage

This error occurs when the file is modified externally (not through Fluid protocol) in storage. It will occur in cases where client has some state or cache that is based on old content (identity) of a file, and storage / driver / loader detects such mismatch. When it’s hit, client needs to forget all the knowlege about this file and start over.

Signature
fileOverwrittenInStorage = "fileOverwrittenInStorage"
genericError

A fatal error with no specific interpretation covered by other DriverErrorType values

Signature
genericError = "genericError"
genericNetworkError

Some non-categorized (below) networking error Include errors like fatal server error (usually 500).

Signature
genericNetworkError = "genericNetworkError"
incorrectServerResponse

Unexpected response from server. Either JSON is malformed, or some required properties are missing

Signature
incorrectServerResponse = "incorrectServerResponse"
offlineError

We can not reach server due to computer being offline.

Signature
offlineError = "offlineError"
throttlingError

Throttling error from server. Server is busy and is asking not to reconnect for some time

Signature
throttlingError = "throttlingError"
unsupportedClientProtocolVersion
Signature
unsupportedClientProtocolVersion = "unsupportedClientProtocolVersion"
writeError

User does not have write permissions to a file, but is changing content of a file. That might be indication of some data store error - data stores should not generate ops in readonly mode.

Signature
writeError = "writeError"

DriverHeader

Additional key in the loader request header

Signature

export declare enum DriverHeader 

Flags

Flag Description
createNew
summarizingClient

FlagDetails

createNew
Signature
createNew = "createNew"
summarizingClient
Signature
summarizingClient = "fluid-client-summarizer"

LoaderCachingPolicy

Signature

export declare enum LoaderCachingPolicy 

Flags

Flag Description
NoCaching The loader should not implement any prefetching or caching policy.
Prefetch The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.

FlagDetails

NoCaching

The loader should not implement any prefetching or caching policy.

Signature
NoCaching = 0
Prefetch

The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.

Signature
Prefetch = 1

Type Details

DriverError

Signature

export declare type DriverError = IThrottlingWarning | IGenericNetworkError | IAuthorizationError | IDriverBasicError;

IResolvedUrl

Signature

export declare type IResolvedUrl = IWebResolvedUrl | IFluidResolvedUrl;

IStreamResult

Signature

export declare type IStreamResult<T> = {
    done: true;
} | {
    done: false;
    value: T;
};