Skip to main content
Version: v2

IDocumentServiceFactory Interface

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

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

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

Signature​

export interface IDocumentServiceFactory

Methods​

MethodAlertsReturn TypeDescription
createContainer(createNewSummary, createNewResolvedUrl, logger, clientIsSummarizer)BetaPromise<IDocumentService>Creates a new document with the provided options. Returns the document service.
createDocumentService(resolvedUrl, logger, clientIsSummarizer)BetaPromise<IDocumentService>Creates the document service after extracting different endpoints URLs from a resolved URL.

Method Details​

createContainer​

Creates a new document with the provided options. Returns the document service.

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 | undefinedSummary used to create file. If undefined, an empty file will be created and a summary should be posted later, before connecting to ordering service.
createNewResolvedUrlIResolvedUrlEndpoint URL data. See IResolvedUrl.
loggeroptionalITelemetryBaseLoggerOptional telemetry logger to which telemetry events will be forwarded.
clientIsSummarizeroptionalbooleanWhether or not the client is the summarizer. undefined => false

Returns​

Return type: Promise<IDocumentService>

createDocumentService​

Creates the document service after extracting different endpoints URLs from a resolved URL.

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
resolvedUrlIResolvedUrlEndpoint URL data. See IResolvedUrl.
loggeroptionalITelemetryBaseLoggerOptional telemetry logger to which telemetry events will be forwarded.
clientIsSummarizeroptionalbooleanWhether or not the client is the summarizer. undefined => false

Returns​

An instance of IDocumentService.

Return type: Promise<IDocumentService>