@fluidframework/driver-definitions 1.1.0 → 1.2.0-77818
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/storage.d.ts +2 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js.map +1 -1
- package/dist/urlResolver.d.ts +7 -0
- package/dist/urlResolver.d.ts.map +1 -1
- package/dist/urlResolver.js.map +1 -1
- package/lib/storage.d.ts +2 -2
- package/lib/storage.d.ts.map +1 -1
- package/lib/storage.js.map +1 -1
- package/lib/urlResolver.d.ts +7 -0
- package/lib/urlResolver.d.ts.map +1 -1
- package/lib/urlResolver.js.map +1 -1
- package/package.json +4 -4
- package/src/storage.ts +5 -5
- package/src/urlResolver.ts +7 -1
package/dist/storage.d.ts
CHANGED
|
@@ -240,7 +240,7 @@ export interface IDocumentServiceFactory {
|
|
|
240
240
|
/**
|
|
241
241
|
* Creates the document service after extracting different endpoints URLs from a resolved URL.
|
|
242
242
|
*
|
|
243
|
-
* @param resolvedUrl - Endpoint URL data.
|
|
243
|
+
* @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.
|
|
244
244
|
* @param logger - Optional telemetry logger to which telemetry events will be forwarded.
|
|
245
245
|
* @param clientIsSummarizer - Whether or not the client is the
|
|
246
246
|
* {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.
|
|
@@ -254,7 +254,7 @@ export interface IDocumentServiceFactory {
|
|
|
254
254
|
*
|
|
255
255
|
* @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary
|
|
256
256
|
* should be posted later, before connecting to ordering service.
|
|
257
|
-
* @param createNewResolvedUrl - Endpoint URL data.
|
|
257
|
+
* @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.
|
|
258
258
|
* @param logger - Optional telemetry logger to which telemetry events will be forwarded.
|
|
259
259
|
* @param clientIsSummarizer - Whether or not the client is the
|
|
260
260
|
* {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.
|
package/dist/storage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EACH,cAAc,EACd,OAAO,EACP,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,EACL,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,QAAQ,EACX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IAC/B;;;OAGG;IACH,QAAQ,EAAE,yBAAyB,EAAE,CAAC;IAEtC;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;OASG;IACH,GAAG,CACC,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EAAE,YAAY;IAC1B,EAAE,EAAE,MAAM,EAAE,YAAY;IACxB,WAAW,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAClC;AAED,oBAAY,aAAa,CAAC,CAAC,IAAI;IAAE,IAAI,EAAE,IAAI,CAAC;CAAE,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;CAAE,CAAC;AAE5E;;GAEG;
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC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
|
package/dist/storage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA+OH,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC3B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACZ,CAAC,EAVW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAU9B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, IEventProvider, IErrorEvent, ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n ConnectionMode,\n IClient,\n IClientConfiguration,\n ICreateBlobResponse,\n IDocumentMessage,\n INack,\n ISequencedDocumentMessage,\n ISignalClient,\n ISignalMessage,\n ISnapshotTree,\n ISummaryHandle,\n ISummaryTree,\n ITokenClaims,\n IVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { IResolvedUrl } from \"./urlResolver\";\n\nexport interface IDeltasFetchResult {\n /**\n * Sequential set of messages starting from 'from' sequence number.\n * May be partial result, i.e. not fulfill original request in full.\n */\n messages: ISequencedDocumentMessage[];\n\n /**\n * If true, storage only partially fulfilled request, but has more ops\n * If false, the request was fulfilled. If less ops were returned then\n * requested, then storage does not have more ops in this range.\n */\n partialResult: boolean;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDeltaStorageService {\n /**\n * Retrieves all the delta operations within the inclusive sequence number range\n * @param tenantId - Id of the tenant.\n * @param id - document id.\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n fetchReason?: string,\n ): Promise<IDeltasFetchResult>;\n}\n\nexport type IStreamResult<T> = { done: true; } | { done: false; value: T; };\n\n/**\n * Read interface for the Queue\n */\n export interface IStream<T> {\n read(): Promise<IStreamResult<T>>;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDocumentDeltaStorageService {\n /**\n * Retrieves all the delta operations within the exclusive sequence number range\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param abortSignal - signal that aborts operation\n * @param cachedOnly - return only cached ops, i.e. ops available locally on client.\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]>;\n}\n\nexport interface IDocumentStorageServicePolicies {\n readonly caching?: LoaderCachingPolicy;\n\n // If this policy is provided, it tells runtime on ideal size for blobs\n // Blobs that are smaller than that size should be aggregated into bigger blobs\n readonly minBlobSize?: number;\n\n /**\n * This policy tells the runtime that the driver will not use cached snapshots older than this value.\n */\n readonly maximumCacheDurationMs?: number;\n}\n\n/**\n * Interface to provide access to snapshots saved for a shared object\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\n repositoryUrl: string;\n\n /**\n * Policies implemented/instructed by driver.\n */\n readonly policies?: IDocumentStorageServicePolicies;\n\n /**\n * Returns the snapshot tree.\n * @param version - Version of the snapshot to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n /**\n * Retrieves all versions of the document starting at the specified versionId - or null if from the head\n * @param versionId - Version id of the requested version.\n * @param count - Number of the versions to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n getVersions(versionId: string | null, count: number, scenarioName?: string): Promise<IVersion[]>;\n\n /**\n * Creates a blob out of the given buffer\n */\n createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n /**\n * Reads the object with the given ID, returns content in arrayBufferLike\n */\n readBlob(id: string): Promise<ArrayBufferLike>;\n\n /**\n * Uploads a summary tree to storage using the given context for reference of previous summary handle.\n * The ISummaryHandles in the uploaded tree should have paths to indicate which summary object they are\n * referencing from the previously acked summary.\n * Returns the uploaded summary handle.\n */\n uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n /**\n * Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the\n * server has deleted it this call may result in a broken promise.\n */\n downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n\nexport interface IDocumentDeltaConnectionEvents extends IErrorEvent {\n (event: \"nack\", listener: (documentId: string, message: INack[]) => void);\n (event: \"disconnect\", listener: (reason: any) => void);\n (event: \"op\", listener: (documentId: string, messages: ISequencedDocumentMessage[]) => void);\n (event: \"signal\", listener: (message: ISignalMessage) => void);\n (event: \"pong\", listener: (latency: number) => void);\n (event: \"error\", listener: (error: any) => void);\n}\n\nexport interface IDocumentDeltaConnection extends IDisposable, IEventProvider<IDocumentDeltaConnectionEvents> {\n /**\n * ClientID for the connection\n */\n clientId: string;\n\n /**\n * Claims for the client\n */\n claims: ITokenClaims;\n\n /**\n * Mode of the client\n */\n mode: ConnectionMode;\n\n /**\n * Whether the connection was made to a new or existing document\n */\n existing: boolean;\n\n /**\n * Protocol version being used with the service\n */\n version: string;\n\n /**\n * Messages sent during the connection\n */\n initialMessages: ISequencedDocumentMessage[];\n\n /**\n * Signals sent during the connection\n */\n initialSignals: ISignalMessage[];\n\n /**\n * Prior clients already connected.\n */\n initialClients: ISignalClient[];\n\n /**\n * Configuration details provided by the service\n */\n serviceConfiguration: IClientConfiguration;\n\n /**\n * Last known sequence number to ordering service at the time of connection\n * It may lap actual last sequence number (quite a bit, if container is very active).\n * But it's best information for client to figure out how far it is behind, at least\n * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n * that is likely to be more up-to-date.\n */\n checkpointSequenceNumber?: number;\n\n /**\n * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n * it could contain info like build version, environment, region etc. These properties can be logged by client\n * to better understand server environment etc. and use it in case error occurs.\n * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n */\n relayServiceAgent?: string;\n\n /**\n * Submit a new message to the server\n */\n submit(messages: IDocumentMessage[]): void;\n\n /**\n * Submit a new signal to the server\n */\n submitSignal(message: any): void;\n}\n\nexport enum LoaderCachingPolicy {\n /**\n * The loader should not implement any prefetching or caching policy.\n */\n NoCaching,\n\n /**\n * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n */\n Prefetch,\n}\n\nexport interface IDocumentServicePolicies {\n /**\n * Do not connect to delta stream\n */\n readonly storageOnly?: boolean;\n}\n\nexport interface IDocumentService {\n\n resolvedUrl: IResolvedUrl;\n\n /**\n * Policies implemented/instructed by driver.\n */\n policies?: IDocumentServicePolicies;\n\n /**\n * Access to storage associated with the document...\n */\n connectToStorage(): Promise<IDocumentStorageService>;\n\n /**\n * Access to delta storage associated with the document\n */\n connectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;\n\n /**\n * Subscribes to the document delta stream\n */\n connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;\n\n /**\n * Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed).\n * Useful for storage to commit any pending state if any (including any local caching).\n * Please note that it does not remove the need for caller to close all active delta connections,\n * as storage may not be tracking such objects.\n * @param error - tells if container (and storage) are closed due to critical error.\n * Error might be due to disconnect between client & server knowlege about file, like file being overwritten\n * in storage, but client having stale local cache.\n * If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.\n */\n dispose(error?: any): void;\n}\n\nexport interface IDocumentServiceFactory {\n /**\n * Name of the protocol used by factory\n */\n protocolName: string;\n\n /**\n * Creates the document service after extracting different endpoints URLs from a resolved URL.\n *\n * @param resolvedUrl - Endpoint URL data. @see {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n *\n * @returns An instance of {@link IDocumentService}.\n */\n createDocumentService(\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n\n /**\n * Creates a new document with the provided options. Returns the document service.\n *\n * @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary\n * should be posted later, before connecting to ordering service.\n * @param createNewResolvedUrl - Endpoint URL data. @see {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n */\n createContainer(\n createNewSummary: ISummaryTree | undefined,\n createNewResolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n}\n\n/**\n * Context for uploading a summary to storage.\n * Indicates the previously acked summary.\n */\nexport interface ISummaryContext {\n /**\n * Parent summary proposed handle (from summary op)\n */\n readonly proposalHandle: string | undefined;\n\n /**\n * Parent summary acked handle (from summary ack)\n */\n readonly ackHandle: string | undefined;\n\n readonly referenceSequenceNumber: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA+OH,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC3B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACZ,CAAC,EAVW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAU9B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, IEventProvider, IErrorEvent, ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n ConnectionMode,\n IClient,\n IClientConfiguration,\n ICreateBlobResponse,\n IDocumentMessage,\n INack,\n ISequencedDocumentMessage,\n ISignalClient,\n ISignalMessage,\n ISnapshotTree,\n ISummaryHandle,\n ISummaryTree,\n ITokenClaims,\n IVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { IResolvedUrl } from \"./urlResolver\";\n\nexport interface IDeltasFetchResult {\n /**\n * Sequential set of messages starting from 'from' sequence number.\n * May be partial result, i.e. not fulfill original request in full.\n */\n messages: ISequencedDocumentMessage[];\n\n /**\n * If true, storage only partially fulfilled request, but has more ops\n * If false, the request was fulfilled. If less ops were returned then\n * requested, then storage does not have more ops in this range.\n */\n partialResult: boolean;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDeltaStorageService {\n /**\n * Retrieves all the delta operations within the inclusive sequence number range\n * @param tenantId - Id of the tenant.\n * @param id - document id.\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n fetchReason?: string,\n ): Promise<IDeltasFetchResult>;\n}\n\nexport type IStreamResult<T> = { done: true; } | { done: false; value: T; };\n\n/**\n * Read interface for the Queue\n */\nexport interface IStream<T> {\n read(): Promise<IStreamResult<T>>;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDocumentDeltaStorageService {\n /**\n * Retrieves all the delta operations within the exclusive sequence number range\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param abortSignal - signal that aborts operation\n * @param cachedOnly - return only cached ops, i.e. ops available locally on client.\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]>;\n}\n\nexport interface IDocumentStorageServicePolicies {\n readonly caching?: LoaderCachingPolicy;\n\n // If this policy is provided, it tells runtime on ideal size for blobs\n // Blobs that are smaller than that size should be aggregated into bigger blobs\n readonly minBlobSize?: number;\n\n /**\n * This policy tells the runtime that the driver will not use cached snapshots older than this value.\n */\n readonly maximumCacheDurationMs?: number;\n}\n\n/**\n * Interface to provide access to snapshots saved for a shared object\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\n repositoryUrl: string;\n\n /**\n * Policies implemented/instructed by driver.\n */\n readonly policies?: IDocumentStorageServicePolicies;\n\n /**\n * Returns the snapshot tree.\n * @param version - Version of the snapshot to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n /**\n * Retrieves all versions of the document starting at the specified versionId - or null if from the head\n * @param versionId - Version id of the requested version.\n * @param count - Number of the versions to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n getVersions(versionId: string | null, count: number, scenarioName?: string): Promise<IVersion[]>;\n\n /**\n * Creates a blob out of the given buffer\n */\n createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n /**\n * Reads the object with the given ID, returns content in arrayBufferLike\n */\n readBlob(id: string): Promise<ArrayBufferLike>;\n\n /**\n * Uploads a summary tree to storage using the given context for reference of previous summary handle.\n * The ISummaryHandles in the uploaded tree should have paths to indicate which summary object they are\n * referencing from the previously acked summary.\n * Returns the uploaded summary handle.\n */\n uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n /**\n * Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the\n * server has deleted it this call may result in a broken promise.\n */\n downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n\nexport interface IDocumentDeltaConnectionEvents extends IErrorEvent {\n (event: \"nack\", listener: (documentId: string, message: INack[]) => void);\n (event: \"disconnect\", listener: (reason: any) => void);\n (event: \"op\", listener: (documentId: string, messages: ISequencedDocumentMessage[]) => void);\n (event: \"signal\", listener: (message: ISignalMessage) => void);\n (event: \"pong\", listener: (latency: number) => void);\n (event: \"error\", listener: (error: any) => void);\n}\n\nexport interface IDocumentDeltaConnection extends IDisposable, IEventProvider<IDocumentDeltaConnectionEvents> {\n /**\n * ClientID for the connection\n */\n clientId: string;\n\n /**\n * Claims for the client\n */\n claims: ITokenClaims;\n\n /**\n * Mode of the client\n */\n mode: ConnectionMode;\n\n /**\n * Whether the connection was made to a new or existing document\n */\n existing: boolean;\n\n /**\n * Protocol version being used with the service\n */\n version: string;\n\n /**\n * Messages sent during the connection\n */\n initialMessages: ISequencedDocumentMessage[];\n\n /**\n * Signals sent during the connection\n */\n initialSignals: ISignalMessage[];\n\n /**\n * Prior clients already connected.\n */\n initialClients: ISignalClient[];\n\n /**\n * Configuration details provided by the service\n */\n serviceConfiguration: IClientConfiguration;\n\n /**\n * Last known sequence number to ordering service at the time of connection\n * It may lap actual last sequence number (quite a bit, if container is very active).\n * But it's best information for client to figure out how far it is behind, at least\n * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n * that is likely to be more up-to-date.\n */\n checkpointSequenceNumber?: number;\n\n /**\n * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n * it could contain info like build version, environment, region etc. These properties can be logged by client\n * to better understand server environment etc. and use it in case error occurs.\n * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n */\n relayServiceAgent?: string;\n\n /**\n * Submit a new message to the server\n */\n submit(messages: IDocumentMessage[]): void;\n\n /**\n * Submit a new signal to the server\n */\n submitSignal(message: any): void;\n}\n\nexport enum LoaderCachingPolicy {\n /**\n * The loader should not implement any prefetching or caching policy.\n */\n NoCaching,\n\n /**\n * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n */\n Prefetch,\n}\n\nexport interface IDocumentServicePolicies {\n /**\n * Do not connect to delta stream\n */\n readonly storageOnly?: boolean;\n}\n\nexport interface IDocumentService {\n\n resolvedUrl: IResolvedUrl;\n\n /**\n * Policies implemented/instructed by driver.\n */\n policies?: IDocumentServicePolicies;\n\n /**\n * Access to storage associated with the document...\n */\n connectToStorage(): Promise<IDocumentStorageService>;\n\n /**\n * Access to delta storage associated with the document\n */\n connectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;\n\n /**\n * Subscribes to the document delta stream\n */\n connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;\n\n /**\n * Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed).\n * Useful for storage to commit any pending state if any (including any local caching).\n * Please note that it does not remove the need for caller to close all active delta connections,\n * as storage may not be tracking such objects.\n * @param error - tells if container (and storage) are closed due to critical error.\n * Error might be due to disconnect between client & server knowlege about file, like file being overwritten\n * in storage, but client having stale local cache.\n * If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.\n */\n dispose(error?: any): void;\n}\n\nexport interface IDocumentServiceFactory {\n /**\n * Name of the protocol used by factory\n */\n protocolName: string;\n\n /**\n * Creates the document service after extracting different endpoints URLs from a resolved URL.\n *\n * @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n *\n * @returns An instance of {@link IDocumentService}.\n */\n createDocumentService(\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n\n /**\n * Creates a new document with the provided options. Returns the document service.\n *\n * @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary\n * should be posted later, before connecting to ordering service.\n * @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n */\n createContainer(\n createNewSummary: ISummaryTree | undefined,\n createNewResolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n}\n\n/**\n * Context for uploading a summary to storage.\n * Indicates the previously acked summary.\n */\nexport interface ISummaryContext {\n /**\n * Parent summary proposed handle (from summary op)\n */\n readonly proposalHandle: string | undefined;\n\n /**\n * Parent summary acked handle (from summary ack)\n */\n readonly ackHandle: string | undefined;\n\n readonly referenceSequenceNumber: number;\n}\n"]}
|
package/dist/urlResolver.d.ts
CHANGED
|
@@ -36,6 +36,13 @@ export interface IContainerPackageInfo {
|
|
|
36
36
|
}
|
|
37
37
|
export interface IUrlResolver {
|
|
38
38
|
resolve(request: IRequest): Promise<IResolvedUrl | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a url for the created container with any data store path given in the relative url.
|
|
41
|
+
* @param resolvedUrl - resolved url for the container.
|
|
42
|
+
* @param relativeUrl - relative url containing data store path; '/' represents root path.
|
|
43
|
+
* @param packageInfoSource - optional, represents container package information to be included in url.
|
|
44
|
+
* @returns absolute url combining container url with dta store path and optional additional information.
|
|
45
|
+
*/
|
|
39
46
|
getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string, packageInfoSource?: IContainerPackageInfo): Promise<string>;
|
|
40
47
|
}
|
|
41
48
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlResolver.d.ts","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"A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d;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KAAE,CAAC;IACpC,SAAS,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KAAE,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAKzB,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,cAAc,CACV,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,qBAAqB,GAC1C,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB;AAED;;;EAGE;AACF,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAEH;;GAEG;AACH,oBAAY,YAAY;IAEpB,iBAAiB,4BAA4B;IAE7C,SAAS,cAAc;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC1C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC;CACjC;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAE7C,UAAiB,cAAe,SAAQ,OAAO,CAAC,aAAa,CAAC;KAAI;CACrE"}
|
package/dist/urlResolver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":";;;AA4EA;;GAEG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,qDAAqD;IACrD,6DAA6C,CAAA;IAC7C,iDAAiD;IACjD,uCAAuB,CAAA;AAC3B,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest } from \"@fluidframework/core-interfaces\";\n\nexport type IResolvedUrl = IWebResolvedUrl | IFluidResolvedUrl;\n\nexport interface IResolvedUrlBase {\n type: string;\n}\n\nexport interface IWebResolvedUrl extends IResolvedUrlBase {\n type: \"web\";\n data: string;\n}\n\nexport interface IFluidResolvedUrl extends IResolvedUrlBase {\n type: \"fluid\";\n /**\n * The id of the container this resolved url is for.\n */\n id: string;\n url: string;\n tokens: { [name: string]: string; };\n endpoints: { [name: string]: string; };\n}\n\n/**\n * Container package info handed off to resolver.\n */\nexport interface IContainerPackageInfo {\n /**\n * Container package name.\n */\n name: string;\n}\n\nexport interface IUrlResolver {\n\n // Like DNS should be able to cache resolution requests. Then possibly just have a token provider go and do stuff?\n // the expiration of it could be relative to the lifetime of the token? Requests after need to refresh?\n // or do we split the token access from this?\n resolve(request: IRequest): Promise<IResolvedUrl | undefined>;\n\n /**\n * Creates a url for the created container with any data store path given in the relative url.\n * @param resolvedUrl - resolved url for the container.\n * @param relativeUrl - relative url containing data store path; '/' represents root path.\n * @param packageInfoSource - optional, represents container package information to be included in url.\n * @returns absolute url combining container url with dta store path and optional additional information.\n */\n getAbsoluteUrl(\n resolvedUrl: IResolvedUrl,\n relativeUrl: string,\n packageInfoSource?: IContainerPackageInfo,\n ): Promise<string>;\n}\n\n/**\n* Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL\n* for driver compatibility and preload information.\n*/\nexport interface DriverPreCheckInfo {\n /**\n * A code details hint that can potentially be used to prefetch container code prior to having a snapshot.\n */\n codeDetailsHint?: string;\n\n /**\n * Domains that will be connected to on the critical boot path. Hosts can choose to preconnect to these for\n * improved performance.\n */\n criticalBootDomains?: string[];\n }\n\n/**\n * Additional key in the loader request header\n */\nexport enum DriverHeader {\n // Key to indicate whether the request for summarizer\n summarizingClient = \"fluid-client-summarizer\",\n // createNew information, specific to each driver\n createNew = \"createNew\",\n}\n\nexport interface IDriverHeader {\n [DriverHeader.summarizingClient]: boolean;\n [DriverHeader.createNew]: any;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n export interface IRequestHeader extends Partial<IDriverHeader> { }\n}\n"]}
|
package/lib/storage.d.ts
CHANGED
|
@@ -240,7 +240,7 @@ export interface IDocumentServiceFactory {
|
|
|
240
240
|
/**
|
|
241
241
|
* Creates the document service after extracting different endpoints URLs from a resolved URL.
|
|
242
242
|
*
|
|
243
|
-
* @param resolvedUrl - Endpoint URL data.
|
|
243
|
+
* @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.
|
|
244
244
|
* @param logger - Optional telemetry logger to which telemetry events will be forwarded.
|
|
245
245
|
* @param clientIsSummarizer - Whether or not the client is the
|
|
246
246
|
* {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.
|
|
@@ -254,7 +254,7 @@ export interface IDocumentServiceFactory {
|
|
|
254
254
|
*
|
|
255
255
|
* @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary
|
|
256
256
|
* should be posted later, before connecting to ordering service.
|
|
257
|
-
* @param createNewResolvedUrl - Endpoint URL data.
|
|
257
|
+
* @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.
|
|
258
258
|
* @param logger - Optional telemetry logger to which telemetry events will be forwarded.
|
|
259
259
|
* @param clientIsSummarizer - Whether or not the client is the
|
|
260
260
|
* {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.
|
package/lib/storage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EACH,cAAc,EACd,OAAO,EACP,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,EACL,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,QAAQ,EACX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IAC/B;;;OAGG;IACH,QAAQ,EAAE,yBAAyB,EAAE,CAAC;IAEtC;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;OASG;IACH,GAAG,CACC,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EAAE,YAAY;IAC1B,EAAE,EAAE,MAAM,EAAE,YAAY;IACxB,WAAW,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAClC;AAED,oBAAY,aAAa,CAAC,CAAC,IAAI;IAAE,IAAI,EAAE,IAAI,CAAC;CAAE,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;CAAE,CAAC;AAE5E;;GAEG;
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EACH,cAAc,EACd,OAAO,EACP,oBAAoB,EACpB,mBAAmB,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,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+OH,MAAM,CAAN,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC3B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACZ,CAAC,EAVW,mBAAmB,KAAnB,mBAAmB,QAU9B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, IEventProvider, IErrorEvent, ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n ConnectionMode,\n IClient,\n IClientConfiguration,\n ICreateBlobResponse,\n IDocumentMessage,\n INack,\n ISequencedDocumentMessage,\n ISignalClient,\n ISignalMessage,\n ISnapshotTree,\n ISummaryHandle,\n ISummaryTree,\n ITokenClaims,\n IVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { IResolvedUrl } from \"./urlResolver\";\n\nexport interface IDeltasFetchResult {\n /**\n * Sequential set of messages starting from 'from' sequence number.\n * May be partial result, i.e. not fulfill original request in full.\n */\n messages: ISequencedDocumentMessage[];\n\n /**\n * If true, storage only partially fulfilled request, but has more ops\n * If false, the request was fulfilled. If less ops were returned then\n * requested, then storage does not have more ops in this range.\n */\n partialResult: boolean;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDeltaStorageService {\n /**\n * Retrieves all the delta operations within the inclusive sequence number range\n * @param tenantId - Id of the tenant.\n * @param id - document id.\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n fetchReason?: string,\n ): Promise<IDeltasFetchResult>;\n}\n\nexport type IStreamResult<T> = { done: true; } | { done: false; value: T; };\n\n/**\n * Read interface for the Queue\n */\n export interface IStream<T> {\n read(): Promise<IStreamResult<T>>;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDocumentDeltaStorageService {\n /**\n * Retrieves all the delta operations within the exclusive sequence number range\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param abortSignal - signal that aborts operation\n * @param cachedOnly - return only cached ops, i.e. ops available locally on client.\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]>;\n}\n\nexport interface IDocumentStorageServicePolicies {\n readonly caching?: LoaderCachingPolicy;\n\n // If this policy is provided, it tells runtime on ideal size for blobs\n // Blobs that are smaller than that size should be aggregated into bigger blobs\n readonly minBlobSize?: number;\n\n /**\n * This policy tells the runtime that the driver will not use cached snapshots older than this value.\n */\n readonly maximumCacheDurationMs?: number;\n}\n\n/**\n * Interface to provide access to snapshots saved for a shared object\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\n repositoryUrl: string;\n\n /**\n * Policies implemented/instructed by driver.\n */\n readonly policies?: IDocumentStorageServicePolicies;\n\n /**\n * Returns the snapshot tree.\n * @param version - Version of the snapshot to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n /**\n * Retrieves all versions of the document starting at the specified versionId - or null if from the head\n * @param versionId - Version id of the requested version.\n * @param count - Number of the versions to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n getVersions(versionId: string | null, count: number, scenarioName?: string): Promise<IVersion[]>;\n\n /**\n * Creates a blob out of the given buffer\n */\n createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n /**\n * Reads the object with the given ID, returns content in arrayBufferLike\n */\n readBlob(id: string): Promise<ArrayBufferLike>;\n\n /**\n * Uploads a summary tree to storage using the given context for reference of previous summary handle.\n * The ISummaryHandles in the uploaded tree should have paths to indicate which summary object they are\n * referencing from the previously acked summary.\n * Returns the uploaded summary handle.\n */\n uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n /**\n * Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the\n * server has deleted it this call may result in a broken promise.\n */\n downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n\nexport interface IDocumentDeltaConnectionEvents extends IErrorEvent {\n (event: \"nack\", listener: (documentId: string, message: INack[]) => void);\n (event: \"disconnect\", listener: (reason: any) => void);\n (event: \"op\", listener: (documentId: string, messages: ISequencedDocumentMessage[]) => void);\n (event: \"signal\", listener: (message: ISignalMessage) => void);\n (event: \"pong\", listener: (latency: number) => void);\n (event: \"error\", listener: (error: any) => void);\n}\n\nexport interface IDocumentDeltaConnection extends IDisposable, IEventProvider<IDocumentDeltaConnectionEvents> {\n /**\n * ClientID for the connection\n */\n clientId: string;\n\n /**\n * Claims for the client\n */\n claims: ITokenClaims;\n\n /**\n * Mode of the client\n */\n mode: ConnectionMode;\n\n /**\n * Whether the connection was made to a new or existing document\n */\n existing: boolean;\n\n /**\n * Protocol version being used with the service\n */\n version: string;\n\n /**\n * Messages sent during the connection\n */\n initialMessages: ISequencedDocumentMessage[];\n\n /**\n * Signals sent during the connection\n */\n initialSignals: ISignalMessage[];\n\n /**\n * Prior clients already connected.\n */\n initialClients: ISignalClient[];\n\n /**\n * Configuration details provided by the service\n */\n serviceConfiguration: IClientConfiguration;\n\n /**\n * Last known sequence number to ordering service at the time of connection\n * It may lap actual last sequence number (quite a bit, if container is very active).\n * But it's best information for client to figure out how far it is behind, at least\n * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n * that is likely to be more up-to-date.\n */\n checkpointSequenceNumber?: number;\n\n /**\n * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n * it could contain info like build version, environment, region etc. These properties can be logged by client\n * to better understand server environment etc. and use it in case error occurs.\n * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n */\n relayServiceAgent?: string;\n\n /**\n * Submit a new message to the server\n */\n submit(messages: IDocumentMessage[]): void;\n\n /**\n * Submit a new signal to the server\n */\n submitSignal(message: any): void;\n}\n\nexport enum LoaderCachingPolicy {\n /**\n * The loader should not implement any prefetching or caching policy.\n */\n NoCaching,\n\n /**\n * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n */\n Prefetch,\n}\n\nexport interface IDocumentServicePolicies {\n /**\n * Do not connect to delta stream\n */\n readonly storageOnly?: boolean;\n}\n\nexport interface IDocumentService {\n\n resolvedUrl: IResolvedUrl;\n\n /**\n * Policies implemented/instructed by driver.\n */\n policies?: IDocumentServicePolicies;\n\n /**\n * Access to storage associated with the document...\n */\n connectToStorage(): Promise<IDocumentStorageService>;\n\n /**\n * Access to delta storage associated with the document\n */\n connectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;\n\n /**\n * Subscribes to the document delta stream\n */\n connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;\n\n /**\n * Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed).\n * Useful for storage to commit any pending state if any (including any local caching).\n * Please note that it does not remove the need for caller to close all active delta connections,\n * as storage may not be tracking such objects.\n * @param error - tells if container (and storage) are closed due to critical error.\n * Error might be due to disconnect between client & server knowlege about file, like file being overwritten\n * in storage, but client having stale local cache.\n * If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.\n */\n dispose(error?: any): void;\n}\n\nexport interface IDocumentServiceFactory {\n /**\n * Name of the protocol used by factory\n */\n protocolName: string;\n\n /**\n * Creates the document service after extracting different endpoints URLs from a resolved URL.\n *\n * @param resolvedUrl - Endpoint URL data. @see {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n *\n * @returns An instance of {@link IDocumentService}.\n */\n createDocumentService(\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n\n /**\n * Creates a new document with the provided options. Returns the document service.\n *\n * @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary\n * should be posted later, before connecting to ordering service.\n * @param createNewResolvedUrl - Endpoint URL data. @see {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n */\n createContainer(\n createNewSummary: ISummaryTree | undefined,\n createNewResolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n}\n\n/**\n * Context for uploading a summary to storage.\n * Indicates the previously acked summary.\n */\nexport interface ISummaryContext {\n /**\n * Parent summary proposed handle (from summary op)\n */\n readonly proposalHandle: string | undefined;\n\n /**\n * Parent summary acked handle (from summary ack)\n */\n readonly ackHandle: string | undefined;\n\n readonly referenceSequenceNumber: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+OH,MAAM,CAAN,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC3B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACZ,CAAC,EAVW,mBAAmB,KAAnB,mBAAmB,QAU9B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, IEventProvider, IErrorEvent, ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n ConnectionMode,\n IClient,\n IClientConfiguration,\n ICreateBlobResponse,\n IDocumentMessage,\n INack,\n ISequencedDocumentMessage,\n ISignalClient,\n ISignalMessage,\n ISnapshotTree,\n ISummaryHandle,\n ISummaryTree,\n ITokenClaims,\n IVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { IResolvedUrl } from \"./urlResolver\";\n\nexport interface IDeltasFetchResult {\n /**\n * Sequential set of messages starting from 'from' sequence number.\n * May be partial result, i.e. not fulfill original request in full.\n */\n messages: ISequencedDocumentMessage[];\n\n /**\n * If true, storage only partially fulfilled request, but has more ops\n * If false, the request was fulfilled. If less ops were returned then\n * requested, then storage does not have more ops in this range.\n */\n partialResult: boolean;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDeltaStorageService {\n /**\n * Retrieves all the delta operations within the inclusive sequence number range\n * @param tenantId - Id of the tenant.\n * @param id - document id.\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n fetchReason?: string,\n ): Promise<IDeltasFetchResult>;\n}\n\nexport type IStreamResult<T> = { done: true; } | { done: false; value: T; };\n\n/**\n * Read interface for the Queue\n */\nexport interface IStream<T> {\n read(): Promise<IStreamResult<T>>;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDocumentDeltaStorageService {\n /**\n * Retrieves all the delta operations within the exclusive sequence number range\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param abortSignal - signal that aborts operation\n * @param cachedOnly - return only cached ops, i.e. ops available locally on client.\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]>;\n}\n\nexport interface IDocumentStorageServicePolicies {\n readonly caching?: LoaderCachingPolicy;\n\n // If this policy is provided, it tells runtime on ideal size for blobs\n // Blobs that are smaller than that size should be aggregated into bigger blobs\n readonly minBlobSize?: number;\n\n /**\n * This policy tells the runtime that the driver will not use cached snapshots older than this value.\n */\n readonly maximumCacheDurationMs?: number;\n}\n\n/**\n * Interface to provide access to snapshots saved for a shared object\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\n repositoryUrl: string;\n\n /**\n * Policies implemented/instructed by driver.\n */\n readonly policies?: IDocumentStorageServicePolicies;\n\n /**\n * Returns the snapshot tree.\n * @param version - Version of the snapshot to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n /**\n * Retrieves all versions of the document starting at the specified versionId - or null if from the head\n * @param versionId - Version id of the requested version.\n * @param count - Number of the versions to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n getVersions(versionId: string | null, count: number, scenarioName?: string): Promise<IVersion[]>;\n\n /**\n * Creates a blob out of the given buffer\n */\n createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n /**\n * Reads the object with the given ID, returns content in arrayBufferLike\n */\n readBlob(id: string): Promise<ArrayBufferLike>;\n\n /**\n * Uploads a summary tree to storage using the given context for reference of previous summary handle.\n * The ISummaryHandles in the uploaded tree should have paths to indicate which summary object they are\n * referencing from the previously acked summary.\n * Returns the uploaded summary handle.\n */\n uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n /**\n * Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the\n * server has deleted it this call may result in a broken promise.\n */\n downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n\nexport interface IDocumentDeltaConnectionEvents extends IErrorEvent {\n (event: \"nack\", listener: (documentId: string, message: INack[]) => void);\n (event: \"disconnect\", listener: (reason: any) => void);\n (event: \"op\", listener: (documentId: string, messages: ISequencedDocumentMessage[]) => void);\n (event: \"signal\", listener: (message: ISignalMessage) => void);\n (event: \"pong\", listener: (latency: number) => void);\n (event: \"error\", listener: (error: any) => void);\n}\n\nexport interface IDocumentDeltaConnection extends IDisposable, IEventProvider<IDocumentDeltaConnectionEvents> {\n /**\n * ClientID for the connection\n */\n clientId: string;\n\n /**\n * Claims for the client\n */\n claims: ITokenClaims;\n\n /**\n * Mode of the client\n */\n mode: ConnectionMode;\n\n /**\n * Whether the connection was made to a new or existing document\n */\n existing: boolean;\n\n /**\n * Protocol version being used with the service\n */\n version: string;\n\n /**\n * Messages sent during the connection\n */\n initialMessages: ISequencedDocumentMessage[];\n\n /**\n * Signals sent during the connection\n */\n initialSignals: ISignalMessage[];\n\n /**\n * Prior clients already connected.\n */\n initialClients: ISignalClient[];\n\n /**\n * Configuration details provided by the service\n */\n serviceConfiguration: IClientConfiguration;\n\n /**\n * Last known sequence number to ordering service at the time of connection\n * It may lap actual last sequence number (quite a bit, if container is very active).\n * But it's best information for client to figure out how far it is behind, at least\n * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n * that is likely to be more up-to-date.\n */\n checkpointSequenceNumber?: number;\n\n /**\n * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n * it could contain info like build version, environment, region etc. These properties can be logged by client\n * to better understand server environment etc. and use it in case error occurs.\n * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n */\n relayServiceAgent?: string;\n\n /**\n * Submit a new message to the server\n */\n submit(messages: IDocumentMessage[]): void;\n\n /**\n * Submit a new signal to the server\n */\n submitSignal(message: any): void;\n}\n\nexport enum LoaderCachingPolicy {\n /**\n * The loader should not implement any prefetching or caching policy.\n */\n NoCaching,\n\n /**\n * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n */\n Prefetch,\n}\n\nexport interface IDocumentServicePolicies {\n /**\n * Do not connect to delta stream\n */\n readonly storageOnly?: boolean;\n}\n\nexport interface IDocumentService {\n\n resolvedUrl: IResolvedUrl;\n\n /**\n * Policies implemented/instructed by driver.\n */\n policies?: IDocumentServicePolicies;\n\n /**\n * Access to storage associated with the document...\n */\n connectToStorage(): Promise<IDocumentStorageService>;\n\n /**\n * Access to delta storage associated with the document\n */\n connectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;\n\n /**\n * Subscribes to the document delta stream\n */\n connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;\n\n /**\n * Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed).\n * Useful for storage to commit any pending state if any (including any local caching).\n * Please note that it does not remove the need for caller to close all active delta connections,\n * as storage may not be tracking such objects.\n * @param error - tells if container (and storage) are closed due to critical error.\n * Error might be due to disconnect between client & server knowlege about file, like file being overwritten\n * in storage, but client having stale local cache.\n * If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.\n */\n dispose(error?: any): void;\n}\n\nexport interface IDocumentServiceFactory {\n /**\n * Name of the protocol used by factory\n */\n protocolName: string;\n\n /**\n * Creates the document service after extracting different endpoints URLs from a resolved URL.\n *\n * @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n *\n * @returns An instance of {@link IDocumentService}.\n */\n createDocumentService(\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n\n /**\n * Creates a new document with the provided options. Returns the document service.\n *\n * @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary\n * should be posted later, before connecting to ordering service.\n * @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n */\n createContainer(\n createNewSummary: ISummaryTree | undefined,\n createNewResolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n}\n\n/**\n * Context for uploading a summary to storage.\n * Indicates the previously acked summary.\n */\nexport interface ISummaryContext {\n /**\n * Parent summary proposed handle (from summary op)\n */\n readonly proposalHandle: string | undefined;\n\n /**\n * Parent summary acked handle (from summary ack)\n */\n readonly ackHandle: string | undefined;\n\n readonly referenceSequenceNumber: number;\n}\n"]}
|
package/lib/urlResolver.d.ts
CHANGED
|
@@ -36,6 +36,13 @@ export interface IContainerPackageInfo {
|
|
|
36
36
|
}
|
|
37
37
|
export interface IUrlResolver {
|
|
38
38
|
resolve(request: IRequest): Promise<IResolvedUrl | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a url for the created container with any data store path given in the relative url.
|
|
41
|
+
* @param resolvedUrl - resolved url for the container.
|
|
42
|
+
* @param relativeUrl - relative url containing data store path; '/' represents root path.
|
|
43
|
+
* @param packageInfoSource - optional, represents container package information to be included in url.
|
|
44
|
+
* @returns absolute url combining container url with dta store path and optional additional information.
|
|
45
|
+
*/
|
|
39
46
|
getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string, packageInfoSource?: IContainerPackageInfo): Promise<string>;
|
|
40
47
|
}
|
|
41
48
|
/**
|
package/lib/urlResolver.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlResolver.d.ts","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MA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AG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KAAE,CAAC;IACpC,SAAS,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KAAE,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAKzB,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,cAAc,CACV,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,qBAAqB,GAC1C,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB;AAED;;;EAGE;AACF,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAEH;;GAEG;AACH,oBAAY,YAAY;IAEpB,iBAAiB,4BAA4B;IAE7C,SAAS,cAAc;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC1C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC;CACjC;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAE7C,UAAiB,cAAe,SAAQ,OAAO,CAAC,aAAa,CAAC;KAAI;CACrE"}
|
package/lib/urlResolver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AA4EA;;GAEG;AACH,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,qDAAqD;IACrD,6DAA6C,CAAA;IAC7C,iDAAiD;IACjD,uCAAuB,CAAA;AAC3B,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest } from \"@fluidframework/core-interfaces\";\n\nexport type IResolvedUrl = IWebResolvedUrl | IFluidResolvedUrl;\n\nexport interface IResolvedUrlBase {\n type: string;\n}\n\nexport interface IWebResolvedUrl extends IResolvedUrlBase {\n type: \"web\";\n data: string;\n}\n\nexport interface IFluidResolvedUrl extends IResolvedUrlBase {\n type: \"fluid\";\n /**\n * The id of the container this resolved url is for.\n */\n id: string;\n url: string;\n tokens: { [name: string]: string; };\n endpoints: { [name: string]: string; };\n}\n\n/**\n * Container package info handed off to resolver.\n */\nexport interface IContainerPackageInfo {\n /**\n * Container package name.\n */\n name: string;\n}\n\nexport interface IUrlResolver {\n\n // Like DNS should be able to cache resolution requests. Then possibly just have a token provider go and do stuff?\n // the expiration of it could be relative to the lifetime of the token? Requests after need to refresh?\n // or do we split the token access from this?\n resolve(request: IRequest): Promise<IResolvedUrl | undefined>;\n\n /**\n * Creates a url for the created container with any data store path given in the relative url.\n * @param resolvedUrl - resolved url for the container.\n * @param relativeUrl - relative url containing data store path; '/' represents root path.\n * @param packageInfoSource - optional, represents container package information to be included in url.\n * @returns absolute url combining container url with dta store path and optional additional information.\n */\n getAbsoluteUrl(\n resolvedUrl: IResolvedUrl,\n relativeUrl: string,\n packageInfoSource?: IContainerPackageInfo,\n ): Promise<string>;\n}\n\n/**\n* Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL\n* for driver compatibility and preload information.\n*/\nexport interface DriverPreCheckInfo {\n /**\n * A code details hint that can potentially be used to prefetch container code prior to having a snapshot.\n */\n codeDetailsHint?: string;\n\n /**\n * Domains that will be connected to on the critical boot path. Hosts can choose to preconnect to these for\n * improved performance.\n */\n criticalBootDomains?: string[];\n }\n\n/**\n * Additional key in the loader request header\n */\nexport enum DriverHeader {\n // Key to indicate whether the request for summarizer\n summarizingClient = \"fluid-client-summarizer\",\n // createNew information, specific to each driver\n createNew = \"createNew\",\n}\n\nexport interface IDriverHeader {\n [DriverHeader.summarizingClient]: boolean;\n [DriverHeader.createNew]: any;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n export interface IRequestHeader extends Partial<IDriverHeader> { }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/driver-definitions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-77818",
|
|
4
4
|
"description": "Fluid driver definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
41
|
-
"@fluidframework/core-interfaces": "
|
|
41
|
+
"@fluidframework/core-interfaces": "1.2.0-77818",
|
|
42
42
|
"@fluidframework/protocol-definitions": "^0.1028.2000"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@fluidframework/build-common": "^0.24.0",
|
|
46
46
|
"@fluidframework/build-tools": "^0.2.74327",
|
|
47
|
-
"@fluidframework/driver-definitions-previous": "npm:@fluidframework/driver-definitions
|
|
47
|
+
"@fluidframework/driver-definitions-previous": "npm:@fluidframework/driver-definitions@1.1.0",
|
|
48
48
|
"@fluidframework/eslint-config-fluid": "^0.28.2000",
|
|
49
49
|
"@microsoft/api-extractor": "^7.22.2",
|
|
50
50
|
"@rushstack/eslint-config": "^2.5.1",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"typescript-formatter": "7.1.0"
|
|
57
57
|
},
|
|
58
58
|
"typeValidation": {
|
|
59
|
-
"version": "1.
|
|
59
|
+
"version": "1.2.0",
|
|
60
60
|
"broken": {}
|
|
61
61
|
}
|
|
62
62
|
}
|
package/src/storage.ts
CHANGED
|
@@ -65,7 +65,7 @@ export type IStreamResult<T> = { done: true; } | { done: false; value: T; };
|
|
|
65
65
|
/**
|
|
66
66
|
* Read interface for the Queue
|
|
67
67
|
*/
|
|
68
|
-
|
|
68
|
+
export interface IStream<T> {
|
|
69
69
|
read(): Promise<IStreamResult<T>>;
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -83,7 +83,7 @@ export interface IDocumentDeltaStorageService {
|
|
|
83
83
|
* of Op on wire and known seq number. It should not contain any PII. It can be logged by
|
|
84
84
|
* spo which could help in debugging sessions if any issue occurs.
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
fetchMessages(from: number,
|
|
87
87
|
to: number | undefined,
|
|
88
88
|
abortSignal?: AbortSignal,
|
|
89
89
|
cachedOnly?: boolean,
|
|
@@ -305,7 +305,7 @@ export interface IDocumentServiceFactory {
|
|
|
305
305
|
/**
|
|
306
306
|
* Creates the document service after extracting different endpoints URLs from a resolved URL.
|
|
307
307
|
*
|
|
308
|
-
* @param resolvedUrl - Endpoint URL data.
|
|
308
|
+
* @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.
|
|
309
309
|
* @param logger - Optional telemetry logger to which telemetry events will be forwarded.
|
|
310
310
|
* @param clientIsSummarizer - Whether or not the client is the
|
|
311
311
|
* {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.
|
|
@@ -313,7 +313,7 @@ export interface IDocumentServiceFactory {
|
|
|
313
313
|
*
|
|
314
314
|
* @returns An instance of {@link IDocumentService}.
|
|
315
315
|
*/
|
|
316
|
-
|
|
316
|
+
createDocumentService(
|
|
317
317
|
resolvedUrl: IResolvedUrl,
|
|
318
318
|
logger?: ITelemetryBaseLogger,
|
|
319
319
|
clientIsSummarizer?: boolean,
|
|
@@ -324,7 +324,7 @@ export interface IDocumentServiceFactory {
|
|
|
324
324
|
*
|
|
325
325
|
* @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary
|
|
326
326
|
* should be posted later, before connecting to ordering service.
|
|
327
|
-
* @param createNewResolvedUrl - Endpoint URL data.
|
|
327
|
+
* @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.
|
|
328
328
|
* @param logger - Optional telemetry logger to which telemetry events will be forwarded.
|
|
329
329
|
* @param clientIsSummarizer - Whether or not the client is the
|
|
330
330
|
* {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.
|
package/src/urlResolver.ts
CHANGED
|
@@ -43,7 +43,13 @@ export interface IUrlResolver {
|
|
|
43
43
|
// or do we split the token access from this?
|
|
44
44
|
resolve(request: IRequest): Promise<IResolvedUrl | undefined>;
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Creates a url for the created container with any data store path given in the relative url.
|
|
48
|
+
* @param resolvedUrl - resolved url for the container.
|
|
49
|
+
* @param relativeUrl - relative url containing data store path; '/' represents root path.
|
|
50
|
+
* @param packageInfoSource - optional, represents container package information to be included in url.
|
|
51
|
+
* @returns absolute url combining container url with dta store path and optional additional information.
|
|
52
|
+
*/
|
|
47
53
|
getAbsoluteUrl(
|
|
48
54
|
resolvedUrl: IResolvedUrl,
|
|
49
55
|
relativeUrl: string,
|