Skip to main content
Version: v1

IDocumentServiceFactory Interface

Signature​

export interface IDocumentServiceFactory

Properties​

PropertyTypeDescription
protocolNamestringName of the protocol used by factory

Methods​

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

Property Details​

protocolName​

Name of the protocol used by factory

Signature​

protocolName: string;

Type: string

Method Details​

createContainer​

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

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.

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>