@fluidframework/odsp-driver 2.0.0-internal.7.3.0 → 2.0.0-internal.7.4.1

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 (230) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-extractor-lint.json +13 -0
  3. package/api-extractor.json +9 -1
  4. package/api-report/odsp-driver.api.md +44 -41
  5. package/dist/checkUrl.cjs +1 -1
  6. package/dist/checkUrl.cjs.map +1 -1
  7. package/dist/checkUrl.d.ts +1 -1
  8. package/dist/compactSnapshotParser.cjs +1 -1
  9. package/dist/compactSnapshotParser.cjs.map +1 -1
  10. package/dist/compactSnapshotParser.d.ts +2 -2
  11. package/dist/constants.cjs +2 -2
  12. package/dist/constants.cjs.map +1 -1
  13. package/dist/constants.d.ts +2 -2
  14. package/dist/contractsPublic.cjs +2 -2
  15. package/dist/contractsPublic.cjs.map +1 -1
  16. package/dist/contractsPublic.d.ts +5 -5
  17. package/dist/createOdspCreateContainerRequest.cjs +1 -1
  18. package/dist/createOdspCreateContainerRequest.cjs.map +1 -1
  19. package/dist/createOdspCreateContainerRequest.d.ts +1 -1
  20. package/dist/createOdspUrl.cjs +1 -1
  21. package/dist/createOdspUrl.cjs.map +1 -1
  22. package/dist/createOdspUrl.d.ts +1 -1
  23. package/dist/epochTracker.cjs +1 -1
  24. package/dist/epochTracker.cjs.map +1 -1
  25. package/dist/epochTracker.d.ts +4 -4
  26. package/dist/fetchSnapshot.cjs +2 -2
  27. package/dist/fetchSnapshot.cjs.map +1 -1
  28. package/dist/fetchSnapshot.d.ts +1 -1
  29. package/dist/index.cjs +3 -1
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/odsp-driver-alpha.d.ts +331 -0
  34. package/dist/odsp-driver-beta.d.ts +169 -0
  35. package/dist/odsp-driver-public.d.ts +169 -0
  36. package/dist/odsp-driver-untrimmed.d.ts +563 -0
  37. package/dist/odspCache.cjs.map +1 -1
  38. package/dist/odspCache.d.ts +4 -4
  39. package/dist/odspDocumentServiceFactory.cjs +2 -2
  40. package/dist/odspDocumentServiceFactory.cjs.map +1 -1
  41. package/dist/odspDocumentServiceFactory.d.ts +2 -2
  42. package/dist/odspDocumentServiceFactoryCore.cjs +1 -1
  43. package/dist/odspDocumentServiceFactoryCore.cjs.map +1 -1
  44. package/dist/odspDocumentServiceFactoryCore.d.ts +1 -1
  45. package/dist/odspDocumentServiceFactoryWithCodeSplit.cjs +1 -1
  46. package/dist/odspDocumentServiceFactoryWithCodeSplit.cjs.map +1 -1
  47. package/dist/odspDocumentServiceFactoryWithCodeSplit.d.ts +1 -1
  48. package/dist/odspDriverUrlResolver.cjs +1 -1
  49. package/dist/odspDriverUrlResolver.cjs.map +1 -1
  50. package/dist/odspDriverUrlResolver.d.ts +1 -1
  51. package/dist/odspDriverUrlResolverForShareLink.cjs +1 -1
  52. package/dist/odspDriverUrlResolverForShareLink.cjs.map +1 -1
  53. package/dist/odspDriverUrlResolverForShareLink.d.ts +2 -2
  54. package/dist/odspFluidFileLink.cjs +4 -4
  55. package/dist/odspFluidFileLink.cjs.map +1 -1
  56. package/dist/odspFluidFileLink.d.ts +4 -4
  57. package/dist/odspPublicUtils.cjs +1 -1
  58. package/dist/odspPublicUtils.cjs.map +1 -1
  59. package/dist/odspPublicUtils.d.ts +2 -2
  60. package/dist/odspUrlHelper.cjs +5 -5
  61. package/dist/odspUrlHelper.cjs.map +1 -1
  62. package/dist/odspUrlHelper.d.ts +5 -5
  63. package/dist/odspUtils.cjs +8 -1
  64. package/dist/odspUtils.cjs.map +1 -1
  65. package/dist/odspUtils.d.ts +5 -1
  66. package/dist/odspUtils.d.ts.map +1 -1
  67. package/dist/packageVersion.cjs +1 -1
  68. package/dist/packageVersion.cjs.map +1 -1
  69. package/dist/packageVersion.d.ts +1 -1
  70. package/dist/prefetchLatestSnapshot.cjs +1 -2
  71. package/dist/prefetchLatestSnapshot.cjs.map +1 -1
  72. package/dist/prefetchLatestSnapshot.d.ts +1 -2
  73. package/dist/prefetchLatestSnapshot.d.ts.map +1 -1
  74. package/lib/WriteBufferUtils.d.ts +1 -1
  75. package/lib/WriteBufferUtils.d.ts.map +1 -1
  76. package/lib/checkUrl.d.ts +1 -1
  77. package/lib/checkUrl.d.ts.map +1 -1
  78. package/lib/checkUrl.mjs +1 -1
  79. package/lib/checkUrl.mjs.map +1 -1
  80. package/lib/compactSnapshotParser.d.ts +3 -3
  81. package/lib/compactSnapshotParser.d.ts.map +1 -1
  82. package/lib/compactSnapshotParser.mjs +1 -1
  83. package/lib/compactSnapshotParser.mjs.map +1 -1
  84. package/lib/compactSnapshotWriter.d.ts +1 -1
  85. package/lib/compactSnapshotWriter.d.ts.map +1 -1
  86. package/lib/constants.d.ts +2 -2
  87. package/lib/constants.mjs +2 -2
  88. package/lib/constants.mjs.map +1 -1
  89. package/lib/contracts.d.ts +1 -1
  90. package/lib/contracts.d.ts.map +1 -1
  91. package/lib/contractsPublic.d.ts +5 -5
  92. package/lib/contractsPublic.d.ts.map +1 -1
  93. package/lib/contractsPublic.mjs +2 -2
  94. package/lib/contractsPublic.mjs.map +1 -1
  95. package/lib/createFile.d.ts +3 -3
  96. package/lib/createFile.d.ts.map +1 -1
  97. package/lib/createNewContainerOnExistingFile.d.ts +2 -2
  98. package/lib/createNewContainerOnExistingFile.d.ts.map +1 -1
  99. package/lib/createNewModule.d.ts +2 -2
  100. package/lib/createNewModule.d.ts.map +1 -1
  101. package/lib/createNewUtils.d.ts +3 -3
  102. package/lib/createNewUtils.d.ts.map +1 -1
  103. package/lib/createOdspCreateContainerRequest.d.ts +1 -5
  104. package/lib/createOdspCreateContainerRequest.d.ts.map +1 -1
  105. package/lib/createOdspCreateContainerRequest.mjs +1 -1
  106. package/lib/createOdspCreateContainerRequest.mjs.map +1 -1
  107. package/lib/createOdspUrl.d.ts +2 -2
  108. package/lib/createOdspUrl.d.ts.map +1 -1
  109. package/lib/createOdspUrl.mjs +1 -1
  110. package/lib/createOdspUrl.mjs.map +1 -1
  111. package/lib/epochTracker.d.ts +6 -6
  112. package/lib/epochTracker.d.ts.map +1 -1
  113. package/lib/epochTracker.mjs +1 -1
  114. package/lib/epochTracker.mjs.map +1 -1
  115. package/lib/fetchSnapshot.d.ts +5 -5
  116. package/lib/fetchSnapshot.d.ts.map +1 -1
  117. package/lib/fetchSnapshot.mjs +2 -2
  118. package/lib/fetchSnapshot.mjs.map +1 -1
  119. package/lib/getFileLink.d.ts.map +1 -1
  120. package/lib/getQueryString.d.ts +0 -4
  121. package/lib/getQueryString.d.ts.map +1 -1
  122. package/lib/index.d.ts +19 -19
  123. package/lib/index.d.ts.map +1 -1
  124. package/lib/index.mjs +1 -0
  125. package/lib/index.mjs.map +1 -1
  126. package/lib/localOdspDriver/localOdspDeltaStorageService.d.ts.map +1 -1
  127. package/lib/localOdspDriver/localOdspDocumentService.d.ts.map +1 -1
  128. package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts +2 -2
  129. package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -1
  130. package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts +1 -1
  131. package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -1
  132. package/lib/odsp-driver-alpha.d.ts +331 -0
  133. package/lib/odsp-driver-beta.d.ts +169 -0
  134. package/lib/odsp-driver-public.d.ts +169 -0
  135. package/lib/odsp-driver-untrimmed.d.ts +563 -0
  136. package/lib/odspCache.d.ts +5 -9
  137. package/lib/odspCache.d.ts.map +1 -1
  138. package/lib/odspCache.mjs.map +1 -1
  139. package/lib/odspDelayLoadedDeltaStream.d.ts +3 -3
  140. package/lib/odspDelayLoadedDeltaStream.d.ts.map +1 -1
  141. package/lib/odspDeltaStorageService.d.ts +2 -2
  142. package/lib/odspDeltaStorageService.d.ts.map +1 -1
  143. package/lib/odspDocumentDeltaConnection.d.ts +1 -1
  144. package/lib/odspDocumentDeltaConnection.d.ts.map +1 -1
  145. package/lib/odspDocumentService.d.ts +3 -3
  146. package/lib/odspDocumentService.d.ts.map +1 -1
  147. package/lib/odspDocumentServiceFactory.d.ts +3 -3
  148. package/lib/odspDocumentServiceFactory.d.ts.map +1 -1
  149. package/lib/odspDocumentServiceFactory.mjs +2 -2
  150. package/lib/odspDocumentServiceFactory.mjs.map +1 -1
  151. package/lib/odspDocumentServiceFactoryCore.d.ts +2 -2
  152. package/lib/odspDocumentServiceFactoryCore.d.ts.map +1 -1
  153. package/lib/odspDocumentServiceFactoryCore.mjs +1 -1
  154. package/lib/odspDocumentServiceFactoryCore.mjs.map +1 -1
  155. package/lib/odspDocumentServiceFactoryWithCodeSplit.d.ts +2 -2
  156. package/lib/odspDocumentServiceFactoryWithCodeSplit.d.ts.map +1 -1
  157. package/lib/odspDocumentServiceFactoryWithCodeSplit.mjs +1 -1
  158. package/lib/odspDocumentServiceFactoryWithCodeSplit.mjs.map +1 -1
  159. package/lib/odspDocumentStorageManager.d.ts +6 -6
  160. package/lib/odspDocumentStorageManager.d.ts.map +1 -1
  161. package/lib/odspDocumentStorageServiceBase.d.ts +1 -1
  162. package/lib/odspDocumentStorageServiceBase.d.ts.map +1 -1
  163. package/lib/odspDriverUrlResolver.d.ts +1 -1
  164. package/lib/odspDriverUrlResolver.d.ts.map +1 -1
  165. package/lib/odspDriverUrlResolver.mjs +1 -1
  166. package/lib/odspDriverUrlResolver.mjs.map +1 -1
  167. package/lib/odspDriverUrlResolverForShareLink.d.ts +3 -3
  168. package/lib/odspDriverUrlResolverForShareLink.d.ts.map +1 -1
  169. package/lib/odspDriverUrlResolverForShareLink.mjs +1 -1
  170. package/lib/odspDriverUrlResolverForShareLink.mjs.map +1 -1
  171. package/lib/odspError.d.ts +1 -1
  172. package/lib/odspError.d.ts.map +1 -1
  173. package/lib/odspFluidFileLink.d.ts +5 -5
  174. package/lib/odspFluidFileLink.d.ts.map +1 -1
  175. package/lib/odspFluidFileLink.mjs +4 -4
  176. package/lib/odspFluidFileLink.mjs.map +1 -1
  177. package/lib/odspLocationRedirection.d.ts.map +1 -1
  178. package/lib/odspPublicUtils.d.ts +2 -2
  179. package/lib/odspPublicUtils.d.ts.map +1 -1
  180. package/lib/odspPublicUtils.mjs +1 -1
  181. package/lib/odspPublicUtils.mjs.map +1 -1
  182. package/lib/odspSnapshotParser.d.ts +2 -2
  183. package/lib/odspSnapshotParser.d.ts.map +1 -1
  184. package/lib/odspSummaryUploadManager.d.ts +1 -1
  185. package/lib/odspSummaryUploadManager.d.ts.map +1 -1
  186. package/lib/odspUrlHelper.d.ts +5 -5
  187. package/lib/odspUrlHelper.d.ts.map +1 -1
  188. package/lib/odspUrlHelper.mjs +5 -5
  189. package/lib/odspUrlHelper.mjs.map +1 -1
  190. package/lib/odspUtils.d.ts +6 -2
  191. package/lib/odspUtils.d.ts.map +1 -1
  192. package/lib/odspUtils.mjs +6 -0
  193. package/lib/odspUtils.mjs.map +1 -1
  194. package/lib/opsCaching.d.ts.map +1 -1
  195. package/lib/packageVersion.d.ts +1 -1
  196. package/lib/packageVersion.mjs +1 -1
  197. package/lib/packageVersion.mjs.map +1 -1
  198. package/lib/prefetchLatestSnapshot.d.ts +3 -4
  199. package/lib/prefetchLatestSnapshot.d.ts.map +1 -1
  200. package/lib/prefetchLatestSnapshot.mjs +1 -2
  201. package/lib/prefetchLatestSnapshot.mjs.map +1 -1
  202. package/lib/retryErrorsStorageAdapter.d.ts.map +1 -1
  203. package/lib/retryUtils.d.ts.map +1 -1
  204. package/lib/socketModule.d.ts.map +1 -1
  205. package/lib/vroom.d.ts +2 -2
  206. package/lib/vroom.d.ts.map +1 -1
  207. package/lib/zipItDataRepresentationUtils.d.ts +1 -1
  208. package/lib/zipItDataRepresentationUtils.d.ts.map +1 -1
  209. package/package.json +35 -16
  210. package/src/checkUrl.ts +1 -1
  211. package/src/compactSnapshotParser.ts +2 -2
  212. package/src/constants.ts +2 -2
  213. package/src/contractsPublic.ts +5 -5
  214. package/src/createOdspCreateContainerRequest.ts +1 -1
  215. package/src/createOdspUrl.ts +1 -1
  216. package/src/epochTracker.ts +4 -4
  217. package/src/fetchSnapshot.ts +2 -2
  218. package/src/index.ts +1 -1
  219. package/src/odspCache.ts +4 -4
  220. package/src/odspDocumentServiceFactory.ts +2 -2
  221. package/src/odspDocumentServiceFactoryCore.ts +1 -1
  222. package/src/odspDocumentServiceFactoryWithCodeSplit.ts +1 -1
  223. package/src/odspDriverUrlResolver.ts +1 -1
  224. package/src/odspDriverUrlResolverForShareLink.ts +2 -2
  225. package/src/odspFluidFileLink.ts +4 -4
  226. package/src/odspPublicUtils.ts +2 -2
  227. package/src/odspUrlHelper.ts +5 -5
  228. package/src/odspUtils.ts +8 -1
  229. package/src/packageVersion.ts +1 -1
  230. package/src/prefetchLatestSnapshot.ts +1 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/odsp-driver
2
2
 
3
+ ## 2.0.0-internal.7.4.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.0.0-internal.7.3.0
4
8
 
5
9
  Dependency updates only.
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-lint.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ // TODO: remove once base config has this enabled as an error
7
+ "ae-incompatible-release-tags": {
8
+ "logLevel": "error",
9
+ "addToApiReportFile": false
10
+ }
11
+ }
12
+ }
13
+ }
@@ -1,4 +1,12 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-base.json"
3
+ "extends": "../../../common/build/build-common/api-extractor-base.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ // TODO: Add missing documentation and remove this rule override
7
+ "ae-undocumented": {
8
+ "logLevel": "none"
9
+ }
10
+ }
11
+ }
4
12
  }
@@ -36,28 +36,28 @@ import { RateLimiter } from '@fluidframework/driver-utils';
36
36
  import { ShareLinkTypes } from '@fluidframework/odsp-driver-definitions';
37
37
  import { TokenFetcher } from '@fluidframework/odsp-driver-definitions';
38
38
 
39
- // @public
39
+ // @internal
40
40
  export function checkUrl(documentUrl: URL): DriverPreCheckInfo | undefined;
41
41
 
42
- // @public (undocumented)
42
+ // @internal (undocumented)
43
43
  export enum ClpCompliantAppHeader {
44
44
  // (undocumented)
45
45
  isClpCompliantApp = "X-CLP-Compliant-App"
46
46
  }
47
47
 
48
- // @public (undocumented)
48
+ // @internal (undocumented)
49
49
  export function createLocalOdspDocumentServiceFactory(localSnapshot: Uint8Array | string): IDocumentServiceFactory;
50
50
 
51
- // @public
51
+ // @internal
52
52
  export function createOdspCreateContainerRequest(siteUrl: string, driveId: string, filePath: string, fileName: string, createShareLinkType?: ShareLinkTypes | ISharingLinkKind): IRequest;
53
53
 
54
- // @public
54
+ // @internal
55
55
  export function createOdspUrl(l: OdspFluidDataStoreLocator): string;
56
56
 
57
- // @public
57
+ // @internal
58
58
  export function encodeOdspFluidDataStoreLocator(locator: OdspFluidDataStoreLocator): string;
59
59
 
60
- // @public
60
+ // @alpha
61
61
  export class EpochTracker implements IPersistedFileCache {
62
62
  constructor(cache: IPersistedCache, fileEntry: IFileEntry, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean | undefined);
63
63
  // (undocumented)
@@ -91,25 +91,25 @@ export class EpochTracker implements IPersistedFileCache {
91
91
  protected validateEpochFromResponse(epochFromResponse: string | undefined, fetchType: FetchTypeInternal, fromCache?: boolean): void;
92
92
  }
93
93
 
94
- // @public (undocumented)
94
+ // @alpha (undocumented)
95
95
  export type FetchType = "blob" | "createBlob" | "createFile" | "joinSession" | "ops" | "test" | "snapshotTree" | "treesLatest" | "uploadSummary" | "push" | "versions";
96
96
 
97
- // @public (undocumented)
97
+ // @alpha (undocumented)
98
98
  export type FetchTypeInternal = FetchType | "cache";
99
99
 
100
- // @public
100
+ // @internal
101
101
  export function getApiRoot(origin: string): string;
102
102
 
103
- // @public (undocumented)
103
+ // @internal (undocumented)
104
104
  export function getHashedDocumentId(driveId: string, itemId: string): Promise<string>;
105
105
 
106
- // @public
106
+ // @internal
107
107
  export function getLocatorFromOdspUrl(url: URL, requireFluidSignature?: boolean): OdspFluidDataStoreLocator | undefined;
108
108
 
109
- // @public
109
+ // @internal
110
110
  export function getOdspUrlParts(url: URL): Promise<IOdspUrlParts | undefined>;
111
111
 
112
- // @public (undocumented)
112
+ // @alpha (undocumented)
113
113
  export interface ICacheAndTracker {
114
114
  // (undocumented)
115
115
  cache: IOdspCache;
@@ -117,13 +117,13 @@ export interface ICacheAndTracker {
117
117
  epochTracker: EpochTracker;
118
118
  }
119
119
 
120
- // @public (undocumented)
120
+ // @internal (undocumented)
121
121
  export interface IClpCompliantAppHeader {
122
122
  // (undocumented)
123
123
  [ClpCompliantAppHeader.isClpCompliantApp]: boolean;
124
124
  }
125
125
 
126
- // @public
126
+ // @alpha
127
127
  export interface INonPersistentCache {
128
128
  readonly fileUrlCache: PromiseCache<string, IOdspResolvedUrl>;
129
129
  readonly sessionJoinCache: PromiseCache<string, {
@@ -133,12 +133,12 @@ export interface INonPersistentCache {
133
133
  readonly snapshotPrefetchResultCache: PromiseCache<string, IPrefetchSnapshotContents>;
134
134
  }
135
135
 
136
- // @public
136
+ // @alpha
137
137
  export interface IOdspCache extends INonPersistentCache {
138
138
  readonly persistedCache: IPersistedFileCache;
139
139
  }
140
140
 
141
- // @public (undocumented)
141
+ // @alpha (undocumented)
142
142
  export interface IOdspResponse<T> {
143
143
  // (undocumented)
144
144
  content: T;
@@ -150,7 +150,7 @@ export interface IOdspResponse<T> {
150
150
  propsToLog: ITelemetryProperties;
151
151
  }
152
152
 
153
- // @public
153
+ // @alpha
154
154
  export interface IPersistedFileCache {
155
155
  // (undocumented)
156
156
  get(entry: IEntry): Promise<any>;
@@ -160,7 +160,7 @@ export interface IPersistedFileCache {
160
160
  removeEntries(): Promise<void>;
161
161
  }
162
162
 
163
- // @public (undocumented)
163
+ // @alpha (undocumented)
164
164
  export interface IPrefetchSnapshotContents extends ISnapshotContents {
165
165
  // (undocumented)
166
166
  fluidEpoch: string;
@@ -168,13 +168,13 @@ export interface IPrefetchSnapshotContents extends ISnapshotContents {
168
168
  prefetchStartTime: number;
169
169
  }
170
170
 
171
- // @public (undocumented)
171
+ // @internal (undocumented)
172
172
  export interface ISharingLinkHeader {
173
173
  // (undocumented)
174
174
  [SharingLinkHeader.isSharingLinkToRedeem]: boolean;
175
175
  }
176
176
 
177
- // @public (undocumented)
177
+ // @alpha (undocumented)
178
178
  export interface ISnapshotContents {
179
179
  // (undocumented)
180
180
  blobs: Map<string, ArrayBuffer>;
@@ -186,36 +186,39 @@ export interface ISnapshotContents {
186
186
  snapshotTree: ISnapshotTree;
187
187
  }
188
188
 
189
- // @public
189
+ // @internal
190
190
  export interface ISnapshotContentsWithProps extends ISnapshotContents {
191
191
  // (undocumented)
192
192
  telemetryProps: Record<string, number>;
193
193
  }
194
194
 
195
- // @public
195
+ // @internal
196
196
  export function isOdcOrigin(origin: string): boolean;
197
197
 
198
- // @public
198
+ // @internal
199
199
  export function isOdcUrl(url: string | URL): boolean;
200
200
 
201
- // @public
201
+ // @internal (undocumented)
202
+ export function isOdspResolvedUrl(resolvedUrl: IResolvedUrl): resolvedUrl is IOdspResolvedUrl;
203
+
204
+ // @internal
202
205
  export function isSpoUrl(url: string): boolean;
203
206
 
204
- // @public
207
+ // @internal
205
208
  export const locatorQueryParamName = "nav";
206
209
 
207
- // @public (undocumented)
210
+ // @internal (undocumented)
208
211
  export const OdcApiSiteOrigin = "https://my.microsoftpersonalcontent.com";
209
212
 
210
- // @public (undocumented)
213
+ // @internal (undocumented)
211
214
  export const OdcFileSiteOrigin = "https://1drv.ms";
212
215
 
213
- // @public
216
+ // @alpha
214
217
  export class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {
215
218
  constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);
216
219
  }
217
220
 
218
- // @public
221
+ // @alpha
219
222
  export class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory, IRelaySessionAwareDriverFactory {
220
223
  constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);
221
224
  // (undocumented)
@@ -233,12 +236,12 @@ export class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory,
233
236
  get snapshotPrefetchResultCache(): PromiseCache<string, IPrefetchSnapshotContents_2>;
234
237
  }
235
238
 
236
- // @public @deprecated (undocumented)
239
+ // @internal @deprecated (undocumented)
237
240
  export class OdspDocumentServiceFactoryWithCodeSplit extends OdspDocumentServiceFactoryCore implements IDocumentServiceFactory {
238
241
  constructor(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy);
239
242
  }
240
243
 
241
- // @public
244
+ // @alpha
242
245
  export class OdspDriverUrlResolver implements IUrlResolver {
243
246
  constructor();
244
247
  getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string, packageInfoSource?: IContainerPackageInfo): Promise<string>;
@@ -246,7 +249,7 @@ export class OdspDriverUrlResolver implements IUrlResolver {
246
249
  resolve(request: IRequest): Promise<IOdspResolvedUrl>;
247
250
  }
248
251
 
249
- // @public
252
+ // @internal
250
253
  export class OdspDriverUrlResolverForShareLink implements IUrlResolver {
251
254
  constructor(shareLinkFetcherProps?: ShareLinkFetcherProps | undefined, logger?: ITelemetryBaseLogger, appName?: string | undefined, getContext?: ((resolvedUrl: IOdspResolvedUrl, dataStorePath: string) => Promise<string | undefined>) | undefined);
252
255
  appendDataStorePath(requestUrl: URL, pathToAppend: string): string | undefined;
@@ -257,7 +260,7 @@ export class OdspDriverUrlResolverForShareLink implements IUrlResolver {
257
260
  resolve(request: IRequest): Promise<IOdspResolvedUrl>;
258
261
  }
259
262
 
260
- // @public (undocumented)
263
+ // @internal (undocumented)
261
264
  export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
262
265
  // (undocumented)
263
266
  appName?: string;
@@ -271,25 +274,25 @@ export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
271
274
  fileVersion?: string;
272
275
  }
273
276
 
274
- // @public
277
+ // @internal
275
278
  export function parseCompactSnapshotResponse(buffer: Uint8Array, logger: ITelemetryLoggerExt): ISnapshotContentsWithProps;
276
279
 
277
- // @public
280
+ // @internal
278
281
  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>;
279
282
 
280
- // @public
283
+ // @internal
281
284
  export interface ShareLinkFetcherProps {
282
285
  identityType: IdentityType;
283
286
  tokenFetcher: TokenFetcher<OdspResourceTokenFetchOptions>;
284
287
  }
285
288
 
286
- // @public (undocumented)
289
+ // @internal (undocumented)
287
290
  export enum SharingLinkHeader {
288
291
  // (undocumented)
289
292
  isSharingLinkToRedeem = "isSharingLinkToRedeem"
290
293
  }
291
294
 
292
- // @public
295
+ // @internal
293
296
  export enum SnapshotFormatSupportType {
294
297
  // (undocumented)
295
298
  Binary = 1,
@@ -299,7 +302,7 @@ export enum SnapshotFormatSupportType {
299
302
  JsonAndBinary = 2
300
303
  }
301
304
 
302
- // @public
305
+ // @internal
303
306
  export function storeLocatorInOdspUrl(url: URL, locator: OdspFluidDataStoreLocator): void;
304
307
 
305
308
  // (No @packageDocumentation comment for this package)
package/dist/checkUrl.cjs CHANGED
@@ -11,7 +11,7 @@ const odspFluidFileLink_1 = require("./odspFluidFileLink.cjs");
11
11
  * Note that returning information here is NOT a full guarantee that resolve will ultimately be successful.
12
12
  * Instead, this should be used as a lightweight check that can filter out easily detectable unsupported URLs
13
13
  * before the entire Fluid loading process needs to be kicked off.
14
- * @public
14
+ * @internal
15
15
  */
16
16
  function checkUrl(documentUrl) {
17
17
  const locator = (0, odspFluidFileLink_1.getLocatorFromOdspUrl)(documentUrl);
@@ -1 +1 @@
1
- {"version":3,"file":"checkUrl.cjs","sourceRoot":"","sources":["../src/checkUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAA4D;AAE5D;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,WAAgB;IACxC,MAAM,OAAO,GAAG,IAAA,yCAAqB,EAAC,WAAW,CAAC,CAAC;IAEnD,IAAI,CAAC,OAAO,EAAE;QACb,OAAO,SAAS,CAAC;KACjB;IAED,IAAI,UAA8B,CAAC;IACnC,IAAI;QACH,IAAI,OAAO,EAAE,OAAO,EAAE;YACrB,UAAU,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC;SAC9C;KACD;IAAC,MAAM,GAAE;IAEV,OAAO;QACN,eAAe,EAAE,OAAO,EAAE,oBAAoB;QAC9C,uEAAuE;QACvE,mBAAmB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;KAC1D,CAAC;AACH,CAAC;AAnBD,4BAmBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { DriverPreCheckInfo } from \"@fluidframework/driver-definitions\";\nimport { getLocatorFromOdspUrl } from \"./odspFluidFileLink\";\n\n/**\n * A check that returns DriverPreCheckInfo if the URL format is likely supported by this driver.\n * Note that returning information here is NOT a full guarantee that resolve will ultimately be successful.\n * Instead, this should be used as a lightweight check that can filter out easily detectable unsupported URLs\n * before the entire Fluid loading process needs to be kicked off.\n * @public\n */\nexport function checkUrl(documentUrl: URL): DriverPreCheckInfo | undefined {\n\tconst locator = getLocatorFromOdspUrl(documentUrl);\n\n\tif (!locator) {\n\t\treturn undefined;\n\t}\n\n\tlet siteOrigin: string | undefined;\n\ttry {\n\t\tif (locator?.siteUrl) {\n\t\t\tsiteOrigin = new URL(locator?.siteUrl).origin;\n\t\t}\n\t} catch {}\n\n\treturn {\n\t\tcodeDetailsHint: locator?.containerPackageName,\n\t\t// Add the snapshot endpoint, which has the same domain as the site URL\n\t\tcriticalBootDomains: siteOrigin ? [siteOrigin] : undefined,\n\t};\n}\n"]}
1
+ {"version":3,"file":"checkUrl.cjs","sourceRoot":"","sources":["../src/checkUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAA4D;AAE5D;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,WAAgB;IACxC,MAAM,OAAO,GAAG,IAAA,yCAAqB,EAAC,WAAW,CAAC,CAAC;IAEnD,IAAI,CAAC,OAAO,EAAE;QACb,OAAO,SAAS,CAAC;KACjB;IAED,IAAI,UAA8B,CAAC;IACnC,IAAI;QACH,IAAI,OAAO,EAAE,OAAO,EAAE;YACrB,UAAU,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC;SAC9C;KACD;IAAC,MAAM,GAAE;IAEV,OAAO;QACN,eAAe,EAAE,OAAO,EAAE,oBAAoB;QAC9C,uEAAuE;QACvE,mBAAmB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;KAC1D,CAAC;AACH,CAAC;AAnBD,4BAmBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { DriverPreCheckInfo } from \"@fluidframework/driver-definitions\";\nimport { getLocatorFromOdspUrl } from \"./odspFluidFileLink\";\n\n/**\n * A check that returns DriverPreCheckInfo if the URL format is likely supported by this driver.\n * Note that returning information here is NOT a full guarantee that resolve will ultimately be successful.\n * Instead, this should be used as a lightweight check that can filter out easily detectable unsupported URLs\n * before the entire Fluid loading process needs to be kicked off.\n * @internal\n */\nexport function checkUrl(documentUrl: URL): DriverPreCheckInfo | undefined {\n\tconst locator = getLocatorFromOdspUrl(documentUrl);\n\n\tif (!locator) {\n\t\treturn undefined;\n\t}\n\n\tlet siteOrigin: string | undefined;\n\ttry {\n\t\tif (locator?.siteUrl) {\n\t\t\tsiteOrigin = new URL(locator?.siteUrl).origin;\n\t\t}\n\t} catch {}\n\n\treturn {\n\t\tcodeDetailsHint: locator?.containerPackageName,\n\t\t// Add the snapshot endpoint, which has the same domain as the site URL\n\t\tcriticalBootDomains: siteOrigin ? [siteOrigin] : undefined,\n\t};\n}\n"]}
@@ -8,7 +8,7 @@ import { DriverPreCheckInfo } from "@fluidframework/driver-definitions";
8
8
  * Note that returning information here is NOT a full guarantee that resolve will ultimately be successful.
9
9
  * Instead, this should be used as a lightweight check that can filter out easily detectable unsupported URLs
10
10
  * before the entire Fluid loading process needs to be kicked off.
11
- * @public
11
+ * @internal
12
12
  */
13
13
  export declare function checkUrl(documentUrl: URL): DriverPreCheckInfo | undefined;
14
14
  //# sourceMappingURL=checkUrl.d.ts.map
@@ -172,7 +172,7 @@ function readSnapshotSection(node) {
172
172
  * Converts snapshot from binary compact representation to tree/blobs/ops.
173
173
  * @param buffer - Compact snapshot to be parsed into tree/blobs/ops.
174
174
  * @returns Tree, blobs and ops from the snapshot.
175
- * @public
175
+ * @internal
176
176
  */
177
177
  function parseCompactSnapshotResponse(buffer, logger) {
178
178
  const { builder, telemetryProps } = zipItDataRepresentationUtils_1.TreeBuilder.load(new ReadBufferUtils_1.ReadBuffer(buffer), logger);
@@ -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,OAAO,CAAC,GAAG;QACjC,cAAc,EAAE;YACf,GAAG,cAAc;YACjB,oBAAoB;YACpB,aAAa;YACb,sBAAsB,EAAE,QAAQ,CAAC,sBAAsB;YACvD,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;SACpD;KACD,CAAC;AACH,CAAC;AA7CD,oEA6CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { ISequencedDocumentMessage, ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport { ISnapshotContents } from \"./odspPublicUtils\";\nimport { ReadBuffer } from \"./ReadBufferUtils\";\nimport {\n\tassertBlobCoreInstance,\n\tgetStringInstance,\n\tassertBoolInstance,\n\tassertNodeCoreInstance,\n\tassertNumberInstance,\n\tgetNodeProps,\n\tNodeCore,\n\tNodeTypes,\n\tTreeBuilder,\n} from \"./zipItDataRepresentationUtils\";\nimport { measure } from \"./odspUtils\";\n\nexport const snapshotMinReadVersion = \"1.0\";\nexport const currentReadVersion = \"1.0\";\n\n/**\n * The parsing is significantly faster if the position of props is well known instead of dynamic. So these variables\n * represents how many times slower parsing path is executed. This will be then logged into telemetry.\n * @public\n */\nexport interface ISnapshotContentsWithProps extends ISnapshotContents {\n\ttelemetryProps: Record<string, number>;\n}\n\n/**\n * Recreates blobs section of the tree.\n * @param node - tree node to read blob section from\n */\nfunction readBlobSection(node: NodeTypes) {\n\tassertNodeCoreInstance(node, \"TreeBlobs should be of type NodeCore\");\n\tlet slowBlobStructureCount = 0;\n\tconst blobs: Map<string, ArrayBuffer> = new Map();\n\tfor (const blob of node) {\n\t\tassertNodeCoreInstance(blob, \"blob should be node\");\n\n\t\t/**\n\t\t * Perf optimization - the most common cases!\n\t\t * This is essentially unrolling code below for faster processing\n\t\t * It speeds up tree parsing by 2-3x times!\n\t\t */\n\t\tif (\n\t\t\tblob.length === 4 &&\n\t\t\tblob.getMaybeString(0) === \"id\" &&\n\t\t\tblob.getMaybeString(2) === \"data\"\n\t\t) {\n\t\t\t// \"id\": <node name>\n\t\t\t// \"data\": <blob>\n\t\t\tblobs.set(blob.getString(1), blob.getBlob(3).arrayBuffer);\n\t\t\tcontinue;\n\t\t}\n\n\t\t/**\n\t\t * More generalized workflow\n\t\t */\n\t\tslowBlobStructureCount += 1;\n\t\tconst records = getNodeProps(blob);\n\t\tassertBlobCoreInstance(records.data, \"data should be of BlobCore type\");\n\t\tconst id = getStringInstance(records.id, \"blob id should be string\");\n\t\tblobs.set(id, records.data.arrayBuffer);\n\t}\n\treturn { blobs, slowBlobStructureCount };\n}\n\n/**\n * Recreates ops section of the tree.\n * @param node - tree node to read ops section from\n */\nfunction readOpsSection(node: NodeTypes) {\n\tassertNodeCoreInstance(node, \"Deltas should be of type NodeCore\");\n\tconst ops: ISequencedDocumentMessage[] = [];\n\tconst records = getNodeProps(node);\n\tassertNumberInstance(records.firstSequenceNumber, \"Seq number should be a number\");\n\tassertNodeCoreInstance(records.deltas, \"Deltas should be a Node\");\n\tfor (let i = 0; i < records.deltas.length; ++i) {\n\t\tops.push(JSON.parse(records.deltas.getString(i)));\n\t}\n\t// Due to a bug at service side, in an edge case service was serializing deltas even\n\t// when there are no ops. So just make the code resilient to that bug. Service has also\n\t// fixed that bug.\n\tassert(\n\t\tops.length === 0 || records.firstSequenceNumber.valueOf() === ops[0].sequenceNumber,\n\t\t0x280 /* \"Validate first op seq number\" */,\n\t);\n\treturn ops;\n}\n\n/**\n * Recreates snapshot tree out of tree representation.\n * @param node - tree node to de-serialize from\n */\nfunction readTreeSection(node: NodeCore) {\n\tlet slowTreeStructureCount = 0;\n\tconst trees = {};\n\tconst snapshotTree: ISnapshotTree = {\n\t\tblobs: {},\n\t\ttrees,\n\t};\n\tfor (const treeNode of node) {\n\t\tassertNodeCoreInstance(treeNode, \"tree nodes should be nodes\");\n\n\t\t/**\n\t\t * Perf optimization - the most common cases!\n\t\t * This is essentially unrolling code below for faster processing\n\t\t * It speeds up tree parsing by 2-3x times!\n\t\t */\n\t\tconst length = treeNode.length;\n\t\tif (length > 0 && treeNode.getMaybeString(0) === \"name\") {\n\t\t\tif (length === 4) {\n\t\t\t\tconst content = treeNode.getMaybeString(2);\n\t\t\t\t// \"name\": <node name>\n\t\t\t\t// \"children\": <blob id>\n\t\t\t\tif (content === \"children\") {\n\t\t\t\t\tconst result = readTreeSection(treeNode.getNode(3));\n\t\t\t\t\ttrees[treeNode.getString(1)] = result.snapshotTree;\n\t\t\t\t\tslowTreeStructureCount += result.slowTreeStructureCount;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// \"name\": <node name>\n\t\t\t\t// \"value\": <blob id>\n\t\t\t\tif (content === \"value\") {\n\t\t\t\t\tsnapshotTree.blobs[treeNode.getString(1)] = treeNode.getString(3);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// \"name\": <node name>\n\t\t\t// \"nodeType\": 3\n\t\t\t// \"value\": <blob id>\n\t\t\tif (\n\t\t\t\tlength === 6 &&\n\t\t\t\ttreeNode.getMaybeString(2) === \"nodeType\" &&\n\t\t\t\ttreeNode.getMaybeString(4) === \"value\"\n\t\t\t) {\n\t\t\t\tsnapshotTree.blobs[treeNode.getString(1)] = treeNode.getString(5);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// \"name\": <node name>\n\t\t\t// \"unreferenced\": true\n\t\t\t// \"children\": <blob id>\n\t\t\tif (\n\t\t\t\tlength === 6 &&\n\t\t\t\ttreeNode.getMaybeString(2) === \"unreferenced\" &&\n\t\t\t\ttreeNode.getMaybeString(4) === \"children\"\n\t\t\t) {\n\t\t\t\tconst result = readTreeSection(treeNode.getNode(5));\n\t\t\t\ttrees[treeNode.getString(1)] = result.snapshotTree;\n\t\t\t\tslowTreeStructureCount += result.slowTreeStructureCount;\n\t\t\t\tassert(treeNode.getBool(3), 0x3db /* Unreferenced if present should be true */);\n\t\t\t\tsnapshotTree.unreferenced = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * More generalized workflow\n\t\t */\n\t\tslowTreeStructureCount += 1;\n\t\tconst records = getNodeProps(treeNode);\n\n\t\tif (records.unreferenced !== undefined) {\n\t\t\tassertBoolInstance(records.unreferenced, \"Unreferenced flag should be bool\");\n\t\t\tassert(records.unreferenced, 0x281 /* \"Unreferenced if present should be true\" */);\n\t\t\tsnapshotTree.unreferenced = true;\n\t\t}\n\n\t\tconst path = getStringInstance(records.name, \"Path name should be string\");\n\t\tif (records.value !== undefined) {\n\t\t\tsnapshotTree.blobs[path] = getStringInstance(\n\t\t\t\trecords.value,\n\t\t\t\t\"Blob value should be string\",\n\t\t\t);\n\t\t} else if (records.children !== undefined) {\n\t\t\tassertNodeCoreInstance(records.children, \"Trees should be of type NodeCore\");\n\t\t\tconst result = readTreeSection(records.children);\n\t\t\ttrees[path] = result.snapshotTree;\n\t\t\tslowTreeStructureCount += result.slowTreeStructureCount;\n\t\t} else {\n\t\t\ttrees[path] = { blobs: {}, trees: {} };\n\t\t}\n\t}\n\treturn { snapshotTree, slowTreeStructureCount };\n}\n\n/**\n * Recreates snapshot tree out of tree representation.\n * @param node - tree node to de-serialize from\n */\nfunction readSnapshotSection(node: NodeTypes) {\n\tassertNodeCoreInstance(node, \"Snapshot should be of type NodeCore\");\n\tconst records = getNodeProps(node);\n\n\tassertNodeCoreInstance(records.treeNodes, \"TreeNodes should be of type NodeCore\");\n\tassertNumberInstance(records.sequenceNumber, \"sequenceNumber should be of type number\");\n\tconst { snapshotTree, slowTreeStructureCount } = readTreeSection(records.treeNodes);\n\tsnapshotTree.id = getStringInstance(records.id, \"snapshotId should be string\");\n\tconst sequenceNumber = records.sequenceNumber.valueOf();\n\treturn {\n\t\tsequenceNumber,\n\t\tsnapshotTree,\n\t\tslowTreeStructureCount,\n\t};\n}\n\n/**\n * Converts snapshot from binary compact representation to tree/blobs/ops.\n * @param buffer - Compact snapshot to be parsed into tree/blobs/ops.\n * @returns Tree, blobs and ops from the snapshot.\n * @public\n */\nexport function parseCompactSnapshotResponse(\n\tbuffer: Uint8Array,\n\tlogger: ITelemetryLoggerExt,\n): ISnapshotContentsWithProps {\n\tconst { builder, telemetryProps } = TreeBuilder.load(new ReadBuffer(buffer), logger);\n\tassert(builder.length === 1, 0x219 /* \"1 root should be there\" */);\n\tconst root = builder.getNode(0);\n\n\tconst records = getNodeProps(root);\n\n\tconst mrv = getStringInstance(records.mrv, \"minReadVersion should be string\");\n\tconst cv = getStringInstance(records.cv, \"createVersion should be string\");\n\tif (records.lsn !== undefined) {\n\t\tassertNumberInstance(records.lsn, \"lsn should be a number\");\n\t}\n\n\tassert(\n\t\tparseFloat(snapshotMinReadVersion) >= parseFloat(mrv),\n\t\t0x20f /* \"Driver min read version should >= to server minReadVersion\" */,\n\t);\n\tassert(\n\t\tparseFloat(cv) >= parseFloat(snapshotMinReadVersion),\n\t\t0x210 /* \"Snapshot should be created with minReadVersion or above\" */,\n\t);\n\tassert(\n\t\tcurrentReadVersion === cv,\n\t\t0x2c2 /* \"Create Version should be equal to currentReadVersion\" */,\n\t);\n\n\tconst [snapshot, durationSnapshotTree] = measure(() => readSnapshotSection(records.snapshot));\n\tconst [blobs, durationBlobs] = measure(() => readBlobSection(records.blobs));\n\n\treturn {\n\t\t...snapshot,\n\t\t...blobs,\n\t\tops: records.deltas !== undefined ? readOpsSection(records.deltas) : [],\n\t\tlatestSequenceNumber: records.lsn,\n\t\ttelemetryProps: {\n\t\t\t...telemetryProps,\n\t\t\tdurationSnapshotTree,\n\t\t\tdurationBlobs,\n\t\t\tslowTreeStructureCount: snapshot.slowTreeStructureCount,\n\t\t\tslowBlobStructureCount: blobs.slowBlobStructureCount,\n\t\t},\n\t};\n}\n"]}
1
+ {"version":3,"file":"compactSnapshotParser.cjs","sourceRoot":"","sources":["../src/compactSnapshotParser.ts"],"names":[],"mappings":";AA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EAAE,QAAQ,CAAC,sBAAsB;YACvD,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;SACpD;KACD,CAAC;AACH,CAAC;AA7CD,oEA6CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { ISequencedDocumentMessage, ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport { ISnapshotContents } from \"./odspPublicUtils\";\nimport { ReadBuffer } from \"./ReadBufferUtils\";\nimport {\n\tassertBlobCoreInstance,\n\tgetStringInstance,\n\tassertBoolInstance,\n\tassertNodeCoreInstance,\n\tassertNumberInstance,\n\tgetNodeProps,\n\tNodeCore,\n\tNodeTypes,\n\tTreeBuilder,\n} from \"./zipItDataRepresentationUtils\";\nimport { measure } from \"./odspUtils\";\n\nexport const snapshotMinReadVersion = \"1.0\";\nexport const currentReadVersion = \"1.0\";\n\n/**\n * The parsing is significantly faster if the position of props is well known instead of dynamic. So these variables\n * represents how many times slower parsing path is executed. This will be then logged into telemetry.\n * @internal\n */\nexport interface ISnapshotContentsWithProps extends ISnapshotContents {\n\ttelemetryProps: Record<string, number>;\n}\n\n/**\n * Recreates blobs section of the tree.\n * @param node - tree node to read blob section from\n */\nfunction readBlobSection(node: NodeTypes) {\n\tassertNodeCoreInstance(node, \"TreeBlobs should be of type NodeCore\");\n\tlet slowBlobStructureCount = 0;\n\tconst blobs: Map<string, ArrayBuffer> = new Map();\n\tfor (const blob of node) {\n\t\tassertNodeCoreInstance(blob, \"blob should be node\");\n\n\t\t/**\n\t\t * Perf optimization - the most common cases!\n\t\t * This is essentially unrolling code below for faster processing\n\t\t * It speeds up tree parsing by 2-3x times!\n\t\t */\n\t\tif (\n\t\t\tblob.length === 4 &&\n\t\t\tblob.getMaybeString(0) === \"id\" &&\n\t\t\tblob.getMaybeString(2) === \"data\"\n\t\t) {\n\t\t\t// \"id\": <node name>\n\t\t\t// \"data\": <blob>\n\t\t\tblobs.set(blob.getString(1), blob.getBlob(3).arrayBuffer);\n\t\t\tcontinue;\n\t\t}\n\n\t\t/**\n\t\t * More generalized workflow\n\t\t */\n\t\tslowBlobStructureCount += 1;\n\t\tconst records = getNodeProps(blob);\n\t\tassertBlobCoreInstance(records.data, \"data should be of BlobCore type\");\n\t\tconst id = getStringInstance(records.id, \"blob id should be string\");\n\t\tblobs.set(id, records.data.arrayBuffer);\n\t}\n\treturn { blobs, slowBlobStructureCount };\n}\n\n/**\n * Recreates ops section of the tree.\n * @param node - tree node to read ops section from\n */\nfunction readOpsSection(node: NodeTypes) {\n\tassertNodeCoreInstance(node, \"Deltas should be of type NodeCore\");\n\tconst ops: ISequencedDocumentMessage[] = [];\n\tconst records = getNodeProps(node);\n\tassertNumberInstance(records.firstSequenceNumber, \"Seq number should be a number\");\n\tassertNodeCoreInstance(records.deltas, \"Deltas should be a Node\");\n\tfor (let i = 0; i < records.deltas.length; ++i) {\n\t\tops.push(JSON.parse(records.deltas.getString(i)));\n\t}\n\t// Due to a bug at service side, in an edge case service was serializing deltas even\n\t// when there are no ops. So just make the code resilient to that bug. Service has also\n\t// fixed that bug.\n\tassert(\n\t\tops.length === 0 || records.firstSequenceNumber.valueOf() === ops[0].sequenceNumber,\n\t\t0x280 /* \"Validate first op seq number\" */,\n\t);\n\treturn ops;\n}\n\n/**\n * Recreates snapshot tree out of tree representation.\n * @param node - tree node to de-serialize from\n */\nfunction readTreeSection(node: NodeCore) {\n\tlet slowTreeStructureCount = 0;\n\tconst trees = {};\n\tconst snapshotTree: ISnapshotTree = {\n\t\tblobs: {},\n\t\ttrees,\n\t};\n\tfor (const treeNode of node) {\n\t\tassertNodeCoreInstance(treeNode, \"tree nodes should be nodes\");\n\n\t\t/**\n\t\t * Perf optimization - the most common cases!\n\t\t * This is essentially unrolling code below for faster processing\n\t\t * It speeds up tree parsing by 2-3x times!\n\t\t */\n\t\tconst length = treeNode.length;\n\t\tif (length > 0 && treeNode.getMaybeString(0) === \"name\") {\n\t\t\tif (length === 4) {\n\t\t\t\tconst content = treeNode.getMaybeString(2);\n\t\t\t\t// \"name\": <node name>\n\t\t\t\t// \"children\": <blob id>\n\t\t\t\tif (content === \"children\") {\n\t\t\t\t\tconst result = readTreeSection(treeNode.getNode(3));\n\t\t\t\t\ttrees[treeNode.getString(1)] = result.snapshotTree;\n\t\t\t\t\tslowTreeStructureCount += result.slowTreeStructureCount;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// \"name\": <node name>\n\t\t\t\t// \"value\": <blob id>\n\t\t\t\tif (content === \"value\") {\n\t\t\t\t\tsnapshotTree.blobs[treeNode.getString(1)] = treeNode.getString(3);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// \"name\": <node name>\n\t\t\t// \"nodeType\": 3\n\t\t\t// \"value\": <blob id>\n\t\t\tif (\n\t\t\t\tlength === 6 &&\n\t\t\t\ttreeNode.getMaybeString(2) === \"nodeType\" &&\n\t\t\t\ttreeNode.getMaybeString(4) === \"value\"\n\t\t\t) {\n\t\t\t\tsnapshotTree.blobs[treeNode.getString(1)] = treeNode.getString(5);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// \"name\": <node name>\n\t\t\t// \"unreferenced\": true\n\t\t\t// \"children\": <blob id>\n\t\t\tif (\n\t\t\t\tlength === 6 &&\n\t\t\t\ttreeNode.getMaybeString(2) === \"unreferenced\" &&\n\t\t\t\ttreeNode.getMaybeString(4) === \"children\"\n\t\t\t) {\n\t\t\t\tconst result = readTreeSection(treeNode.getNode(5));\n\t\t\t\ttrees[treeNode.getString(1)] = result.snapshotTree;\n\t\t\t\tslowTreeStructureCount += result.slowTreeStructureCount;\n\t\t\t\tassert(treeNode.getBool(3), 0x3db /* Unreferenced if present should be true */);\n\t\t\t\tsnapshotTree.unreferenced = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * More generalized workflow\n\t\t */\n\t\tslowTreeStructureCount += 1;\n\t\tconst records = getNodeProps(treeNode);\n\n\t\tif (records.unreferenced !== undefined) {\n\t\t\tassertBoolInstance(records.unreferenced, \"Unreferenced flag should be bool\");\n\t\t\tassert(records.unreferenced, 0x281 /* \"Unreferenced if present should be true\" */);\n\t\t\tsnapshotTree.unreferenced = true;\n\t\t}\n\n\t\tconst path = getStringInstance(records.name, \"Path name should be string\");\n\t\tif (records.value !== undefined) {\n\t\t\tsnapshotTree.blobs[path] = getStringInstance(\n\t\t\t\trecords.value,\n\t\t\t\t\"Blob value should be string\",\n\t\t\t);\n\t\t} else if (records.children !== undefined) {\n\t\t\tassertNodeCoreInstance(records.children, \"Trees should be of type NodeCore\");\n\t\t\tconst result = readTreeSection(records.children);\n\t\t\ttrees[path] = result.snapshotTree;\n\t\t\tslowTreeStructureCount += result.slowTreeStructureCount;\n\t\t} else {\n\t\t\ttrees[path] = { blobs: {}, trees: {} };\n\t\t}\n\t}\n\treturn { snapshotTree, slowTreeStructureCount };\n}\n\n/**\n * Recreates snapshot tree out of tree representation.\n * @param node - tree node to de-serialize from\n */\nfunction readSnapshotSection(node: NodeTypes) {\n\tassertNodeCoreInstance(node, \"Snapshot should be of type NodeCore\");\n\tconst records = getNodeProps(node);\n\n\tassertNodeCoreInstance(records.treeNodes, \"TreeNodes should be of type NodeCore\");\n\tassertNumberInstance(records.sequenceNumber, \"sequenceNumber should be of type number\");\n\tconst { snapshotTree, slowTreeStructureCount } = readTreeSection(records.treeNodes);\n\tsnapshotTree.id = getStringInstance(records.id, \"snapshotId should be string\");\n\tconst sequenceNumber = records.sequenceNumber.valueOf();\n\treturn {\n\t\tsequenceNumber,\n\t\tsnapshotTree,\n\t\tslowTreeStructureCount,\n\t};\n}\n\n/**\n * Converts snapshot from binary compact representation to tree/blobs/ops.\n * @param buffer - Compact snapshot to be parsed into tree/blobs/ops.\n * @returns Tree, blobs and ops from the snapshot.\n * @internal\n */\nexport function parseCompactSnapshotResponse(\n\tbuffer: Uint8Array,\n\tlogger: ITelemetryLoggerExt,\n): ISnapshotContentsWithProps {\n\tconst { builder, telemetryProps } = TreeBuilder.load(new ReadBuffer(buffer), logger);\n\tassert(builder.length === 1, 0x219 /* \"1 root should be there\" */);\n\tconst root = builder.getNode(0);\n\n\tconst records = getNodeProps(root);\n\n\tconst mrv = getStringInstance(records.mrv, \"minReadVersion should be string\");\n\tconst cv = getStringInstance(records.cv, \"createVersion should be string\");\n\tif (records.lsn !== undefined) {\n\t\tassertNumberInstance(records.lsn, \"lsn should be a number\");\n\t}\n\n\tassert(\n\t\tparseFloat(snapshotMinReadVersion) >= parseFloat(mrv),\n\t\t0x20f /* \"Driver min read version should >= to server minReadVersion\" */,\n\t);\n\tassert(\n\t\tparseFloat(cv) >= parseFloat(snapshotMinReadVersion),\n\t\t0x210 /* \"Snapshot should be created with minReadVersion or above\" */,\n\t);\n\tassert(\n\t\tcurrentReadVersion === cv,\n\t\t0x2c2 /* \"Create Version should be equal to currentReadVersion\" */,\n\t);\n\n\tconst [snapshot, durationSnapshotTree] = measure(() => readSnapshotSection(records.snapshot));\n\tconst [blobs, durationBlobs] = measure(() => readBlobSection(records.blobs));\n\n\treturn {\n\t\t...snapshot,\n\t\t...blobs,\n\t\tops: records.deltas !== undefined ? readOpsSection(records.deltas) : [],\n\t\tlatestSequenceNumber: records.lsn,\n\t\ttelemetryProps: {\n\t\t\t...telemetryProps,\n\t\t\tdurationSnapshotTree,\n\t\t\tdurationBlobs,\n\t\t\tslowTreeStructureCount: snapshot.slowTreeStructureCount,\n\t\t\tslowBlobStructureCount: blobs.slowBlobStructureCount,\n\t\t},\n\t};\n}\n"]}
@@ -9,7 +9,7 @@ export declare const currentReadVersion = "1.0";
9
9
  /**
10
10
  * The parsing is significantly faster if the position of props is well known instead of dynamic. So these variables
11
11
  * represents how many times slower parsing path is executed. This will be then logged into telemetry.
12
- * @public
12
+ * @internal
13
13
  */
14
14
  export interface ISnapshotContentsWithProps extends ISnapshotContents {
15
15
  telemetryProps: Record<string, number>;
@@ -18,7 +18,7 @@ export interface ISnapshotContentsWithProps extends ISnapshotContents {
18
18
  * Converts snapshot from binary compact representation to tree/blobs/ops.
19
19
  * @param buffer - Compact snapshot to be parsed into tree/blobs/ops.
20
20
  * @returns Tree, blobs and ops from the snapshot.
21
- * @public
21
+ * @internal
22
22
  */
23
23
  export declare function parseCompactSnapshotResponse(buffer: Uint8Array, logger: ITelemetryLoggerExt): ISnapshotContentsWithProps;
24
24
  //# sourceMappingURL=compactSnapshotParser.d.ts.map
@@ -6,11 +6,11 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.OdcFileSiteOrigin = exports.OdcApiSiteOrigin = void 0;
8
8
  /**
9
- * @public
9
+ * @internal
10
10
  */
11
11
  exports.OdcApiSiteOrigin = "https://my.microsoftpersonalcontent.com";
12
12
  /**
13
- * @public
13
+ * @internal
14
14
  */
15
15
  exports.OdcFileSiteOrigin = "https://1drv.ms";
16
16
  //# sourceMappingURL=constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACU,QAAA,gBAAgB,GAAG,yCAAyC,CAAC;AAE1E;;GAEG;AACU,QAAA,iBAAiB,GAAG,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @public\n */\nexport const OdcApiSiteOrigin = \"https://my.microsoftpersonalcontent.com\";\n\n/**\n * @public\n */\nexport const OdcFileSiteOrigin = \"https://1drv.ms\";\n"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACU,QAAA,gBAAgB,GAAG,yCAAyC,CAAC;AAE1E;;GAEG;AACU,QAAA,iBAAiB,GAAG,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @internal\n */\nexport const OdcApiSiteOrigin = \"https://my.microsoftpersonalcontent.com\";\n\n/**\n * @internal\n */\nexport const OdcFileSiteOrigin = \"https://1drv.ms\";\n"]}
@@ -3,11 +3,11 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * @public
6
+ * @internal
7
7
  */
8
8
  export declare const OdcApiSiteOrigin = "https://my.microsoftpersonalcontent.com";
9
9
  /**
10
- * @public
10
+ * @internal
11
11
  */
12
12
  export declare const OdcFileSiteOrigin = "https://1drv.ms";
13
13
  //# sourceMappingURL=constants.d.ts.map
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.ClpCompliantAppHeader = exports.SharingLinkHeader = void 0;
8
8
  /**
9
- * @public
9
+ * @internal
10
10
  */
11
11
  var SharingLinkHeader;
12
12
  (function (SharingLinkHeader) {
@@ -15,7 +15,7 @@ var SharingLinkHeader;
15
15
  SharingLinkHeader["isSharingLinkToRedeem"] = "isSharingLinkToRedeem";
16
16
  })(SharingLinkHeader || (exports.SharingLinkHeader = SharingLinkHeader = {}));
17
17
  /**
18
- * @public
18
+ * @internal
19
19
  */
20
20
  var ClpCompliantAppHeader;
21
21
  (function (ClpCompliantAppHeader) {
@@ -1 +1 @@
1
- {"version":3,"file":"contractsPublic.cjs","sourceRoot":"","sources":["../src/contractsPublic.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH;;GAEG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,yGAAyG;IACzG,sDAAsD;IACtD,oEAA+C,CAAA;AAChD,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAQD;;GAEG;AACH,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAChC,oGAAoG;IACpG,wGAAwG;IACxG,kEAAyC,CAAA;AAC1C,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IOdspUrlParts } from \"@fluidframework/odsp-driver-definitions\";\n\n/**\n * @public\n */\nexport interface OdspFluidDataStoreLocator extends IOdspUrlParts {\n\tdataStorePath: string;\n\tappName?: string;\n\tcontainerPackageName?: string;\n\tfileVersion?: string;\n\tcontext?: string;\n}\n\n/**\n * @public\n */\nexport enum SharingLinkHeader {\n\t// Can be used in request made to resolver, to tell the resolver that the passed in URL is a sharing link\n\t// which can be redeemed at server to get permissions.\n\tisSharingLinkToRedeem = \"isSharingLinkToRedeem\",\n}\n\n/**\n * @public\n */\nexport interface ISharingLinkHeader {\n\t[SharingLinkHeader.isSharingLinkToRedeem]: boolean;\n}\n/**\n * @public\n */\nexport enum ClpCompliantAppHeader {\n\t// Can be used in request made to resolver, to tell the resolver that the host app is CLP compliant.\n\t// Odsp will not return Classified, labeled, or protected documents if the host app cannot support them.\n\tisClpCompliantApp = \"X-CLP-Compliant-App\",\n}\n\n/**\n * @public\n */\nexport interface IClpCompliantAppHeader {\n\t[ClpCompliantAppHeader.isClpCompliantApp]: boolean;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n\texport interface IRequestHeader\n\t\textends Partial<ISharingLinkHeader>,\n\t\t\tPartial<IClpCompliantAppHeader> {}\n}\n"]}
1
+ {"version":3,"file":"contractsPublic.cjs","sourceRoot":"","sources":["../src/contractsPublic.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH;;GAEG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,yGAAyG;IACzG,sDAAsD;IACtD,oEAA+C,CAAA;AAChD,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAQD;;GAEG;AACH,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAChC,oGAAoG;IACpG,wGAAwG;IACxG,kEAAyC,CAAA;AAC1C,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IOdspUrlParts } from \"@fluidframework/odsp-driver-definitions\";\n\n/**\n * @internal\n */\nexport interface OdspFluidDataStoreLocator extends IOdspUrlParts {\n\tdataStorePath: string;\n\tappName?: string;\n\tcontainerPackageName?: string;\n\tfileVersion?: string;\n\tcontext?: string;\n}\n\n/**\n * @internal\n */\nexport enum SharingLinkHeader {\n\t// Can be used in request made to resolver, to tell the resolver that the passed in URL is a sharing link\n\t// which can be redeemed at server to get permissions.\n\tisSharingLinkToRedeem = \"isSharingLinkToRedeem\",\n}\n\n/**\n * @internal\n */\nexport interface ISharingLinkHeader {\n\t[SharingLinkHeader.isSharingLinkToRedeem]: boolean;\n}\n/**\n * @internal\n */\nexport enum ClpCompliantAppHeader {\n\t// Can be used in request made to resolver, to tell the resolver that the host app is CLP compliant.\n\t// Odsp will not return Classified, labeled, or protected documents if the host app cannot support them.\n\tisClpCompliantApp = \"X-CLP-Compliant-App\",\n}\n\n/**\n * @internal\n */\nexport interface IClpCompliantAppHeader {\n\t[ClpCompliantAppHeader.isClpCompliantApp]: boolean;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n\texport interface IRequestHeader\n\t\textends Partial<ISharingLinkHeader>,\n\t\t\tPartial<IClpCompliantAppHeader> {}\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { IOdspUrlParts } from "@fluidframework/odsp-driver-definitions";
6
6
  /**
7
- * @public
7
+ * @internal
8
8
  */
9
9
  export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
10
10
  dataStorePath: string;
@@ -14,25 +14,25 @@ export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
14
14
  context?: string;
15
15
  }
16
16
  /**
17
- * @public
17
+ * @internal
18
18
  */
19
19
  export declare enum SharingLinkHeader {
20
20
  isSharingLinkToRedeem = "isSharingLinkToRedeem"
21
21
  }
22
22
  /**
23
- * @public
23
+ * @internal
24
24
  */
25
25
  export interface ISharingLinkHeader {
26
26
  [SharingLinkHeader.isSharingLinkToRedeem]: boolean;
27
27
  }
28
28
  /**
29
- * @public
29
+ * @internal
30
30
  */
31
31
  export declare enum ClpCompliantAppHeader {
32
32
  isClpCompliantApp = "X-CLP-Compliant-App"
33
33
  }
34
34
  /**
35
- * @public
35
+ * @internal
36
36
  */
37
37
  export interface IClpCompliantAppHeader {
38
38
  [ClpCompliantAppHeader.isClpCompliantApp]: boolean;
@@ -11,7 +11,7 @@ const odspUtils_1 = require("./odspUtils.cjs");
11
11
  * @param fileName - name of the new file to be created
12
12
  * @param createShareLinkType - type of sharing link you would like to create for this file. ShareLinkTypes
13
13
  * will be deprecated soon, so for any new implementation please provide createShareLinkType of type ShareLink
14
- * @public
14
+ * @internal
15
15
  */
16
16
  function createOdspCreateContainerRequest(siteUrl, driveId, filePath, fileName, createShareLinkType) {
17
17
  const shareLinkRequestParams = (0, odspUtils_1.buildOdspShareLinkReqParams)(createShareLinkType);
@@ -1 +1 @@
1
- {"version":3,"file":"createOdspCreateContainerRequest.cjs","sourceRoot":"","sources":["../src/createOdspCreateContainerRequest.ts"],"names":[],"mappings":";;;AAKA,2EAAkE;AAElE,+CAA0D;AAE1D;;;;;;;;;GASG;AACH,SAAgB,gCAAgC,CAC/C,OAAe,EACf,OAAe,EACf,QAAgB,EAChB,QAAgB,EAChB,mBAAuD;IAEvD,MAAM,sBAAsB,GAAG,IAAA,uCAA2B,EAAC,mBAAmB,CAAC,CAAC;IAChF,MAAM,gBAAgB,GAAa;QAClC,GAAG,EAAE,GAAG,OAAO,YAAY,kBAAkB,CAAC,OAAO,CAAC,SAAS,kBAAkB,CAChF,QAAQ,CACR,GAAG,sBAAsB,CAAC,CAAC,CAAC,IAAI,sBAAsB,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,OAAO,EAAE;YACR,CAAC,iCAAY,CAAC,SAAS,CAAC,EAAE;gBACzB,QAAQ;aACR;SACD;KACD,CAAC;IACF,OAAO,gBAAgB,CAAC;AACzB,CAAC;AAnBD,4EAmBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport { DriverHeader } from \"@fluidframework/driver-definitions\";\nimport { ShareLinkTypes, ISharingLinkKind } from \"@fluidframework/odsp-driver-definitions\";\nimport { buildOdspShareLinkReqParams } from \"./odspUtils\";\n\n/**\n * Create the request object with url and headers for creating a new file on OneDrive Sharepoint\n * @param siteUrl - Base url for OneDrive\n * @param driveId - drive identifier\n * @param filePath - path where file needs to be created\n * @param fileName - name of the new file to be created\n * @param createShareLinkType - type of sharing link you would like to create for this file. ShareLinkTypes\n * will be deprecated soon, so for any new implementation please provide createShareLinkType of type ShareLink\n * @public\n */\nexport function createOdspCreateContainerRequest(\n\tsiteUrl: string,\n\tdriveId: string,\n\tfilePath: string,\n\tfileName: string,\n\tcreateShareLinkType?: ShareLinkTypes | ISharingLinkKind,\n): IRequest {\n\tconst shareLinkRequestParams = buildOdspShareLinkReqParams(createShareLinkType);\n\tconst createNewRequest: IRequest = {\n\t\turl: `${siteUrl}?driveId=${encodeURIComponent(driveId)}&path=${encodeURIComponent(\n\t\t\tfilePath,\n\t\t)}${shareLinkRequestParams ? `&${shareLinkRequestParams}` : \"\"}`,\n\t\theaders: {\n\t\t\t[DriverHeader.createNew]: {\n\t\t\t\tfileName,\n\t\t\t},\n\t\t},\n\t};\n\treturn createNewRequest;\n}\n"]}
1
+ {"version":3,"file":"createOdspCreateContainerRequest.cjs","sourceRoot":"","sources":["../src/createOdspCreateContainerRequest.ts"],"names":[],"mappings":";;;AAKA,2EAAkE;AAElE,+CAA0D;AAE1D;;;;;;;;;GASG;AACH,SAAgB,gCAAgC,CAC/C,OAAe,EACf,OAAe,EACf,QAAgB,EAChB,QAAgB,EAChB,mBAAuD;IAEvD,MAAM,sBAAsB,GAAG,IAAA,uCAA2B,EAAC,mBAAmB,CAAC,CAAC;IAChF,MAAM,gBAAgB,GAAa;QAClC,GAAG,EAAE,GAAG,OAAO,YAAY,kBAAkB,CAAC,OAAO,CAAC,SAAS,kBAAkB,CAChF,QAAQ,CACR,GAAG,sBAAsB,CAAC,CAAC,CAAC,IAAI,sBAAsB,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,OAAO,EAAE;YACR,CAAC,iCAAY,CAAC,SAAS,CAAC,EAAE;gBACzB,QAAQ;aACR;SACD;KACD,CAAC;IACF,OAAO,gBAAgB,CAAC;AACzB,CAAC;AAnBD,4EAmBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport { DriverHeader } from \"@fluidframework/driver-definitions\";\nimport { ShareLinkTypes, ISharingLinkKind } from \"@fluidframework/odsp-driver-definitions\";\nimport { buildOdspShareLinkReqParams } from \"./odspUtils\";\n\n/**\n * Create the request object with url and headers for creating a new file on OneDrive Sharepoint\n * @param siteUrl - Base url for OneDrive\n * @param driveId - drive identifier\n * @param filePath - path where file needs to be created\n * @param fileName - name of the new file to be created\n * @param createShareLinkType - type of sharing link you would like to create for this file. ShareLinkTypes\n * will be deprecated soon, so for any new implementation please provide createShareLinkType of type ShareLink\n * @internal\n */\nexport function createOdspCreateContainerRequest(\n\tsiteUrl: string,\n\tdriveId: string,\n\tfilePath: string,\n\tfileName: string,\n\tcreateShareLinkType?: ShareLinkTypes | ISharingLinkKind,\n): IRequest {\n\tconst shareLinkRequestParams = buildOdspShareLinkReqParams(createShareLinkType);\n\tconst createNewRequest: IRequest = {\n\t\turl: `${siteUrl}?driveId=${encodeURIComponent(driveId)}&path=${encodeURIComponent(\n\t\t\tfilePath,\n\t\t)}${shareLinkRequestParams ? `&${shareLinkRequestParams}` : \"\"}`,\n\t\theaders: {\n\t\t\t[DriverHeader.createNew]: {\n\t\t\t\tfileName,\n\t\t\t},\n\t\t},\n\t};\n\treturn createNewRequest;\n}\n"]}
@@ -12,7 +12,7 @@ import { ShareLinkTypes, ISharingLinkKind } from "@fluidframework/odsp-driver-de
12
12
  * @param fileName - name of the new file to be created
13
13
  * @param createShareLinkType - type of sharing link you would like to create for this file. ShareLinkTypes
14
14
  * will be deprecated soon, so for any new implementation please provide createShareLinkType of type ShareLink
15
- * @public
15
+ * @internal
16
16
  */
17
17
  export declare function createOdspCreateContainerRequest(siteUrl: string, driveId: string, filePath: string, fileName: string, createShareLinkType?: ShareLinkTypes | ISharingLinkKind): IRequest;
18
18
  //# sourceMappingURL=createOdspCreateContainerRequest.d.ts.map
@@ -11,7 +11,7 @@ exports.createOdspUrl = void 0;
11
11
  /**
12
12
  * Encodes ODC/SPO information into a URL format that can be handled by the Loader
13
13
  * @param l -The property bag of necessary properties to locate a Fluid data store and craft a url for it
14
- * @public
14
+ * @internal
15
15
  */
16
16
  function createOdspUrl(l) {
17
17
  let odspUrl = `${l.siteUrl}?driveId=${encodeURIComponent(l.driveId)}&itemId=${encodeURIComponent(l.itemId)}&path=${encodeURIComponent(l.dataStorePath)}`;
@@ -1 +1 @@
1
- {"version":3,"file":"createOdspUrl.cjs","sourceRoot":"","sources":["../src/createOdspUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AAEH;;;;GAIG;AACH,SAAgB,aAAa,CAAC,CAA4B;IACzD,IAAI,OAAO,GAAG,GAAG,CAAC,CAAC,OAAO,YAAY,kBAAkB,CACvD,CAAC,CAAC,OAAO,CACT,WAAW,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,kBAAkB,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC;IACvF,IAAI,CAAC,CAAC,oBAAoB,EAAE;QAC3B,OAAO,IAAI,yBAAyB,kBAAkB,CAAC,CAAC,CAAC,oBAAoB,CAAC,EAAE,CAAC;KACjF;IACD,IAAI,CAAC,CAAC,WAAW,EAAE;QAClB,OAAO,IAAI,gBAAgB,kBAAkB,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;KAC/D;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AAZD,sCAYC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { OdspFluidDataStoreLocator } from \"./contractsPublic\";\n\n/*\n * Per https://github.com/microsoft/FluidFramework/issues/1556, isolating createOdspUrl() in its own file.\n */\n\n/**\n * Encodes ODC/SPO information into a URL format that can be handled by the Loader\n * @param l -The property bag of necessary properties to locate a Fluid data store and craft a url for it\n * @public\n */\nexport function createOdspUrl(l: OdspFluidDataStoreLocator): string {\n\tlet odspUrl = `${l.siteUrl}?driveId=${encodeURIComponent(\n\t\tl.driveId,\n\t)}&itemId=${encodeURIComponent(l.itemId)}&path=${encodeURIComponent(l.dataStorePath)}`;\n\tif (l.containerPackageName) {\n\t\todspUrl += `&containerPackageName=${encodeURIComponent(l.containerPackageName)}`;\n\t}\n\tif (l.fileVersion) {\n\t\todspUrl += `&fileVersion=${encodeURIComponent(l.fileVersion)}`;\n\t}\n\n\treturn odspUrl;\n}\n"]}
1
+ {"version":3,"file":"createOdspUrl.cjs","sourceRoot":"","sources":["../src/createOdspUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AAEH;;;;GAIG;AACH,SAAgB,aAAa,CAAC,CAA4B;IACzD,IAAI,OAAO,GAAG,GAAG,CAAC,CAAC,OAAO,YAAY,kBAAkB,CACvD,CAAC,CAAC,OAAO,CACT,WAAW,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,kBAAkB,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC;IACvF,IAAI,CAAC,CAAC,oBAAoB,EAAE;QAC3B,OAAO,IAAI,yBAAyB,kBAAkB,CAAC,CAAC,CAAC,oBAAoB,CAAC,EAAE,CAAC;KACjF;IACD,IAAI,CAAC,CAAC,WAAW,EAAE;QAClB,OAAO,IAAI,gBAAgB,kBAAkB,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;KAC/D;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AAZD,sCAYC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { OdspFluidDataStoreLocator } from \"./contractsPublic\";\n\n/*\n * Per https://github.com/microsoft/FluidFramework/issues/1556, isolating createOdspUrl() in its own file.\n */\n\n/**\n * Encodes ODC/SPO information into a URL format that can be handled by the Loader\n * @param l -The property bag of necessary properties to locate a Fluid data store and craft a url for it\n * @internal\n */\nexport function createOdspUrl(l: OdspFluidDataStoreLocator): string {\n\tlet odspUrl = `${l.siteUrl}?driveId=${encodeURIComponent(\n\t\tl.driveId,\n\t)}&itemId=${encodeURIComponent(l.itemId)}&path=${encodeURIComponent(l.dataStorePath)}`;\n\tif (l.containerPackageName) {\n\t\todspUrl += `&containerPackageName=${encodeURIComponent(l.containerPackageName)}`;\n\t}\n\tif (l.fileVersion) {\n\t\todspUrl += `&fileVersion=${encodeURIComponent(l.fileVersion)}`;\n\t}\n\n\treturn odspUrl;\n}\n"]}
@@ -6,7 +6,7 @@ import { OdspFluidDataStoreLocator } from "./contractsPublic";
6
6
  /**
7
7
  * Encodes ODC/SPO information into a URL format that can be handled by the Loader
8
8
  * @param l -The property bag of necessary properties to locate a Fluid data store and craft a url for it
9
- * @public
9
+ * @internal
10
10
  */
11
11
  export declare function createOdspUrl(l: OdspFluidDataStoreLocator): string;
12
12
  //# sourceMappingURL=createOdspUrl.d.ts.map
@@ -33,7 +33,7 @@ exports.defaultCacheExpiryTimeoutMs = 2 * 24 * 60 * 60 * 1000; // 2 days in ms
33
33
  * server can match it with its epoch value in order to match the version.
34
34
  * It also validates the epoch value received in response of fetch calls. If the epoch does not match,
35
35
  * then it also clears all the cached entries for the given container.
36
- * @public
36
+ * @alpha
37
37
  */
38
38
  class EpochTracker {
39
39
  constructor(cache, fileEntry, logger, clientIsSummarizer) {