Skip to main content
Version: v2

OdspDocumentServiceFactoryCore Class

Factory for creating the sharepoint document service. Use this if you want to use the sharepoint implementation.

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

To use, import via @fluidframework/odsp-driver/legacy.

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

Signature​

export declare class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory, IRelaySessionAwareDriverFactory

Implements: IDocumentServiceFactory, IRelaySessionAwareDriverFactory

Constructors​

ConstructorAlertsDescription
(constructor)(getStorageToken, getWebsocketToken, persistedCache, hostPolicy)BetaConstructs a new instance of the OdspDocumentServiceFactoryCore class

Properties​

PropertyAlertsModifiersTypeDescription
createPointInTimeDocumentServiceBetaoptional, readonlyIPointInTimeDocumentServiceFactory["createPointInTimeDocumentService"]Creates a document service that reads its snapshot from the closest file version at or before the target and its deltas from the live document, materializing a requested sequence number through replay.
ILayerCompatDetailsBetaoptional, readonlyunknownThe compatibility details of the ODSP Driver layer that is exposed to the Loader layer for validating Loader-Driver compatibility.
IRelaySessionAwareDriverFactoryBetareadonlythis
persistedCacheBetaIPersistedCache
snapshotPrefetchResultCacheBetareadonlyPromiseCache<string, IPrefetchSnapshotContents>

Methods​

MethodAlertsReturn TypeDescription
createContainer(createNewSummary, createNewResolvedUrl, logger, clientIsSummarizer)BetaPromise<IDocumentService>
createDocumentService(resolvedUrl, logger, clientIsSummarizer)BetaPromise<IDocumentService>
createDocumentServiceCore(resolvedUrl, odspLogger, cacheAndTrackerArg, clientIsSummarizer)BetaPromise<IDocumentService>
getRelayServiceSessionInfo(resolvedUrl)BetaPromise<ISocketStorageDiscovery | undefined>This function would return info about relay service session only if this factory established (or attempted to establish) connection very recently. Otherwise, it will return undefined.

Constructor Details​

(constructor)​

Constructs a new instance of the OdspDocumentServiceFactoryCore class

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

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

Signature​

constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);

Parameters​

ParameterModifiersTypeDescription
getStorageTokenTokenFetcher<OdspResourceTokenFetchOptions>function that can provide the storage token for a given site. This is is also referred to as the "Vroom" token in SPO.
getWebsocketTokenTokenFetcher<OdspResourceTokenFetchOptions> | undefinedfunction that can provide a token for accessing the web socket. This is also to as the "Push" token in SPO. If undefined then websocket token is expected to be returned with joinSession response payload.
persistedCacheoptionalIPersistedCachePersistedCache provided by host for use in this session.
hostPolicyoptionalHostStoragePolicyPolicy for storage provided by host.

Property Details​

createPointInTimeDocumentService​

Creates a document service that reads its snapshot from the closest file version at or before the target and its deltas from the live document, materializing a requested sequence number through replay.

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

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

Signature​

readonly createPointInTimeDocumentService?: IPointInTimeDocumentServiceFactory["createPointInTimeDocumentService"];

Type: IPointInTimeDocumentServiceFactory["createPointInTimeDocumentService"]

ILayerCompatDetails​

The compatibility details of the ODSP Driver layer that is exposed to the Loader layer for validating Loader-Driver compatibility.

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

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

Signature​

readonly ILayerCompatDetails?: unknown;

Type: unknown

Remarks​

This is for internal use only. The type of this should be ILayerCompatDetails. However, ILayerCompatDetails is internal and this class is currently marked as legacy alpha. So, using unknown here.

IRelaySessionAwareDriverFactory​

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

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

Signature​

get IRelaySessionAwareDriverFactory(): this;

Type: this

persistedCache​

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

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

Signature​

protected persistedCache: IPersistedCache;

Type: IPersistedCache

snapshotPrefetchResultCache​

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

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

Signature​

get snapshotPrefetchResultCache(): PromiseCache<string, IPrefetchSnapshotContents>;

Type: PromiseCache<string, IPrefetchSnapshotContents>

Method Details​

createContainer​

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

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

Signature​

createContainer(createNewSummary: ISummaryTree | undefined, createNewResolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;

Parameters​

ParameterModifiersTypeDescription
createNewSummaryISummaryTree | undefined
createNewResolvedUrlIResolvedUrl
loggeroptionalITelemetryBaseLogger
clientIsSummarizeroptionalboolean

Returns​

Return type: Promise<IDocumentService>

createDocumentService​

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

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

Signature​

createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;

Parameters​

ParameterModifiersTypeDescription
resolvedUrlIResolvedUrl
loggeroptionalITelemetryBaseLogger
clientIsSummarizeroptionalboolean

Returns​

Return type: Promise<IDocumentService>

createDocumentServiceCore​

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

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

Signature​

protected createDocumentServiceCore(resolvedUrl: IResolvedUrl, odspLogger: ITelemetryBaseLogger, cacheAndTrackerArg?: ICacheAndTracker, clientIsSummarizer?: boolean): Promise<IDocumentService>;

Parameters​

ParameterModifiersTypeDescription
resolvedUrlIResolvedUrl
odspLoggerITelemetryBaseLogger
cacheAndTrackerArgoptionalICacheAndTracker
clientIsSummarizeroptionalboolean

Returns​

Return type: Promise<IDocumentService>

getRelayServiceSessionInfo​

This function would return info about relay service session only if this factory established (or attempted to establish) connection very recently. Otherwise, it will return undefined.

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

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

Signature​

getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;

Parameters​

ParameterTypeDescription
resolvedUrlIResolvedUrlresolved url for container

Returns​

The current join session response stored in cache. undefined if not present.

Return type: Promise<ISocketStorageDiscovery | undefined>