@fluidframework/odsp-driver 2.116.1 → 2.118.0

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/api-extractor/api-extractor-lint-pointInTime.cjs.json +5 -0
  3. package/api-extractor/api-extractor-lint-pointInTime.esm.json +5 -0
  4. package/api-extractor/api-extractor-report.pointInTime.json +9 -0
  5. package/api-report/odsp-driver.legacy.alpha.api.md +28 -1
  6. package/api-report/odsp-driver.legacy.beta.api.md +28 -1
  7. package/api-report/odsp-driver.point-in-time.legacy.beta.api.md +117 -0
  8. package/dist/index.d.ts +2 -3
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +3 -5
  11. package/dist/index.js.map +1 -1
  12. package/dist/legacy.d.ts +4 -0
  13. package/dist/legacyAlpha.d.ts +4 -0
  14. package/dist/odspDocumentServiceFactory.d.ts +46 -1
  15. package/dist/odspDocumentServiceFactory.d.ts.map +1 -1
  16. package/dist/odspDocumentServiceFactory.js +60 -1
  17. package/dist/odspDocumentServiceFactory.js.map +1 -1
  18. package/dist/odspDocumentServiceFactoryCore.d.ts +74 -3
  19. package/dist/odspDocumentServiceFactoryCore.d.ts.map +1 -1
  20. package/dist/odspDocumentServiceFactoryCore.js +0 -3
  21. package/dist/odspDocumentServiceFactoryCore.js.map +1 -1
  22. package/dist/packageVersion.d.ts +1 -1
  23. package/dist/packageVersion.js +1 -1
  24. package/dist/packageVersion.js.map +1 -1
  25. package/dist/pointInTime.d.ts +15 -0
  26. package/dist/pointInTime.d.ts.map +1 -0
  27. package/dist/pointInTime.js +16 -0
  28. package/dist/pointInTime.js.map +1 -0
  29. package/dist/pointInTimeDriver/createPointInTimeDocumentService.d.ts +34 -0
  30. package/dist/pointInTimeDriver/createPointInTimeDocumentService.d.ts.map +1 -0
  31. package/dist/pointInTimeDriver/createPointInTimeDocumentService.js +90 -0
  32. package/dist/pointInTimeDriver/createPointInTimeDocumentService.js.map +1 -0
  33. package/legacy/point-in-time.d.ts +6 -0
  34. package/lib/index.d.ts +2 -3
  35. package/lib/index.d.ts.map +1 -1
  36. package/lib/index.js +2 -5
  37. package/lib/index.js.map +1 -1
  38. package/lib/legacy.d.ts +4 -0
  39. package/lib/legacyAlpha.d.ts +4 -0
  40. package/lib/odspDocumentServiceFactory.d.ts +46 -1
  41. package/lib/odspDocumentServiceFactory.d.ts.map +1 -1
  42. package/lib/odspDocumentServiceFactory.js +58 -1
  43. package/lib/odspDocumentServiceFactory.js.map +1 -1
  44. package/lib/odspDocumentServiceFactoryCore.d.ts +74 -3
  45. package/lib/odspDocumentServiceFactoryCore.d.ts.map +1 -1
  46. package/lib/odspDocumentServiceFactoryCore.js +0 -3
  47. package/lib/odspDocumentServiceFactoryCore.js.map +1 -1
  48. package/lib/packageVersion.d.ts +1 -1
  49. package/lib/packageVersion.js +1 -1
  50. package/lib/packageVersion.js.map +1 -1
  51. package/lib/pointInTime.d.ts +15 -0
  52. package/lib/pointInTime.d.ts.map +1 -0
  53. package/lib/pointInTime.js +12 -0
  54. package/lib/pointInTime.js.map +1 -0
  55. package/lib/pointInTimeDriver/createPointInTimeDocumentService.d.ts +34 -0
  56. package/lib/pointInTimeDriver/createPointInTimeDocumentService.d.ts.map +1 -0
  57. package/lib/pointInTimeDriver/createPointInTimeDocumentService.js +87 -0
  58. package/lib/pointInTimeDriver/createPointInTimeDocumentService.js.map +1 -0
  59. package/package.json +25 -11
  60. package/src/index.ts +7 -5
  61. package/src/odspDocumentServiceFactory.ts +103 -1
  62. package/src/odspDocumentServiceFactoryCore.ts +90 -3
  63. package/src/odspVersionManager/DEV.md +9 -8
  64. package/src/packageVersion.ts +1 -1
  65. package/src/pointInTime.ts +30 -0
  66. package/src/pointInTimeDriver/createPointInTimeDocumentService.ts +180 -0
  67. package/dist/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.d.ts +0 -41
  68. package/dist/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.d.ts.map +0 -1
  69. package/dist/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js +0 -132
  70. package/dist/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js.map +0 -1
  71. package/lib/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.d.ts +0 -41
  72. package/lib/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.d.ts.map +0 -1
  73. package/lib/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js +0 -128
  74. package/lib/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js.map +0 -1
  75. package/src/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.ts +0 -260
package/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # @fluidframework/odsp-driver
2
2
 
3
+ ## 2.118.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Make point-in-time support optional and consumer-supplied ([#28152](https://github.com/microsoft/FluidFramework/pull/28152)) [46e6f7fe56e](https://github.com/microsoft/FluidFramework/commit/46e6f7fe56e67d71f6d55c359313a98434cbb838)
8
+
9
+ Point-in-time loading is now an optional implementation supplied by the host. Consumers that do
10
+ not enable the feature no longer include its implementation in their dependency graph. Hosts can
11
+ control when the feature is loaded by dynamically importing its dedicated entrypoint:
12
+
13
+ ```typescript
14
+ const factory = createOdspDocumentServiceFactory({
15
+ getStorageToken,
16
+ getWebsocketToken,
17
+ persistedCache,
18
+ hostPolicy,
19
+ pointInTimeDocumentServiceImplementation: async (props) => {
20
+ const { createPointInTimeDocumentService } = await import(
21
+ "@fluidframework/odsp-driver/legacy/point-in-time"
22
+ );
23
+ return createPointInTimeDocumentService(props);
24
+ },
25
+ });
26
+ ```
27
+
28
+ The legacy-beta `getOdspPointInTimeDocumentServiceFactory` helper is deprecated. Point-in-time
29
+ consumers should migrate to `createOdspDocumentServiceFactory`, which accepts tokens, cache, host
30
+ policy, and optional feature implementations in one options object. The deprecated helper now
31
+ loads the implementation only when point-in-time loading is used. Existing
32
+ `OdspDocumentServiceFactory` and `OdspDocumentServiceFactoryCore` constructor signatures remain
33
+ unchanged.
34
+
35
+ - Enable point-in-time loading on the standard ODSP document service factory ([#28152](https://github.com/microsoft/FluidFramework/pull/28152)) [46e6f7fe56e](https://github.com/microsoft/FluidFramework/commit/46e6f7fe56e67d71f6d55c359313a98434cbb838)
36
+
37
+ [`OdspDocumentServiceFactoryCore`](https://fluidframework.com/docs/api/odsp-driver/odspdocumentservicefactorycore-class)
38
+ now exposes the optional `createPointInTimeDocumentService` capability.
39
+ [`OdspDocumentServiceFactory`](https://fluidframework.com/docs/api/odsp-driver/odspdocumentservicefactory-class)
40
+ inherits this capability, so hosts can use the standard factory with
41
+ [`loadContainerToSequenceNumber`](https://fluidframework.com/docs/api/container-loader/loadcontainertosequencenumber-function)
42
+ for sequence-number-based document loading. Factories that do not support point-in-time loading
43
+ leave the capability undefined.
44
+
45
+ ```typescript
46
+ const factory = new OdspDocumentServiceFactory(
47
+ getStorageToken,
48
+ getWebsocketToken,
49
+ );
50
+
51
+ if (factory.createPointInTimeDocumentService !== undefined) {
52
+ const documentService = await factory.createPointInTimeDocumentService(
53
+ resolvedUrl,
54
+ targetSequenceNumber,
55
+ );
56
+ }
57
+ ```
58
+
59
+ ## 2.117.0
60
+
61
+ Dependency updates only.
62
+
3
63
  ## 2.116.0
4
64
 
5
65
  Dependency updates only.
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/pointInTime.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/pointInTime.d.ts"
5
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/pointInTime.d.ts",
5
+ "apiReport": {
6
+ "reportFileName": "<unscopedPackageName>.point-in-time.legacy",
7
+ "reportVariants": ["beta"]
8
+ }
9
+ }
@@ -13,6 +13,9 @@ export function createLocalOdspDocumentServiceFactory(localSnapshot: Uint8Array
13
13
  // @beta @legacy
14
14
  export function createOdspCreateContainerRequest(siteUrl: string, driveId: string, filePath: string, fileName: string, createShareLinkType?: ISharingLinkKind, containerPackageInfo?: IContainerPackageInfo | undefined): IRequest;
15
15
 
16
+ // @beta @legacy
17
+ export function createOdspDocumentServiceFactory(options: IOdspDocumentServiceFactoryOptions): OdspDocumentServiceFactory;
18
+
16
19
  // @beta @legacy
17
20
  export function createOdspUrl(l: OdspFluidDataStoreLocator): string;
18
21
 
@@ -65,7 +68,7 @@ export function getHashedDocumentId(driveId: string, itemId: string): Promise<st
65
68
  // @beta @legacy
66
69
  export function getLocatorFromOdspUrl(url: URL, requireFluidSignature?: boolean): OdspFluidDataStoreLocator | undefined;
67
70
 
68
- // @beta @legacy
71
+ // @beta @deprecated @legacy
69
72
  export function getOdspPointInTimeDocumentServiceFactory(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy): IPointInTimeDocumentServiceFactory;
70
73
 
71
74
  // @beta @legacy (undocumented)
@@ -91,6 +94,26 @@ export interface IOdspCache extends INonPersistentCache {
91
94
  readonly persistedCache: IPersistedFileCache;
92
95
  }
93
96
 
97
+ // @beta @legacy
98
+ export interface IOdspDocumentServiceFactoryOptions {
99
+ readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
100
+ readonly getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined;
101
+ readonly hostPolicy?: HostStoragePolicy | undefined;
102
+ readonly persistedCache?: IPersistedCache | undefined;
103
+ readonly pointInTimeDocumentServiceImplementation?: OdspPointInTimeDocumentServiceImplementation | undefined;
104
+ }
105
+
106
+ // @beta @legacy
107
+ export interface IOdspPointInTimeDocumentServiceImplementationProps {
108
+ readonly clientIsSummarizer?: boolean;
109
+ readonly createDocumentService: (resolvedUrl: IResolvedUrl, logger: ITelemetryBaseLogger, cacheAndTracker: ICacheAndTracker, clientIsSummarizer?: boolean) => Promise<IDocumentService>;
110
+ readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
111
+ readonly logger?: ITelemetryBaseLogger;
112
+ readonly persistedCache: IPersistedCache;
113
+ readonly resolvedUrl: IResolvedUrl;
114
+ readonly targetSequenceNumber: number;
115
+ }
116
+
94
117
  // @beta @legacy (undocumented)
95
118
  export interface IOdspResponse<T> {
96
119
  // (undocumented)
@@ -164,6 +187,7 @@ export class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory,
164
187
  createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
165
188
  // (undocumented)
166
189
  protected createDocumentServiceCore(resolvedUrl: IResolvedUrl, odspLogger: ITelemetryBaseLogger, cacheAndTrackerArg?: ICacheAndTracker, clientIsSummarizer?: boolean): Promise<IDocumentService>;
190
+ readonly createPointInTimeDocumentService?: IPointInTimeDocumentServiceFactory["createPointInTimeDocumentService"];
167
191
  getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
168
192
  readonly ILayerCompatDetails?: unknown;
169
193
  // (undocumented)
@@ -205,6 +229,9 @@ export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
205
229
  fileVersion?: string | undefined;
206
230
  }
207
231
 
232
+ // @beta @legacy
233
+ export type OdspPointInTimeDocumentServiceImplementation = (props: IOdspPointInTimeDocumentServiceImplementationProps) => Promise<IDocumentService>;
234
+
208
235
  // @beta @legacy
209
236
  export function prefetchLatestSnapshot(resolvedUrl: IResolvedUrl, getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, persistedCache: IPersistedCache, _forceAccessTokenViaAuthorizationHeader: boolean, logger: ITelemetryBaseLogger, hostSnapshotFetchOptions: ISnapshotOptions | undefined, enableRedeemFallback?: boolean, _fetchBinarySnapshotFormat?: boolean, _snapshotFormatFetchType?: SnapshotFormatSupportType, odspDocumentServiceFactory?: OdspDocumentServiceFactory): Promise<boolean>;
210
237
 
@@ -13,6 +13,9 @@ export function createLocalOdspDocumentServiceFactory(localSnapshot: Uint8Array
13
13
  // @beta @legacy
14
14
  export function createOdspCreateContainerRequest(siteUrl: string, driveId: string, filePath: string, fileName: string, createShareLinkType?: ISharingLinkKind, containerPackageInfo?: IContainerPackageInfo | undefined): IRequest;
15
15
 
16
+ // @beta @legacy
17
+ export function createOdspDocumentServiceFactory(options: IOdspDocumentServiceFactoryOptions): OdspDocumentServiceFactory;
18
+
16
19
  // @beta @legacy
17
20
  export function createOdspUrl(l: OdspFluidDataStoreLocator): string;
18
21
 
@@ -65,7 +68,7 @@ export function getHashedDocumentId(driveId: string, itemId: string): Promise<st
65
68
  // @beta @legacy
66
69
  export function getLocatorFromOdspUrl(url: URL, requireFluidSignature?: boolean): OdspFluidDataStoreLocator | undefined;
67
70
 
68
- // @beta @legacy
71
+ // @beta @deprecated @legacy
69
72
  export function getOdspPointInTimeDocumentServiceFactory(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy): IPointInTimeDocumentServiceFactory;
70
73
 
71
74
  // @beta @legacy (undocumented)
@@ -91,6 +94,26 @@ export interface IOdspCache extends INonPersistentCache {
91
94
  readonly persistedCache: IPersistedFileCache;
92
95
  }
93
96
 
97
+ // @beta @legacy
98
+ export interface IOdspDocumentServiceFactoryOptions {
99
+ readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
100
+ readonly getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined;
101
+ readonly hostPolicy?: HostStoragePolicy | undefined;
102
+ readonly persistedCache?: IPersistedCache | undefined;
103
+ readonly pointInTimeDocumentServiceImplementation?: OdspPointInTimeDocumentServiceImplementation | undefined;
104
+ }
105
+
106
+ // @beta @legacy
107
+ export interface IOdspPointInTimeDocumentServiceImplementationProps {
108
+ readonly clientIsSummarizer?: boolean;
109
+ readonly createDocumentService: (resolvedUrl: IResolvedUrl, logger: ITelemetryBaseLogger, cacheAndTracker: ICacheAndTracker, clientIsSummarizer?: boolean) => Promise<IDocumentService>;
110
+ readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
111
+ readonly logger?: ITelemetryBaseLogger;
112
+ readonly persistedCache: IPersistedCache;
113
+ readonly resolvedUrl: IResolvedUrl;
114
+ readonly targetSequenceNumber: number;
115
+ }
116
+
94
117
  // @beta @legacy (undocumented)
95
118
  export interface IOdspResponse<T> {
96
119
  // (undocumented)
@@ -164,6 +187,7 @@ export class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory,
164
187
  createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
165
188
  // (undocumented)
166
189
  protected createDocumentServiceCore(resolvedUrl: IResolvedUrl, odspLogger: ITelemetryBaseLogger, cacheAndTrackerArg?: ICacheAndTracker, clientIsSummarizer?: boolean): Promise<IDocumentService>;
190
+ readonly createPointInTimeDocumentService?: IPointInTimeDocumentServiceFactory["createPointInTimeDocumentService"];
167
191
  getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
168
192
  readonly ILayerCompatDetails?: unknown;
169
193
  // (undocumented)
@@ -205,6 +229,9 @@ export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
205
229
  fileVersion?: string | undefined;
206
230
  }
207
231
 
232
+ // @beta @legacy
233
+ export type OdspPointInTimeDocumentServiceImplementation = (props: IOdspPointInTimeDocumentServiceImplementationProps) => Promise<IDocumentService>;
234
+
208
235
  // @beta @legacy
209
236
  export function prefetchLatestSnapshot(resolvedUrl: IResolvedUrl, getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, persistedCache: IPersistedCache, _forceAccessTokenViaAuthorizationHeader: boolean, logger: ITelemetryBaseLogger, hostSnapshotFetchOptions: ISnapshotOptions | undefined, enableRedeemFallback?: boolean, _fetchBinarySnapshotFormat?: boolean, _snapshotFormatFetchType?: SnapshotFormatSupportType, odspDocumentServiceFactory?: OdspDocumentServiceFactory): Promise<boolean>;
210
237
 
@@ -0,0 +1,117 @@
1
+ ## Beta API Report File for "@fluidframework/odsp-driver"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ // @beta @legacy
8
+ export function createPointInTimeDocumentService(props: IOdspPointInTimeDocumentServiceImplementationProps): Promise<IDocumentService>;
9
+
10
+ // @beta @legacy
11
+ export class EpochTracker implements IPersistedFileCache {
12
+ constructor(cache: IPersistedCache, fileEntry: IFileEntry, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean | undefined);
13
+ // (undocumented)
14
+ protected readonly cache: IPersistedCache;
15
+ // (undocumented)
16
+ protected readonly clientIsSummarizer?: boolean | undefined;
17
+ fetch(url: string, fetchOptions: RequestInit, fetchType: FetchType, addInBody?: boolean, fetchReason?: string): Promise<IOdspResponse<Response>>;
18
+ fetchAndParseAsJSON<T>(url: string, fetchOptions: RequestInit, fetchType: FetchType, addInBody?: boolean, fetchReason?: string): Promise<IOdspResponse<T>>;
19
+ fetchArray(url: string, fetchOptions: {
20
+ [index: string]: RequestInit;
21
+ }, fetchType: FetchType, addInBody?: boolean, fetchReason?: string): Promise<IOdspResponse<ArrayBuffer>>;
22
+ // (undocumented)
23
+ protected readonly fileEntry: IFileEntry;
24
+ // (undocumented)
25
+ get fluidEpoch(): string | undefined;
26
+ // (undocumented)
27
+ get(entry: IEntry): Promise<any>;
28
+ // (undocumented)
29
+ protected readonly logger: ITelemetryLoggerExt;
30
+ // (undocumented)
31
+ put(entry: IEntry, value: any): Promise<void>;
32
+ // (undocumented)
33
+ readonly rateLimiter: RateLimiter;
34
+ // (undocumented)
35
+ removeEntries(): Promise<void>;
36
+ // (undocumented)
37
+ setEpoch(epoch: string, fromCache: boolean, fetchType: FetchTypeInternal): void;
38
+ // (undocumented)
39
+ validateEpoch(epoch: string | undefined, fetchType: FetchType): Promise<void>;
40
+ // (undocumented)
41
+ protected validateEpochFromResponse(epochFromResponse: string | undefined, fetchType: FetchTypeInternal, fromCache?: boolean): void;
42
+ }
43
+
44
+ // @beta @legacy (undocumented)
45
+ export type FetchType = "blob" | "createBlob" | "createFile" | "joinSession" | "ops" | "test" | "snapshotTree" | "treesLatest" | "uploadSummary" | "push" | "versions" | "renameFile";
46
+
47
+ // @beta @legacy (undocumented)
48
+ export type FetchTypeInternal = FetchType | "cache";
49
+
50
+ // @beta @legacy (undocumented)
51
+ export interface ICacheAndTracker {
52
+ // (undocumented)
53
+ cache: IOdspCache;
54
+ // (undocumented)
55
+ epochTracker: EpochTracker;
56
+ }
57
+
58
+ // @beta @legacy
59
+ export interface INonPersistentCache {
60
+ readonly fileUrlCache: PromiseCache<string, IOdspResolvedUrl>;
61
+ readonly sessionJoinCache: PromiseCache<string, {
62
+ entryTime: number;
63
+ joinSessionResponse: ISocketStorageDiscovery;
64
+ }>;
65
+ readonly snapshotPrefetchResultCache: PromiseCache<string, IPrefetchSnapshotContents>;
66
+ }
67
+
68
+ // @beta @legacy
69
+ export interface IOdspCache extends INonPersistentCache {
70
+ readonly persistedCache: IPersistedFileCache;
71
+ }
72
+
73
+ // @beta @legacy
74
+ export interface IOdspPointInTimeDocumentServiceImplementationProps {
75
+ readonly clientIsSummarizer?: boolean;
76
+ readonly createDocumentService: (resolvedUrl: IResolvedUrl, logger: ITelemetryBaseLogger, cacheAndTracker: ICacheAndTracker, clientIsSummarizer?: boolean) => Promise<IDocumentService>;
77
+ readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
78
+ readonly logger?: ITelemetryBaseLogger;
79
+ readonly persistedCache: IPersistedCache;
80
+ readonly resolvedUrl: IResolvedUrl;
81
+ readonly targetSequenceNumber: number;
82
+ }
83
+
84
+ // @beta @legacy (undocumented)
85
+ export interface IOdspResponse<T> {
86
+ // (undocumented)
87
+ content: T;
88
+ // (undocumented)
89
+ duration: number;
90
+ // (undocumented)
91
+ headers: Map<string, string>;
92
+ // (undocumented)
93
+ propsToLog: ITelemetryBaseProperties;
94
+ }
95
+
96
+ // @beta @legacy
97
+ export interface IPersistedFileCache {
98
+ // (undocumented)
99
+ get(entry: IEntry): Promise<any>;
100
+ // (undocumented)
101
+ put(entry: IEntry, value: any): Promise<void>;
102
+ // (undocumented)
103
+ removeEntries(): Promise<void>;
104
+ }
105
+
106
+ // @beta @legacy (undocumented)
107
+ export interface IPrefetchSnapshotContents extends ISnapshot {
108
+ // (undocumented)
109
+ fluidEpoch: string;
110
+ // (undocumented)
111
+ prefetchStartTime: number;
112
+ }
113
+
114
+ // @beta @legacy
115
+ export type OdspPointInTimeDocumentServiceImplementation = (props: IOdspPointInTimeDocumentServiceImplementationProps) => Promise<IDocumentService>;
116
+
117
+ ```
package/dist/index.d.ts CHANGED
@@ -10,9 +10,8 @@ export { getHashedDocumentId, type ISnapshotContents } from "./odspPublicUtils.j
10
10
  export { getApiRoot, getOdspUrlParts, isOdcUrl, isSpoUrl } from "./odspUrlHelper.js";
11
11
  export { getHeadersWithAuth } from "./getUrlAndHeadersWithAuth.js";
12
12
  export { prefetchLatestSnapshot } from "./prefetchLatestSnapshot.js";
13
- export { createLocalOdspDocumentServiceFactory, OdspDocumentServiceFactory, } from "./odspDocumentServiceFactory.js";
14
- export { OdspDocumentServiceFactoryCore } from "./odspDocumentServiceFactoryCore.js";
15
- export { getOdspPointInTimeDocumentServiceFactory, type IPointInTimeDocumentServiceFactory, } from "./pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js";
13
+ export { createLocalOdspDocumentServiceFactory, createOdspDocumentServiceFactory, getOdspPointInTimeDocumentServiceFactory, type IOdspDocumentServiceFactoryOptions, OdspDocumentServiceFactory, } from "./odspDocumentServiceFactory.js";
14
+ export { type IOdspPointInTimeDocumentServiceImplementationProps, type IPointInTimeDocumentServiceFactory, type OdspPointInTimeDocumentServiceImplementation, OdspDocumentServiceFactoryCore, } from "./odspDocumentServiceFactoryCore.js";
16
15
  export { createOdspCreateContainerRequest } from "./createOdspCreateContainerRequest.js";
17
16
  export { OdspDriverUrlResolver } from "./odspDriverUrlResolver.js";
18
17
  export { OdspDriverUrlResolverForShareLink, type ShareLinkFetcherProps, } from "./odspDriverUrlResolverForShareLink.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EACN,qBAAqB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,iBAAiB,GACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,EACN,qCAAqC,EACrC,0BAA0B,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,OAAO,EACN,wCAAwC,EACxC,KAAK,kCAAkC,GACvC,MAAM,8DAA8D,CAAC;AAItE,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAGzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACN,iCAAiC,EACjC,KAAK,qBAAqB,GAC1B,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EACN,+BAA+B,EAC/B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACrB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACX,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,iBAAiB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,aAAa,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACN,KAAK,0BAA0B,EAC/B,4BAA4B,GAC5B,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EACN,qBAAqB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,iBAAiB,GACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,EACN,qCAAqC,EACrC,gCAAgC,EAChC,wCAAwC,EACxC,KAAK,kCAAkC,EACvC,0BAA0B,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,KAAK,kDAAkD,EACvD,KAAK,kCAAkC,EACvC,KAAK,4CAA4C,EACjD,8BAA8B,GAC9B,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAGzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACN,iCAAiC,EACjC,KAAK,qBAAqB,GAC1B,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EACN,+BAA+B,EAC/B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACrB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACX,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,iBAAiB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,aAAa,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACN,KAAK,0BAA0B,EAC/B,4BAA4B,GAC5B,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.odspDriverCompatDetailsForLoader = exports.parseCompactSnapshotResponse = exports.SnapshotFormatSupportType = exports.isOdspResolvedUrl = exports.storeLocatorInOdspUrl = exports.locatorQueryParamName = exports.getLocatorFromOdspUrl = exports.encodeOdspFluidDataStoreLocator = exports.OdspDriverUrlResolverForShareLink = exports.OdspDriverUrlResolver = exports.createOdspCreateContainerRequest = exports.getOdspPointInTimeDocumentServiceFactory = exports.OdspDocumentServiceFactoryCore = exports.OdspDocumentServiceFactory = exports.createLocalOdspDocumentServiceFactory = exports.prefetchLatestSnapshot = exports.getHeadersWithAuth = exports.isSpoUrl = exports.isOdcUrl = exports.getOdspUrlParts = exports.getApiRoot = exports.getHashedDocumentId = exports.createOdspUrl = exports.checkUrl = exports.SharingLinkHeader = exports.ClpCompliantAppHeader = exports.OdcFileSiteOrigin = exports.OdcApiSiteOrigin = void 0;
7
+ exports.odspDriverCompatDetailsForLoader = exports.parseCompactSnapshotResponse = exports.SnapshotFormatSupportType = exports.isOdspResolvedUrl = exports.storeLocatorInOdspUrl = exports.locatorQueryParamName = exports.getLocatorFromOdspUrl = exports.encodeOdspFluidDataStoreLocator = exports.OdspDriverUrlResolverForShareLink = exports.OdspDriverUrlResolver = exports.createOdspCreateContainerRequest = exports.OdspDocumentServiceFactoryCore = exports.OdspDocumentServiceFactory = exports.getOdspPointInTimeDocumentServiceFactory = exports.createOdspDocumentServiceFactory = exports.createLocalOdspDocumentServiceFactory = exports.prefetchLatestSnapshot = exports.getHeadersWithAuth = exports.isSpoUrl = exports.isOdcUrl = exports.getOdspUrlParts = exports.getApiRoot = exports.getHashedDocumentId = exports.createOdspUrl = exports.checkUrl = exports.SharingLinkHeader = exports.ClpCompliantAppHeader = exports.OdcFileSiteOrigin = exports.OdcApiSiteOrigin = void 0;
8
8
  // Constants
9
9
  var constants_js_1 = require("./constants.js");
10
10
  Object.defineProperty(exports, "OdcApiSiteOrigin", { enumerable: true, get: function () { return constants_js_1.OdcApiSiteOrigin; } });
@@ -32,13 +32,11 @@ Object.defineProperty(exports, "prefetchLatestSnapshot", { enumerable: true, get
32
32
  // Factory
33
33
  var odspDocumentServiceFactory_js_1 = require("./odspDocumentServiceFactory.js");
34
34
  Object.defineProperty(exports, "createLocalOdspDocumentServiceFactory", { enumerable: true, get: function () { return odspDocumentServiceFactory_js_1.createLocalOdspDocumentServiceFactory; } });
35
+ Object.defineProperty(exports, "createOdspDocumentServiceFactory", { enumerable: true, get: function () { return odspDocumentServiceFactory_js_1.createOdspDocumentServiceFactory; } });
36
+ Object.defineProperty(exports, "getOdspPointInTimeDocumentServiceFactory", { enumerable: true, get: function () { return odspDocumentServiceFactory_js_1.getOdspPointInTimeDocumentServiceFactory; } });
35
37
  Object.defineProperty(exports, "OdspDocumentServiceFactory", { enumerable: true, get: function () { return odspDocumentServiceFactory_js_1.OdspDocumentServiceFactory; } });
36
38
  var odspDocumentServiceFactoryCore_js_1 = require("./odspDocumentServiceFactoryCore.js");
37
39
  Object.defineProperty(exports, "OdspDocumentServiceFactoryCore", { enumerable: true, get: function () { return odspDocumentServiceFactoryCore_js_1.OdspDocumentServiceFactoryCore; } });
38
- /* eslint-disable import-x/no-internal-modules */
39
- var odspPointInTimeDocumentServiceFactory_js_1 = require("./pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js");
40
- Object.defineProperty(exports, "getOdspPointInTimeDocumentServiceFactory", { enumerable: true, get: function () { return odspPointInTimeDocumentServiceFactory_js_1.getOdspPointInTimeDocumentServiceFactory; } });
41
- /* eslint-enable import-x/no-internal-modules */
42
40
  // File creation
43
41
  var createOdspCreateContainerRequest_js_1 = require("./createOdspCreateContainerRequest.js");
44
42
  Object.defineProperty(exports, "createOdspCreateContainerRequest", { enumerable: true, get: function () { return createOdspCreateContainerRequest_js_1.createOdspCreateContainerRequest; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,YAAY;AACZ,+CAAqE;AAA5D,gHAAA,gBAAgB,OAAA;AAAE,iHAAA,iBAAiB,OAAA;AAE5C,2DAM8B;AAL7B,2HAAA,qBAAqB,OAAA;AAIrB,uHAAA,iBAAiB,OAAA;AAGlB,eAAe;AACf,6CAAyC;AAAhC,uGAAA,QAAQ,OAAA;AACjB,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,2DAAmF;AAA1E,yHAAA,mBAAmB,OAAA;AAC5B,uDAAqF;AAA5E,8GAAA,UAAU,OAAA;AAAE,mHAAA,eAAe,OAAA;AAAE,4GAAA,QAAQ,OAAA;AAAE,4GAAA,QAAQ,OAAA;AACxD,6EAAmE;AAA1D,iIAAA,kBAAkB,OAAA;AAE3B,iDAAiD;AACjD,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAE/B,UAAU;AACV,iFAGyC;AAFxC,sJAAA,qCAAqC,OAAA;AACrC,2IAAA,0BAA0B,OAAA;AAE3B,yFAAqF;AAA5E,mJAAA,8BAA8B,OAAA;AACvC,iDAAiD;AACjD,yHAGsE;AAFrE,oKAAA,wCAAwC,OAAA;AAGzC,gDAAgD;AAEhD,gBAAgB;AAChB,6FAAyF;AAAhF,uJAAA,gCAAgC,OAAA;AAEzC,6CAA6C;AAC7C,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,+FAGgD;AAF/C,yJAAA,iCAAiC,OAAA;AAIlC,oEAAoE;AACpE,+DAKgC;AAJ/B,uIAAA,+BAA+B,OAAA;AAC/B,6HAAA,qBAAqB,OAAA;AACrB,6HAAA,qBAAqB,OAAA;AACrB,6HAAA,qBAAqB,OAAA;AAetB,+CAAuE;AAA1C,iHAAA,iBAAiB,OAAA;AAC9C,uDAA+D;AAAtD,6HAAA,yBAAyB,OAAA;AAClC,uEAGoC;AADnC,wIAAA,4BAA4B,OAAA;AAG7B,uBAAuB;AACvB,qEAA6E;AAApE,2IAAA,gCAAgC,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Constants\nexport { OdcApiSiteOrigin, OdcFileSiteOrigin } from \"./constants.js\";\n\nexport {\n\tClpCompliantAppHeader,\n\ttype IClpCompliantAppHeader,\n\ttype ISharingLinkHeader,\n\ttype OdspFluidDataStoreLocator,\n\tSharingLinkHeader,\n} from \"./contractsPublic.js\";\n\n// public utils\nexport { checkUrl } from \"./checkUrl.js\";\nexport { createOdspUrl } from \"./createOdspUrl.js\";\nexport { getHashedDocumentId, type ISnapshotContents } from \"./odspPublicUtils.js\";\nexport { getApiRoot, getOdspUrlParts, isOdcUrl, isSpoUrl } from \"./odspUrlHelper.js\";\nexport { getHeadersWithAuth } from \"./getUrlAndHeadersWithAuth.js\";\n\n// prefetch latest snapshot before container load\nexport { prefetchLatestSnapshot } from \"./prefetchLatestSnapshot.js\";\n\n// Factory\nexport {\n\tcreateLocalOdspDocumentServiceFactory,\n\tOdspDocumentServiceFactory,\n} from \"./odspDocumentServiceFactory.js\";\nexport { OdspDocumentServiceFactoryCore } from \"./odspDocumentServiceFactoryCore.js\";\n/* eslint-disable import-x/no-internal-modules */\nexport {\n\tgetOdspPointInTimeDocumentServiceFactory,\n\ttype IPointInTimeDocumentServiceFactory,\n} from \"./pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js\";\n/* eslint-enable import-x/no-internal-modules */\n\n// File creation\nexport { createOdspCreateContainerRequest } from \"./createOdspCreateContainerRequest.js\";\n\n// URI Resolver functionality, URI management\nexport { OdspDriverUrlResolver } from \"./odspDriverUrlResolver.js\";\nexport {\n\tOdspDriverUrlResolverForShareLink,\n\ttype ShareLinkFetcherProps,\n} from \"./odspDriverUrlResolverForShareLink.js\";\n\n// It's used by URL resolve code, but also has some public functions\nexport {\n\tencodeOdspFluidDataStoreLocator,\n\tgetLocatorFromOdspUrl,\n\tlocatorQueryParamName,\n\tstoreLocatorInOdspUrl,\n} from \"./odspFluidFileLink.js\";\n\nexport type {\n\tIOdspCache,\n\tIPersistedFileCache,\n\tINonPersistentCache,\n\tIPrefetchSnapshotContents,\n} from \"./odspCache.js\";\nexport type {\n\tICacheAndTracker,\n\tEpochTracker,\n\tFetchType,\n\tFetchTypeInternal,\n} from \"./epochTracker.js\";\nexport { type IOdspResponse, isOdspResolvedUrl } from \"./odspUtils.js\";\nexport { SnapshotFormatSupportType } from \"./fetchSnapshot.js\";\nexport {\n\ttype ISnapshotContentsWithProps,\n\tparseCompactSnapshotResponse,\n} from \"./compactSnapshotParser.js\";\n\n// Layer Compat details\nexport { odspDriverCompatDetailsForLoader } from \"./odspLayerCompatState.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,YAAY;AACZ,+CAAqE;AAA5D,gHAAA,gBAAgB,OAAA;AAAE,iHAAA,iBAAiB,OAAA;AAE5C,2DAM8B;AAL7B,2HAAA,qBAAqB,OAAA;AAIrB,uHAAA,iBAAiB,OAAA;AAGlB,eAAe;AACf,6CAAyC;AAAhC,uGAAA,QAAQ,OAAA;AACjB,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,2DAAmF;AAA1E,yHAAA,mBAAmB,OAAA;AAC5B,uDAAqF;AAA5E,8GAAA,UAAU,OAAA;AAAE,mHAAA,eAAe,OAAA;AAAE,4GAAA,QAAQ,OAAA;AAAE,4GAAA,QAAQ,OAAA;AACxD,6EAAmE;AAA1D,iIAAA,kBAAkB,OAAA;AAE3B,iDAAiD;AACjD,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAE/B,UAAU;AACV,iFAMyC;AALxC,sJAAA,qCAAqC,OAAA;AACrC,iJAAA,gCAAgC,OAAA;AAChC,yJAAA,wCAAwC,OAAA;AAExC,2IAAA,0BAA0B,OAAA;AAE3B,yFAK6C;AAD5C,mJAAA,8BAA8B,OAAA;AAG/B,gBAAgB;AAChB,6FAAyF;AAAhF,uJAAA,gCAAgC,OAAA;AAEzC,6CAA6C;AAC7C,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,+FAGgD;AAF/C,yJAAA,iCAAiC,OAAA;AAIlC,oEAAoE;AACpE,+DAKgC;AAJ/B,uIAAA,+BAA+B,OAAA;AAC/B,6HAAA,qBAAqB,OAAA;AACrB,6HAAA,qBAAqB,OAAA;AACrB,6HAAA,qBAAqB,OAAA;AAetB,+CAAuE;AAA1C,iHAAA,iBAAiB,OAAA;AAC9C,uDAA+D;AAAtD,6HAAA,yBAAyB,OAAA;AAClC,uEAGoC;AADnC,wIAAA,4BAA4B,OAAA;AAG7B,uBAAuB;AACvB,qEAA6E;AAApE,2IAAA,gCAAgC,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Constants\nexport { OdcApiSiteOrigin, OdcFileSiteOrigin } from \"./constants.js\";\n\nexport {\n\tClpCompliantAppHeader,\n\ttype IClpCompliantAppHeader,\n\ttype ISharingLinkHeader,\n\ttype OdspFluidDataStoreLocator,\n\tSharingLinkHeader,\n} from \"./contractsPublic.js\";\n\n// public utils\nexport { checkUrl } from \"./checkUrl.js\";\nexport { createOdspUrl } from \"./createOdspUrl.js\";\nexport { getHashedDocumentId, type ISnapshotContents } from \"./odspPublicUtils.js\";\nexport { getApiRoot, getOdspUrlParts, isOdcUrl, isSpoUrl } from \"./odspUrlHelper.js\";\nexport { getHeadersWithAuth } from \"./getUrlAndHeadersWithAuth.js\";\n\n// prefetch latest snapshot before container load\nexport { prefetchLatestSnapshot } from \"./prefetchLatestSnapshot.js\";\n\n// Factory\nexport {\n\tcreateLocalOdspDocumentServiceFactory,\n\tcreateOdspDocumentServiceFactory,\n\tgetOdspPointInTimeDocumentServiceFactory,\n\ttype IOdspDocumentServiceFactoryOptions,\n\tOdspDocumentServiceFactory,\n} from \"./odspDocumentServiceFactory.js\";\nexport {\n\ttype IOdspPointInTimeDocumentServiceImplementationProps,\n\ttype IPointInTimeDocumentServiceFactory,\n\ttype OdspPointInTimeDocumentServiceImplementation,\n\tOdspDocumentServiceFactoryCore,\n} from \"./odspDocumentServiceFactoryCore.js\";\n\n// File creation\nexport { createOdspCreateContainerRequest } from \"./createOdspCreateContainerRequest.js\";\n\n// URI Resolver functionality, URI management\nexport { OdspDriverUrlResolver } from \"./odspDriverUrlResolver.js\";\nexport {\n\tOdspDriverUrlResolverForShareLink,\n\ttype ShareLinkFetcherProps,\n} from \"./odspDriverUrlResolverForShareLink.js\";\n\n// It's used by URL resolve code, but also has some public functions\nexport {\n\tencodeOdspFluidDataStoreLocator,\n\tgetLocatorFromOdspUrl,\n\tlocatorQueryParamName,\n\tstoreLocatorInOdspUrl,\n} from \"./odspFluidFileLink.js\";\n\nexport type {\n\tIOdspCache,\n\tIPersistedFileCache,\n\tINonPersistentCache,\n\tIPrefetchSnapshotContents,\n} from \"./odspCache.js\";\nexport type {\n\tICacheAndTracker,\n\tEpochTracker,\n\tFetchType,\n\tFetchTypeInternal,\n} from \"./epochTracker.js\";\nexport { type IOdspResponse, isOdspResolvedUrl } from \"./odspUtils.js\";\nexport { SnapshotFormatSupportType } from \"./fetchSnapshot.js\";\nexport {\n\ttype ISnapshotContentsWithProps,\n\tparseCompactSnapshotResponse,\n} from \"./compactSnapshotParser.js\";\n\n// Layer Compat details\nexport { odspDriverCompatDetailsForLoader } from \"./odspLayerCompatState.js\";\n"]}
package/dist/legacy.d.ts CHANGED
@@ -16,6 +16,8 @@ export {
16
16
  ICacheAndTracker,
17
17
  INonPersistentCache,
18
18
  IOdspCache,
19
+ IOdspDocumentServiceFactoryOptions,
20
+ IOdspPointInTimeDocumentServiceImplementationProps,
19
21
  IOdspResponse,
20
22
  IPersistedFileCache,
21
23
  IPointInTimeDocumentServiceFactory,
@@ -28,11 +30,13 @@ export {
28
30
  OdspDriverUrlResolver,
29
31
  OdspDriverUrlResolverForShareLink,
30
32
  OdspFluidDataStoreLocator,
33
+ OdspPointInTimeDocumentServiceImplementation,
31
34
  ShareLinkFetcherProps,
32
35
  SnapshotFormatSupportType,
33
36
  checkUrl,
34
37
  createLocalOdspDocumentServiceFactory,
35
38
  createOdspCreateContainerRequest,
39
+ createOdspDocumentServiceFactory,
36
40
  createOdspUrl,
37
41
  encodeOdspFluidDataStoreLocator,
38
42
  getHashedDocumentId,
@@ -16,6 +16,8 @@ export {
16
16
  ICacheAndTracker,
17
17
  INonPersistentCache,
18
18
  IOdspCache,
19
+ IOdspDocumentServiceFactoryOptions,
20
+ IOdspPointInTimeDocumentServiceImplementationProps,
19
21
  IOdspResponse,
20
22
  IPersistedFileCache,
21
23
  IPointInTimeDocumentServiceFactory,
@@ -28,11 +30,13 @@ export {
28
30
  OdspDriverUrlResolver,
29
31
  OdspDriverUrlResolverForShareLink,
30
32
  OdspFluidDataStoreLocator,
33
+ OdspPointInTimeDocumentServiceImplementation,
31
34
  ShareLinkFetcherProps,
32
35
  SnapshotFormatSupportType,
33
36
  checkUrl,
34
37
  createLocalOdspDocumentServiceFactory,
35
38
  createOdspCreateContainerRequest,
39
+ createOdspDocumentServiceFactory,
36
40
  createOdspUrl,
37
41
  encodeOdspFluidDataStoreLocator,
38
42
  getHashedDocumentId,
@@ -4,7 +4,27 @@
4
4
  */
5
5
  import type { IDocumentServiceFactory, IPersistedCache } from "@fluidframework/driver-definitions/internal";
6
6
  import type { HostStoragePolicy, OdspResourceTokenFetchOptions, TokenFetcher } from "@fluidframework/odsp-driver-definitions/internal";
7
- import { OdspDocumentServiceFactoryCore } from "./odspDocumentServiceFactoryCore.js";
7
+ import { type IPointInTimeDocumentServiceFactory, type OdspPointInTimeDocumentServiceImplementation, OdspDocumentServiceFactoryCore } from "./odspDocumentServiceFactoryCore.js";
8
+ /**
9
+ * Options for creating an ODSP document service factory.
10
+ *
11
+ * @legacy @beta
12
+ */
13
+ export interface IOdspDocumentServiceFactoryOptions {
14
+ /** Fetches storage access tokens. */
15
+ readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
16
+ /** Fetches websocket access tokens, or `undefined` when unavailable. */
17
+ readonly getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined;
18
+ /** Persisted ODSP cache. When omitted, a local in-memory cache is used. */
19
+ readonly persistedCache?: IPersistedCache | undefined;
20
+ /** Host storage policy. When omitted, the default driver policies are used. */
21
+ readonly hostPolicy?: HostStoragePolicy | undefined;
22
+ /**
23
+ * Enables point-in-time loading. Consumers that omit this implementation do not include the
24
+ * feature code in their dependency graph.
25
+ */
26
+ readonly pointInTimeDocumentServiceImplementation?: OdspPointInTimeDocumentServiceImplementation | undefined;
27
+ }
8
28
  /**
9
29
  * Factory for creating the sharepoint document service. Use this if you want to
10
30
  * use the sharepoint implementation.
@@ -14,6 +34,31 @@ import { OdspDocumentServiceFactoryCore } from "./odspDocumentServiceFactoryCore
14
34
  export declare class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {
15
35
  constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);
16
36
  }
37
+ /**
38
+ * Creates an ODSP document service factory with optional consumer-provided features.
39
+ *
40
+ * @param options - Tokens, cache, host policy, and optional feature implementations.
41
+ * @returns The configured ODSP document service factory.
42
+ *
43
+ * @legacy @beta
44
+ */
45
+ export declare function createOdspDocumentServiceFactory(options: IOdspDocumentServiceFactoryOptions): OdspDocumentServiceFactory;
46
+ /**
47
+ * Creates an ODSP document service factory that supports point-in-time loading.
48
+ *
49
+ * @param getStorageToken - Fetches storage access tokens.
50
+ * @param getWebsocketToken - Fetches websocket access tokens, or `undefined` when unavailable.
51
+ * @param persistedCache - Optional persisted ODSP cache.
52
+ * @param hostPolicy - Optional host storage policy.
53
+ * @returns An ODSP document service factory with point-in-time loading capability.
54
+ *
55
+ * @deprecated Use
56
+ * {@link createOdspDocumentServiceFactory} with a point-in-time implementation instead.
57
+ * See {@link https://github.com/microsoft/FluidFramework/issues/26500} for context.
58
+ *
59
+ * @legacy @beta
60
+ */
61
+ export declare function getOdspPointInTimeDocumentServiceFactory(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy): IPointInTimeDocumentServiceFactory;
17
62
  /**
18
63
  * Creates a factory instance for creating a sharepoint document service from a provided snapshot.
19
64
  *
@@ -1 +1 @@
1
- {"version":3,"file":"odspDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/odspDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,uBAAuB,EACvB,eAAe,EACf,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACX,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,EACZ,MAAM,kDAAkD,CAAC;AAI1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,8BAA8B;gBAE5E,eAAe,EAAE,YAAY,CAAC,6BAA6B,CAAC,EAC5D,iBAAiB,EAAE,YAAY,CAAC,6BAA6B,CAAC,GAAG,SAAS,EAC1E,cAAc,CAAC,EAAE,eAAe,EAChC,UAAU,CAAC,EAAE,iBAAiB;CAI/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,qCAAqC,CACpD,aAAa,EAAE,UAAU,GAAG,MAAM,GAChC,uBAAuB,CAEzB"}
1
+ {"version":3,"file":"odspDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/odspDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,uBAAuB,EACvB,eAAe,EACf,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACX,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,EACZ,MAAM,kDAAkD,CAAC;AAI1D,OAAO,EACN,KAAK,kCAAkC,EACvC,KAAK,4CAA4C,EACjD,8BAA8B,EAC9B,MAAM,qCAAqC,CAAC;AAG7C;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IAClD,qCAAqC;IACrC,QAAQ,CAAC,eAAe,EAAE,YAAY,CAAC,6BAA6B,CAAC,CAAC;IACtE,wEAAwE;IACxE,QAAQ,CAAC,iBAAiB,EAAE,YAAY,CAAC,6BAA6B,CAAC,GAAG,SAAS,CAAC;IACpF,2EAA2E;IAC3E,QAAQ,CAAC,cAAc,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACtD,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACpD;;;OAGG;IACH,QAAQ,CAAC,wCAAwC,CAAC,EAC/C,4CAA4C,GAC5C,SAAS,CAAC;CACb;AAED;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,8BAA8B;gBAE5E,eAAe,EAAE,YAAY,CAAC,6BAA6B,CAAC,EAC5D,iBAAiB,EAAE,YAAY,CAAC,6BAA6B,CAAC,GAAG,SAAS,EAC1E,cAAc,CAAC,EAAE,eAAe,EAChC,UAAU,CAAC,EAAE,iBAAiB;CAI/B;AAED;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC/C,OAAO,EAAE,kCAAkC,GACzC,0BAA0B,CA6B5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wCAAwC,CACvD,eAAe,EAAE,YAAY,CAAC,6BAA6B,CAAC,EAC5D,iBAAiB,EAAE,YAAY,CAAC,6BAA6B,CAAC,GAAG,SAAS,EAC1E,cAAc,CAAC,EAAE,eAAe,EAChC,UAAU,CAAC,EAAE,iBAAiB,GAC5B,kCAAkC,CAWpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,qCAAqC,CACpD,aAAa,EAAE,UAAU,GAAG,MAAM,GAChC,uBAAuB,CAEzB"}
@@ -4,10 +4,11 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.createLocalOdspDocumentServiceFactory = exports.OdspDocumentServiceFactory = void 0;
7
+ exports.createLocalOdspDocumentServiceFactory = exports.getOdspPointInTimeDocumentServiceFactory = exports.createOdspDocumentServiceFactory = exports.OdspDocumentServiceFactory = void 0;
8
8
  // eslint-disable-next-line import-x/no-internal-modules
9
9
  const localOdspDocumentServiceFactory_js_1 = require("./localOdspDriver/localOdspDocumentServiceFactory.js");
10
10
  const odspDocumentServiceFactoryCore_js_1 = require("./odspDocumentServiceFactoryCore.js");
11
+ const odspCache_js_1 = require("./odspCache.js");
11
12
  /**
12
13
  * Factory for creating the sharepoint document service. Use this if you want to
13
14
  * use the sharepoint implementation.
@@ -20,6 +21,64 @@ class OdspDocumentServiceFactory extends odspDocumentServiceFactoryCore_js_1.Ods
20
21
  }
21
22
  }
22
23
  exports.OdspDocumentServiceFactory = OdspDocumentServiceFactory;
24
+ /**
25
+ * Creates an ODSP document service factory with optional consumer-provided features.
26
+ *
27
+ * @param options - Tokens, cache, host policy, and optional feature implementations.
28
+ * @returns The configured ODSP document service factory.
29
+ *
30
+ * @legacy @beta
31
+ */
32
+ function createOdspDocumentServiceFactory(options) {
33
+ const persistedCache = options.persistedCache ?? new odspCache_js_1.LocalPersistentCache();
34
+ const pointInTimeImplementation = options.pointInTimeDocumentServiceImplementation;
35
+ class ConfiguredOdspDocumentServiceFactory extends OdspDocumentServiceFactory {
36
+ constructor() {
37
+ super(...arguments);
38
+ this.createPointInTimeDocumentService = pointInTimeImplementation === undefined
39
+ ? undefined
40
+ : async (resolvedUrl, targetSequenceNumber, logger, clientIsSummarizer) => pointInTimeImplementation({
41
+ resolvedUrl,
42
+ targetSequenceNumber,
43
+ logger,
44
+ clientIsSummarizer,
45
+ persistedCache,
46
+ getStorageToken: options.getStorageToken,
47
+ createDocumentService: async (url, odspLogger, cacheAndTracker, isSummarizer) => this.createDocumentServiceCore(url, odspLogger, cacheAndTracker, isSummarizer),
48
+ });
49
+ }
50
+ }
51
+ return new ConfiguredOdspDocumentServiceFactory(options.getStorageToken, options.getWebsocketToken, persistedCache, options.hostPolicy);
52
+ }
53
+ exports.createOdspDocumentServiceFactory = createOdspDocumentServiceFactory;
54
+ /**
55
+ * Creates an ODSP document service factory that supports point-in-time loading.
56
+ *
57
+ * @param getStorageToken - Fetches storage access tokens.
58
+ * @param getWebsocketToken - Fetches websocket access tokens, or `undefined` when unavailable.
59
+ * @param persistedCache - Optional persisted ODSP cache.
60
+ * @param hostPolicy - Optional host storage policy.
61
+ * @returns An ODSP document service factory with point-in-time loading capability.
62
+ *
63
+ * @deprecated Use
64
+ * {@link createOdspDocumentServiceFactory} with a point-in-time implementation instead.
65
+ * See {@link https://github.com/microsoft/FluidFramework/issues/26500} for context.
66
+ *
67
+ * @legacy @beta
68
+ */
69
+ function getOdspPointInTimeDocumentServiceFactory(getStorageToken, getWebsocketToken, persistedCache, hostPolicy) {
70
+ return createOdspDocumentServiceFactory({
71
+ getStorageToken,
72
+ getWebsocketToken,
73
+ persistedCache,
74
+ hostPolicy,
75
+ pointInTimeDocumentServiceImplementation: async (props) => {
76
+ const { createPointInTimeDocumentService } = await import("./pointInTime.js");
77
+ return createPointInTimeDocumentService(props);
78
+ },
79
+ });
80
+ }
81
+ exports.getOdspPointInTimeDocumentServiceFactory = getOdspPointInTimeDocumentServiceFactory;
23
82
  /**
24
83
  * Creates a factory instance for creating a sharepoint document service from a provided snapshot.
25
84
  *
@@ -1 +1 @@
1
- {"version":3,"file":"odspDocumentServiceFactory.js","sourceRoot":"","sources":["../src/odspDocumentServiceFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,wDAAwD;AACxD,6GAAuG;AACvG,2FAAqF;AAErF;;;;;GAKG;AACH,MAAa,0BAA2B,SAAQ,kEAA8B;IAC7E,YACC,eAA4D,EAC5D,iBAA0E,EAC1E,cAAgC,EAChC,UAA8B;QAE9B,KAAK,CAAC,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;IACvE,CAAC;CACD;AATD,gEASC;AAED;;;;;;;;GAQG;AACH,SAAgB,qCAAqC,CACpD,aAAkC;IAElC,OAAO,IAAI,oEAA+B,CAAC,aAAa,CAAC,CAAC;AAC3D,CAAC;AAJD,sFAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIDocumentServiceFactory,\n\tIPersistedCache,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type {\n\tHostStoragePolicy,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n} from \"@fluidframework/odsp-driver-definitions/internal\";\n\n// eslint-disable-next-line import-x/no-internal-modules\nimport { LocalOdspDocumentServiceFactory } from \"./localOdspDriver/localOdspDocumentServiceFactory.js\";\nimport { OdspDocumentServiceFactoryCore } from \"./odspDocumentServiceFactoryCore.js\";\n\n/**\n * Factory for creating the sharepoint document service. Use this if you want to\n * use the sharepoint implementation.\n * @legacy\n * @beta\n */\nexport class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {\n\tconstructor(\n\t\tgetStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>,\n\t\tgetWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined,\n\t\tpersistedCache?: IPersistedCache,\n\t\thostPolicy?: HostStoragePolicy,\n\t) {\n\t\tsuper(getStorageToken, getWebsocketToken, persistedCache, hostPolicy);\n\t}\n}\n\n/**\n * Creates a factory instance for creating a sharepoint document service from a provided snapshot.\n *\n * @remarks Use if you don't want to connect to any kind of external/internal storages and want to provide\n * content directly.\n *\n * @legacy\n * @beta\n */\nexport function createLocalOdspDocumentServiceFactory(\n\tlocalSnapshot: Uint8Array | string,\n): IDocumentServiceFactory {\n\treturn new LocalOdspDocumentServiceFactory(localSnapshot);\n}\n"]}
1
+ {"version":3,"file":"odspDocumentServiceFactory.js","sourceRoot":"","sources":["../src/odspDocumentServiceFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,wDAAwD;AACxD,6GAAuG;AACvG,2FAI6C;AAC7C,iDAAsD;AAyBtD;;;;;GAKG;AACH,MAAa,0BAA2B,SAAQ,kEAA8B;IAC7E,YACC,eAA4D,EAC5D,iBAA0E,EAC1E,cAAgC,EAChC,UAA8B;QAE9B,KAAK,CAAC,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;IACvE,CAAC;CACD;AATD,gEASC;AAED;;;;;;;GAOG;AACH,SAAgB,gCAAgC,CAC/C,OAA2C;IAE3C,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,IAAI,mCAAoB,EAAE,CAAC;IAC5E,MAAM,yBAAyB,GAAG,OAAO,CAAC,wCAAwC,CAAC;IAEnF,MAAM,oCAAqC,SAAQ,0BAA0B;QAA7E;;YAC0B,qCAAgC,GAGxD,yBAAyB,KAAK,SAAS;gBACtC,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAAE,CACxE,yBAAyB,CAAC;oBACzB,WAAW;oBACX,oBAAoB;oBACpB,MAAM;oBACN,kBAAkB;oBAClB,cAAc;oBACd,eAAe,EAAE,OAAO,CAAC,eAAe;oBACxC,qBAAqB,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,EAAE,CAC/E,IAAI,CAAC,yBAAyB,CAAC,GAAG,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,CAAC;iBAC/E,CAAC,CAAC;QACR,CAAC;KAAA;IAED,OAAO,IAAI,oCAAoC,CAC9C,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,iBAAiB,EACzB,cAAc,EACd,OAAO,CAAC,UAAU,CAClB,CAAC;AACH,CAAC;AA/BD,4EA+BC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,wCAAwC,CACvD,eAA4D,EAC5D,iBAA0E,EAC1E,cAAgC,EAChC,UAA8B;IAE9B,OAAO,gCAAgC,CAAC;QACvC,eAAe;QACf,iBAAiB;QACjB,cAAc;QACd,UAAU;QACV,wCAAwC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACzD,MAAM,EAAE,gCAAgC,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;YAC9E,OAAO,gCAAgC,CAAC,KAAK,CAAC,CAAC;QAChD,CAAC;KACD,CAAuC,CAAC;AAC1C,CAAC;AAhBD,4FAgBC;AAED;;;;;;;;GAQG;AACH,SAAgB,qCAAqC,CACpD,aAAkC;IAElC,OAAO,IAAI,oEAA+B,CAAC,aAAa,CAAC,CAAC;AAC3D,CAAC;AAJD,sFAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIDocumentServiceFactory,\n\tIPersistedCache,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type {\n\tHostStoragePolicy,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n} from \"@fluidframework/odsp-driver-definitions/internal\";\n\n// eslint-disable-next-line import-x/no-internal-modules\nimport { LocalOdspDocumentServiceFactory } from \"./localOdspDriver/localOdspDocumentServiceFactory.js\";\nimport {\n\ttype IPointInTimeDocumentServiceFactory,\n\ttype OdspPointInTimeDocumentServiceImplementation,\n\tOdspDocumentServiceFactoryCore,\n} from \"./odspDocumentServiceFactoryCore.js\";\nimport { LocalPersistentCache } from \"./odspCache.js\";\n\n/**\n * Options for creating an ODSP document service factory.\n *\n * @legacy @beta\n */\nexport interface IOdspDocumentServiceFactoryOptions {\n\t/** Fetches storage access tokens. */\n\treadonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;\n\t/** Fetches websocket access tokens, or `undefined` when unavailable. */\n\treadonly getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined;\n\t/** Persisted ODSP cache. When omitted, a local in-memory cache is used. */\n\treadonly persistedCache?: IPersistedCache | undefined;\n\t/** Host storage policy. When omitted, the default driver policies are used. */\n\treadonly hostPolicy?: HostStoragePolicy | undefined;\n\t/**\n\t * Enables point-in-time loading. Consumers that omit this implementation do not include the\n\t * feature code in their dependency graph.\n\t */\n\treadonly pointInTimeDocumentServiceImplementation?:\n\t\t| OdspPointInTimeDocumentServiceImplementation\n\t\t| undefined;\n}\n\n/**\n * Factory for creating the sharepoint document service. Use this if you want to\n * use the sharepoint implementation.\n * @legacy\n * @beta\n */\nexport class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {\n\tconstructor(\n\t\tgetStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>,\n\t\tgetWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined,\n\t\tpersistedCache?: IPersistedCache,\n\t\thostPolicy?: HostStoragePolicy,\n\t) {\n\t\tsuper(getStorageToken, getWebsocketToken, persistedCache, hostPolicy);\n\t}\n}\n\n/**\n * Creates an ODSP document service factory with optional consumer-provided features.\n *\n * @param options - Tokens, cache, host policy, and optional feature implementations.\n * @returns The configured ODSP document service factory.\n *\n * @legacy @beta\n */\nexport function createOdspDocumentServiceFactory(\n\toptions: IOdspDocumentServiceFactoryOptions,\n): OdspDocumentServiceFactory {\n\tconst persistedCache = options.persistedCache ?? new LocalPersistentCache();\n\tconst pointInTimeImplementation = options.pointInTimeDocumentServiceImplementation;\n\n\tclass ConfiguredOdspDocumentServiceFactory extends OdspDocumentServiceFactory {\n\t\tpublic override readonly createPointInTimeDocumentService:\n\t\t\t| IPointInTimeDocumentServiceFactory[\"createPointInTimeDocumentService\"]\n\t\t\t| undefined =\n\t\t\tpointInTimeImplementation === undefined\n\t\t\t\t? undefined\n\t\t\t\t: async (resolvedUrl, targetSequenceNumber, logger, clientIsSummarizer) =>\n\t\t\t\t\t\tpointInTimeImplementation({\n\t\t\t\t\t\t\tresolvedUrl,\n\t\t\t\t\t\t\ttargetSequenceNumber,\n\t\t\t\t\t\t\tlogger,\n\t\t\t\t\t\t\tclientIsSummarizer,\n\t\t\t\t\t\t\tpersistedCache,\n\t\t\t\t\t\t\tgetStorageToken: options.getStorageToken,\n\t\t\t\t\t\t\tcreateDocumentService: async (url, odspLogger, cacheAndTracker, isSummarizer) =>\n\t\t\t\t\t\t\t\tthis.createDocumentServiceCore(url, odspLogger, cacheAndTracker, isSummarizer),\n\t\t\t\t\t\t});\n\t}\n\n\treturn new ConfiguredOdspDocumentServiceFactory(\n\t\toptions.getStorageToken,\n\t\toptions.getWebsocketToken,\n\t\tpersistedCache,\n\t\toptions.hostPolicy,\n\t);\n}\n\n/**\n * Creates an ODSP document service factory that supports point-in-time loading.\n *\n * @param getStorageToken - Fetches storage access tokens.\n * @param getWebsocketToken - Fetches websocket access tokens, or `undefined` when unavailable.\n * @param persistedCache - Optional persisted ODSP cache.\n * @param hostPolicy - Optional host storage policy.\n * @returns An ODSP document service factory with point-in-time loading capability.\n *\n * @deprecated Use\n * {@link createOdspDocumentServiceFactory} with a point-in-time implementation instead.\n * See {@link https://github.com/microsoft/FluidFramework/issues/26500} for context.\n *\n * @legacy @beta\n */\nexport function getOdspPointInTimeDocumentServiceFactory(\n\tgetStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>,\n\tgetWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined,\n\tpersistedCache?: IPersistedCache,\n\thostPolicy?: HostStoragePolicy,\n): IPointInTimeDocumentServiceFactory {\n\treturn createOdspDocumentServiceFactory({\n\t\tgetStorageToken,\n\t\tgetWebsocketToken,\n\t\tpersistedCache,\n\t\thostPolicy,\n\t\tpointInTimeDocumentServiceImplementation: async (props) => {\n\t\t\tconst { createPointInTimeDocumentService } = await import(\"./pointInTime.js\");\n\t\t\treturn createPointInTimeDocumentService(props);\n\t\t},\n\t}) as IPointInTimeDocumentServiceFactory;\n}\n\n/**\n * Creates a factory instance for creating a sharepoint document service from a provided snapshot.\n *\n * @remarks Use if you don't want to connect to any kind of external/internal storages and want to provide\n * content directly.\n *\n * @legacy\n * @beta\n */\nexport function createLocalOdspDocumentServiceFactory(\n\tlocalSnapshot: Uint8Array | string,\n): IDocumentServiceFactory {\n\treturn new LocalOdspDocumentServiceFactory(localSnapshot);\n}\n"]}