Skip to main content
Version: v1

@fluidframework/odsp-driver-definitions Package

Interfaces

InterfaceDescription
HostStoragePolicy
ICacheEntryCache entry. Identifies file that this entry belongs to, and type of content stored in it.
ICollabSessionOptions
IEntryCache entry. Identifies file that this entry belongs to, and type of content stored in it.
IFileEntry
IOdspErrorBase interface for all errors and warnings Superset of IDriverErrorBase, but with Odsp-specific errorType
IOdspResolvedUrl
IOdspUrlParts
IOpsCachingPolicy
IPersistedCachePersistent cache. This interface can be implemented by the host to provide durable caching across sessions. If not provided at driver factory construction, factory will use in-memory cache implementation that does not survive across sessions. Snapshot entires stored in the IPersistedCache will be considered stale and removed after 2 days. Read the README for more information.
ISnapshotOptions
OdspResourceTokenFetchOptionsRepresents access token fetch options for ODSP resource
ShareLinkInfoTypeSharing link data created for the ODSP item. Contains information about either sharing link created while creating a new file or a redeemable share link created when loading an existing file
TokenFetchOptionsRepresents access token fetch options
TokenResponseRepresents token response

Enumerations

EnumDescription
OdspErrorType
ShareLinkTypesType of shareLink requested/created when creating the file for the first time. At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links when provided as a request parameter with the /snapshot api call. In future, we can add more types here.

Types

TypeAliasDescription
CacheContentType
IdentityTypeIdentity types supported by ODSP driver. Consumer represents user authenticated with Microsoft Account (MSA) Enterprise represents user authenticated with M365 tenant account
InstrumentedStorageTokenFetcher
OdspError
TokenFetcherMethod signature for callback method used to fetch access token

Variables

VariableTypeDescription
isTokenFromCache(tokenResponse: string | TokenResponse | null) => boolean | undefinedHelper method which returns flag indicating whether token response comes from local cache
snapshotKeyDescribes what kind of content is stored in cache entry.
tokenFromResponse(tokenResponse: string | TokenResponse | null | undefined) => string | nullHelper method which transforms return value for TokenFetcher method to token string

Variable Details

isTokenFromCache

Helper method which returns flag indicating whether token response comes from local cache

Signature

isTokenFromCache: (tokenResponse: string | TokenResponse | null) => boolean | undefined

Type: (tokenResponse: string | TokenResponse | null) => boolean | undefined

snapshotKey

Describes what kind of content is stored in cache entry.

Signature

snapshotKey = "snapshot"

tokenFromResponse

Helper method which transforms return value for TokenFetcher method to token string

Signature

tokenFromResponse: (tokenResponse: string | TokenResponse | null | undefined) => string | null

Type: (tokenResponse: string | TokenResponse | null | undefined) => string | null