@fluidframework/odsp-driver 2.0.0-dev-rc.1.0.0.232845 → 2.0.0-dev-rc.2.0.0.246488

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 (617) hide show
  1. package/.eslintrc.cjs +18 -3
  2. package/{.mocharc.js → .mocharc.cjs} +1 -1
  3. package/CHANGELOG.md +44 -0
  4. package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
  5. package/api-extractor-lint.json +1 -1
  6. package/api-extractor.json +1 -1
  7. package/api-report/odsp-driver.api.md +11 -12
  8. package/dist/ReadBufferUtils.d.ts.map +1 -1
  9. package/dist/ReadBufferUtils.js.map +1 -1
  10. package/dist/WriteBufferUtils.d.ts +1 -1
  11. package/dist/WriteBufferUtils.d.ts.map +1 -1
  12. package/dist/WriteBufferUtils.js +12 -12
  13. package/dist/WriteBufferUtils.js.map +1 -1
  14. package/dist/checkUrl.d.ts.map +1 -1
  15. package/dist/checkUrl.js +5 -3
  16. package/dist/checkUrl.js.map +1 -1
  17. package/dist/compactSnapshotParser.d.ts.map +1 -1
  18. package/dist/compactSnapshotParser.js +87 -69
  19. package/dist/compactSnapshotParser.js.map +1 -1
  20. package/dist/compactSnapshotWriter.d.ts.map +1 -1
  21. package/dist/compactSnapshotWriter.js +25 -19
  22. package/dist/compactSnapshotWriter.js.map +1 -1
  23. package/dist/contracts.d.ts +10 -4
  24. package/dist/contracts.d.ts.map +1 -1
  25. package/dist/contracts.js.map +1 -1
  26. package/dist/createFile.d.ts +3 -3
  27. package/dist/createFile.d.ts.map +1 -1
  28. package/dist/createFile.js +30 -27
  29. package/dist/createFile.js.map +1 -1
  30. package/dist/createNewContainerOnExistingFile.d.ts +2 -2
  31. package/dist/createNewContainerOnExistingFile.d.ts.map +1 -1
  32. package/dist/createNewContainerOnExistingFile.js +14 -14
  33. package/dist/createNewContainerOnExistingFile.js.map +1 -1
  34. package/dist/createNewModule.d.ts +2 -2
  35. package/dist/createNewModule.d.ts.map +1 -1
  36. package/dist/createNewModule.js +4 -4
  37. package/dist/createNewModule.js.map +1 -1
  38. package/dist/createNewUtils.d.ts +2 -2
  39. package/dist/createNewUtils.d.ts.map +1 -1
  40. package/dist/createNewUtils.js +12 -8
  41. package/dist/createNewUtils.js.map +1 -1
  42. package/dist/createOdspCreateContainerRequest.d.ts.map +1 -1
  43. package/dist/createOdspCreateContainerRequest.js +6 -2
  44. package/dist/createOdspCreateContainerRequest.js.map +1 -1
  45. package/dist/createOdspUrl.d.ts +1 -1
  46. package/dist/createOdspUrl.d.ts.map +1 -1
  47. package/dist/createOdspUrl.js.map +1 -1
  48. package/dist/epochTracker.d.ts +10 -9
  49. package/dist/epochTracker.d.ts.map +1 -1
  50. package/dist/epochTracker.js +66 -43
  51. package/dist/epochTracker.js.map +1 -1
  52. package/dist/fetchSnapshot.d.ts +11 -8
  53. package/dist/fetchSnapshot.d.ts.map +1 -1
  54. package/dist/fetchSnapshot.js +79 -58
  55. package/dist/fetchSnapshot.js.map +1 -1
  56. package/dist/getFileLink.d.ts.map +1 -1
  57. package/dist/getFileLink.js +24 -17
  58. package/dist/getFileLink.js.map +1 -1
  59. package/dist/getQueryString.d.ts.map +1 -1
  60. package/dist/getQueryString.js +6 -0
  61. package/dist/getQueryString.js.map +1 -1
  62. package/dist/index.d.ts +19 -19
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +44 -44
  65. package/dist/index.js.map +1 -1
  66. package/dist/localOdspDriver/localOdspDocumentService.d.ts +1 -1
  67. package/dist/localOdspDriver/localOdspDocumentService.d.ts.map +1 -1
  68. package/dist/localOdspDriver/localOdspDocumentService.js +5 -5
  69. package/dist/localOdspDriver/localOdspDocumentService.js.map +1 -1
  70. package/dist/localOdspDriver/localOdspDocumentServiceFactory.d.ts +8 -6
  71. package/dist/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -1
  72. package/dist/localOdspDriver/localOdspDocumentServiceFactory.js +10 -9
  73. package/dist/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
  74. package/dist/localOdspDriver/localOdspDocumentStorageManager.d.ts +1 -1
  75. package/dist/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -1
  76. package/dist/localOdspDriver/localOdspDocumentStorageManager.js +6 -6
  77. package/dist/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
  78. package/dist/odsp-driver-alpha.d.ts +27 -12
  79. package/dist/odsp-driver-beta.d.ts +1 -2
  80. package/dist/odsp-driver-public.d.ts +1 -2
  81. package/dist/odsp-driver-untrimmed.d.ts +29 -12
  82. package/dist/odspCache.d.ts +3 -3
  83. package/dist/odspCache.d.ts.map +1 -1
  84. package/dist/odspCache.js +3 -4
  85. package/dist/odspCache.js.map +1 -1
  86. package/dist/odspDelayLoadedDeltaStream.d.ts +7 -5
  87. package/dist/odspDelayLoadedDeltaStream.d.ts.map +1 -1
  88. package/dist/odspDelayLoadedDeltaStream.js +41 -28
  89. package/dist/odspDelayLoadedDeltaStream.js.map +1 -1
  90. package/dist/odspDeltaStorageService.d.ts +7 -7
  91. package/dist/odspDeltaStorageService.d.ts.map +1 -1
  92. package/dist/odspDeltaStorageService.js +5 -5
  93. package/dist/odspDeltaStorageService.js.map +1 -1
  94. package/dist/odspDocumentDeltaConnection.d.ts +1 -1
  95. package/dist/odspDocumentDeltaConnection.d.ts.map +1 -1
  96. package/dist/odspDocumentDeltaConnection.js +41 -23
  97. package/dist/odspDocumentDeltaConnection.js.map +1 -1
  98. package/dist/odspDocumentService.d.ts +6 -4
  99. package/dist/odspDocumentService.d.ts.map +1 -1
  100. package/dist/odspDocumentService.js +19 -16
  101. package/dist/odspDocumentService.js.map +1 -1
  102. package/dist/odspDocumentServiceFactory.d.ts +6 -1
  103. package/dist/odspDocumentServiceFactory.d.ts.map +1 -1
  104. package/dist/odspDocumentServiceFactory.js +9 -4
  105. package/dist/odspDocumentServiceFactory.js.map +1 -1
  106. package/dist/odspDocumentServiceFactoryCore.d.ts +4 -4
  107. package/dist/odspDocumentServiceFactoryCore.d.ts.map +1 -1
  108. package/dist/odspDocumentServiceFactoryCore.js +26 -22
  109. package/dist/odspDocumentServiceFactoryCore.js.map +1 -1
  110. package/dist/odspDocumentServiceFactoryWithCodeSplit.d.ts +1 -1
  111. package/dist/odspDocumentServiceFactoryWithCodeSplit.d.ts.map +1 -1
  112. package/dist/odspDocumentServiceFactoryWithCodeSplit.js +2 -2
  113. package/dist/odspDocumentServiceFactoryWithCodeSplit.js.map +1 -1
  114. package/dist/odspDocumentStorageManager.d.ts +15 -9
  115. package/dist/odspDocumentStorageManager.d.ts.map +1 -1
  116. package/dist/odspDocumentStorageManager.js +219 -181
  117. package/dist/odspDocumentStorageManager.js.map +1 -1
  118. package/dist/odspDocumentStorageServiceBase.d.ts +2 -4
  119. package/dist/odspDocumentStorageServiceBase.d.ts.map +1 -1
  120. package/dist/odspDocumentStorageServiceBase.js +32 -29
  121. package/dist/odspDocumentStorageServiceBase.js.map +1 -1
  122. package/dist/odspDriverUrlResolver.d.ts +5 -1
  123. package/dist/odspDriverUrlResolver.d.ts.map +1 -1
  124. package/dist/odspDriverUrlResolver.js +27 -24
  125. package/dist/odspDriverUrlResolver.js.map +1 -1
  126. package/dist/odspDriverUrlResolverForShareLink.d.ts +17 -6
  127. package/dist/odspDriverUrlResolverForShareLink.d.ts.map +1 -1
  128. package/dist/odspDriverUrlResolverForShareLink.js +49 -39
  129. package/dist/odspDriverUrlResolverForShareLink.js.map +1 -1
  130. package/dist/odspError.d.ts +1 -1
  131. package/dist/odspError.d.ts.map +1 -1
  132. package/dist/odspError.js +5 -5
  133. package/dist/odspError.js.map +1 -1
  134. package/dist/odspFluidFileLink.d.ts +1 -1
  135. package/dist/odspFluidFileLink.d.ts.map +1 -1
  136. package/dist/odspFluidFileLink.js +2 -2
  137. package/dist/odspFluidFileLink.js.map +1 -1
  138. package/dist/odspLocationRedirection.js +2 -2
  139. package/dist/odspLocationRedirection.js.map +1 -1
  140. package/dist/odspPublicUtils.d.ts +3 -0
  141. package/dist/odspPublicUtils.d.ts.map +1 -1
  142. package/dist/odspPublicUtils.js +3 -0
  143. package/dist/odspPublicUtils.js.map +1 -1
  144. package/dist/odspSnapshotParser.d.ts +1 -1
  145. package/dist/odspSnapshotParser.d.ts.map +1 -1
  146. package/dist/odspSnapshotParser.js +3 -2
  147. package/dist/odspSnapshotParser.js.map +1 -1
  148. package/dist/odspSummaryUploadManager.d.ts +1 -1
  149. package/dist/odspSummaryUploadManager.d.ts.map +1 -1
  150. package/dist/odspSummaryUploadManager.js +9 -6
  151. package/dist/odspSummaryUploadManager.js.map +1 -1
  152. package/dist/odspUrlHelper.d.ts.map +1 -1
  153. package/dist/odspUrlHelper.js +1 -2
  154. package/dist/odspUrlHelper.js.map +1 -1
  155. package/dist/odspUtils.d.ts +19 -7
  156. package/dist/odspUtils.d.ts.map +1 -1
  157. package/dist/odspUtils.js +61 -31
  158. package/dist/odspUtils.js.map +1 -1
  159. package/dist/opsCaching.d.ts +1 -1
  160. package/dist/opsCaching.d.ts.map +1 -1
  161. package/dist/opsCaching.js +2 -1
  162. package/dist/opsCaching.js.map +1 -1
  163. package/dist/package.json +3 -0
  164. package/dist/packageVersion.d.ts +1 -1
  165. package/dist/packageVersion.js +1 -1
  166. package/dist/packageVersion.js.map +1 -1
  167. package/dist/prefetchLatestSnapshot.d.ts +2 -2
  168. package/dist/prefetchLatestSnapshot.d.ts.map +1 -1
  169. package/dist/prefetchLatestSnapshot.js +17 -12
  170. package/dist/prefetchLatestSnapshot.js.map +1 -1
  171. package/dist/retryErrorsStorageAdapter.d.ts +0 -1
  172. package/dist/retryErrorsStorageAdapter.d.ts.map +1 -1
  173. package/dist/retryErrorsStorageAdapter.js +2 -5
  174. package/dist/retryErrorsStorageAdapter.js.map +1 -1
  175. package/dist/retryUtils.d.ts.map +1 -1
  176. package/dist/retryUtils.js +6 -2
  177. package/dist/retryUtils.js.map +1 -1
  178. package/dist/socketModule.d.ts.map +1 -1
  179. package/dist/socketModule.js +2 -0
  180. package/dist/socketModule.js.map +1 -1
  181. package/dist/tsdoc-metadata.json +1 -1
  182. package/dist/vroom.d.ts +2 -2
  183. package/dist/vroom.d.ts.map +1 -1
  184. package/dist/vroom.js +5 -5
  185. package/dist/vroom.js.map +1 -1
  186. package/dist/zipItDataRepresentationUtils.d.ts +1 -1
  187. package/dist/zipItDataRepresentationUtils.d.ts.map +1 -1
  188. package/dist/zipItDataRepresentationUtils.js +15 -11
  189. package/dist/zipItDataRepresentationUtils.js.map +1 -1
  190. package/lib/{ReadBufferUtils.d.mts → ReadBufferUtils.d.ts} +1 -1
  191. package/lib/ReadBufferUtils.d.ts.map +1 -0
  192. package/lib/{ReadBufferUtils.mjs → ReadBufferUtils.js} +1 -1
  193. package/lib/ReadBufferUtils.js.map +1 -0
  194. package/lib/{WriteBufferUtils.d.mts → WriteBufferUtils.d.ts} +2 -2
  195. package/lib/WriteBufferUtils.d.ts.map +1 -0
  196. package/lib/{WriteBufferUtils.mjs → WriteBufferUtils.js} +2 -2
  197. package/lib/WriteBufferUtils.js.map +1 -0
  198. package/lib/{checkUrl.d.mts → checkUrl.d.ts} +1 -1
  199. package/lib/checkUrl.d.ts.map +1 -0
  200. package/lib/{checkUrl.mjs → checkUrl.js} +5 -3
  201. package/lib/checkUrl.js.map +1 -0
  202. package/lib/{compactSnapshotParser.d.mts → compactSnapshotParser.d.ts} +1 -1
  203. package/lib/compactSnapshotParser.d.ts.map +1 -0
  204. package/lib/{compactSnapshotParser.mjs → compactSnapshotParser.js} +61 -43
  205. package/lib/compactSnapshotParser.js.map +1 -0
  206. package/lib/{compactSnapshotWriter.d.mts → compactSnapshotWriter.d.ts} +1 -1
  207. package/lib/compactSnapshotWriter.d.ts.map +1 -0
  208. package/lib/{compactSnapshotWriter.mjs → compactSnapshotWriter.js} +13 -7
  209. package/lib/compactSnapshotWriter.js.map +1 -0
  210. package/lib/{constants.d.mts → constants.d.ts} +1 -1
  211. package/lib/constants.d.ts.map +1 -0
  212. package/lib/{constants.mjs → constants.js} +1 -1
  213. package/lib/constants.js.map +1 -0
  214. package/lib/{contracts.d.mts → contracts.d.ts} +11 -5
  215. package/lib/contracts.d.ts.map +1 -0
  216. package/lib/{contracts.mjs → contracts.js} +1 -1
  217. package/lib/contracts.js.map +1 -0
  218. package/lib/{contractsPublic.d.mts → contractsPublic.d.ts} +1 -1
  219. package/lib/contractsPublic.d.ts.map +1 -0
  220. package/lib/{contractsPublic.mjs → contractsPublic.js} +1 -1
  221. package/lib/contractsPublic.js.map +1 -0
  222. package/lib/{createFile.d.mts → createFile.d.ts} +4 -4
  223. package/lib/createFile.d.ts.map +1 -0
  224. package/lib/{createFile.mjs → createFile.js} +15 -12
  225. package/lib/createFile.js.map +1 -0
  226. package/lib/{createNewContainerOnExistingFile.d.mts → createNewContainerOnExistingFile.d.ts} +3 -3
  227. package/lib/createNewContainerOnExistingFile.d.ts.map +1 -0
  228. package/lib/{createNewContainerOnExistingFile.mjs → createNewContainerOnExistingFile.js} +7 -7
  229. package/lib/createNewContainerOnExistingFile.js.map +1 -0
  230. package/lib/{createNewModule.mjs → createNewModule.d.ts} +3 -3
  231. package/lib/createNewModule.d.ts.map +1 -0
  232. package/lib/{createNewModule.d.mts → createNewModule.js} +3 -3
  233. package/lib/createNewModule.js.map +1 -0
  234. package/lib/{createNewUtils.d.mts → createNewUtils.d.ts} +3 -3
  235. package/lib/createNewUtils.d.ts.map +1 -0
  236. package/lib/{createNewUtils.mjs → createNewUtils.js} +9 -5
  237. package/lib/createNewUtils.js.map +1 -0
  238. package/lib/{createOdspCreateContainerRequest.d.mts → createOdspCreateContainerRequest.d.ts} +5 -1
  239. package/lib/createOdspCreateContainerRequest.d.ts.map +1 -0
  240. package/lib/{createOdspCreateContainerRequest.mjs → createOdspCreateContainerRequest.js} +6 -2
  241. package/lib/createOdspCreateContainerRequest.js.map +1 -0
  242. package/lib/{createOdspUrl.d.mts → createOdspUrl.d.ts} +2 -2
  243. package/lib/createOdspUrl.d.ts.map +1 -0
  244. package/lib/{createOdspUrl.mjs → createOdspUrl.js} +1 -1
  245. package/lib/createOdspUrl.js.map +1 -0
  246. package/lib/{epochTracker.d.mts → epochTracker.d.ts} +11 -10
  247. package/lib/epochTracker.d.ts.map +1 -0
  248. package/lib/{epochTracker.mjs → epochTracker.js} +56 -33
  249. package/lib/epochTracker.js.map +1 -0
  250. package/lib/{fetch.d.mts → fetch.d.ts} +1 -1
  251. package/lib/fetch.d.ts.map +1 -0
  252. package/lib/{fetch.mjs → fetch.js} +1 -1
  253. package/lib/fetch.js.map +1 -0
  254. package/lib/{fetchSnapshot.d.mts → fetchSnapshot.d.ts} +12 -9
  255. package/lib/fetchSnapshot.d.ts.map +1 -0
  256. package/lib/{fetchSnapshot.mjs → fetchSnapshot.js} +61 -40
  257. package/lib/fetchSnapshot.js.map +1 -0
  258. package/lib/{getFileLink.d.mts → getFileLink.d.ts} +1 -1
  259. package/lib/getFileLink.d.ts.map +1 -0
  260. package/lib/{getFileLink.mjs → getFileLink.js} +14 -7
  261. package/lib/getFileLink.js.map +1 -0
  262. package/lib/{getQueryString.d.mts → getQueryString.d.ts} +5 -1
  263. package/lib/getQueryString.d.ts.map +1 -0
  264. package/lib/{getQueryString.mjs → getQueryString.js} +7 -1
  265. package/lib/getQueryString.js.map +1 -0
  266. package/lib/{getUrlAndHeadersWithAuth.d.mts → getUrlAndHeadersWithAuth.d.ts} +1 -1
  267. package/lib/getUrlAndHeadersWithAuth.d.ts.map +1 -0
  268. package/lib/{getUrlAndHeadersWithAuth.mjs → getUrlAndHeadersWithAuth.js} +1 -1
  269. package/lib/getUrlAndHeadersWithAuth.js.map +1 -0
  270. package/lib/{index.d.mts → index.d.ts} +20 -20
  271. package/lib/index.d.ts.map +1 -0
  272. package/lib/index.js +29 -0
  273. package/lib/index.js.map +1 -0
  274. package/lib/localOdspDriver/{localOdspDeltaStorageService.d.mts → localOdspDeltaStorageService.d.ts} +1 -1
  275. package/lib/localOdspDriver/localOdspDeltaStorageService.d.ts.map +1 -0
  276. package/lib/localOdspDriver/{localOdspDeltaStorageService.mjs → localOdspDeltaStorageService.js} +1 -1
  277. package/lib/localOdspDriver/localOdspDeltaStorageService.js.map +1 -0
  278. package/lib/localOdspDriver/{localOdspDocumentService.d.mts → localOdspDocumentService.d.ts} +2 -2
  279. package/lib/localOdspDriver/localOdspDocumentService.d.ts.map +1 -0
  280. package/lib/localOdspDriver/{localOdspDocumentService.mjs → localOdspDocumentService.js} +4 -4
  281. package/lib/localOdspDriver/localOdspDocumentService.js.map +1 -0
  282. package/lib/localOdspDriver/{localOdspDocumentServiceFactory.d.mts → localOdspDocumentServiceFactory.d.ts} +9 -7
  283. package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -0
  284. package/lib/localOdspDriver/{localOdspDocumentServiceFactory.mjs → localOdspDocumentServiceFactory.js} +9 -8
  285. package/lib/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -0
  286. package/lib/localOdspDriver/{localOdspDocumentStorageManager.d.mts → localOdspDocumentStorageManager.d.ts} +2 -2
  287. package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -0
  288. package/lib/localOdspDriver/{localOdspDocumentStorageManager.mjs → localOdspDocumentStorageManager.js} +4 -4
  289. package/lib/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -0
  290. package/lib/{odsp-driver-alpha.d.mts → odsp-driver-alpha.d.ts} +27 -12
  291. package/lib/{odsp-driver-public.d.mts → odsp-driver-beta.d.ts} +1 -2
  292. package/lib/{odsp-driver-beta.d.mts → odsp-driver-public.d.ts} +1 -2
  293. package/lib/{odsp-driver-untrimmed.d.mts → odsp-driver-untrimmed.d.ts} +29 -12
  294. package/lib/{odspCache.d.mts → odspCache.d.ts} +8 -4
  295. package/lib/odspCache.d.ts.map +1 -0
  296. package/lib/{odspCache.mjs → odspCache.js} +6 -3
  297. package/lib/odspCache.js.map +1 -0
  298. package/lib/{odspDelayLoadedDeltaStream.d.mts → odspDelayLoadedDeltaStream.d.ts} +8 -6
  299. package/lib/odspDelayLoadedDeltaStream.d.ts.map +1 -0
  300. package/lib/{odspDelayLoadedDeltaStream.mjs → odspDelayLoadedDeltaStream.js} +33 -20
  301. package/lib/odspDelayLoadedDeltaStream.js.map +1 -0
  302. package/lib/{odspDeltaStorageService.d.mts → odspDeltaStorageService.d.ts} +8 -8
  303. package/lib/odspDeltaStorageService.d.ts.map +1 -0
  304. package/lib/{odspDeltaStorageService.mjs → odspDeltaStorageService.js} +5 -5
  305. package/lib/odspDeltaStorageService.js.map +1 -0
  306. package/lib/{odspDocumentDeltaConnection.d.mts → odspDocumentDeltaConnection.d.ts} +2 -2
  307. package/lib/odspDocumentDeltaConnection.d.ts.map +1 -0
  308. package/lib/{odspDocumentDeltaConnection.mjs → odspDocumentDeltaConnection.js} +34 -16
  309. package/lib/odspDocumentDeltaConnection.js.map +1 -0
  310. package/lib/{odspDocumentService.d.mts → odspDocumentService.d.ts} +7 -5
  311. package/lib/odspDocumentService.d.ts.map +1 -0
  312. package/lib/{odspDocumentService.mjs → odspDocumentService.js} +16 -11
  313. package/lib/odspDocumentService.js.map +1 -0
  314. package/lib/{odspDocumentServiceFactory.d.mts → odspDocumentServiceFactory.d.ts} +7 -2
  315. package/lib/odspDocumentServiceFactory.d.ts.map +1 -0
  316. package/lib/{odspDocumentServiceFactory.mjs → odspDocumentServiceFactory.js} +9 -3
  317. package/lib/odspDocumentServiceFactory.js.map +1 -0
  318. package/lib/{odspDocumentServiceFactoryCore.d.mts → odspDocumentServiceFactoryCore.d.ts} +5 -5
  319. package/lib/odspDocumentServiceFactoryCore.d.ts.map +1 -0
  320. package/lib/{odspDocumentServiceFactoryCore.mjs → odspDocumentServiceFactoryCore.js} +23 -17
  321. package/lib/odspDocumentServiceFactoryCore.js.map +1 -0
  322. package/lib/{odspDocumentServiceFactoryWithCodeSplit.d.mts → odspDocumentServiceFactoryWithCodeSplit.d.ts} +2 -2
  323. package/lib/odspDocumentServiceFactoryWithCodeSplit.d.ts.map +1 -0
  324. package/lib/{odspDocumentServiceFactoryWithCodeSplit.mjs → odspDocumentServiceFactoryWithCodeSplit.js} +2 -2
  325. package/lib/odspDocumentServiceFactoryWithCodeSplit.js.map +1 -0
  326. package/lib/{odspDocumentStorageManager.d.mts → odspDocumentStorageManager.d.ts} +16 -10
  327. package/lib/odspDocumentStorageManager.d.ts.map +1 -0
  328. package/lib/{odspDocumentStorageManager.mjs → odspDocumentStorageManager.js} +207 -167
  329. package/lib/odspDocumentStorageManager.js.map +1 -0
  330. package/lib/{odspDocumentStorageServiceBase.d.mts → odspDocumentStorageServiceBase.d.ts} +3 -5
  331. package/lib/odspDocumentStorageServiceBase.d.ts.map +1 -0
  332. package/lib/{odspDocumentStorageServiceBase.mjs → odspDocumentStorageServiceBase.js} +32 -29
  333. package/lib/odspDocumentStorageServiceBase.js.map +1 -0
  334. package/lib/{odspDriverUrlResolver.d.mts → odspDriverUrlResolver.d.ts} +6 -2
  335. package/lib/odspDriverUrlResolver.d.ts.map +1 -0
  336. package/lib/{odspDriverUrlResolver.mjs → odspDriverUrlResolver.js} +24 -17
  337. package/lib/odspDriverUrlResolver.js.map +1 -0
  338. package/lib/{odspDriverUrlResolverForShareLink.d.mts → odspDriverUrlResolverForShareLink.d.ts} +18 -7
  339. package/lib/odspDriverUrlResolverForShareLink.d.ts.map +1 -0
  340. package/lib/{odspDriverUrlResolverForShareLink.mjs → odspDriverUrlResolverForShareLink.js} +41 -27
  341. package/lib/odspDriverUrlResolverForShareLink.js.map +1 -0
  342. package/lib/{odspError.d.mts → odspError.d.ts} +2 -2
  343. package/lib/odspError.d.ts.map +1 -0
  344. package/lib/{odspError.mjs → odspError.js} +4 -4
  345. package/lib/odspError.js.map +1 -0
  346. package/lib/{odspFluidFileLink.d.mts → odspFluidFileLink.d.ts} +2 -2
  347. package/lib/odspFluidFileLink.d.ts.map +1 -0
  348. package/lib/{odspFluidFileLink.mjs → odspFluidFileLink.js} +2 -2
  349. package/lib/odspFluidFileLink.js.map +1 -0
  350. package/lib/{odspLocationRedirection.d.mts → odspLocationRedirection.d.ts} +1 -1
  351. package/lib/odspLocationRedirection.d.ts.map +1 -0
  352. package/lib/{odspLocationRedirection.mjs → odspLocationRedirection.js} +2 -2
  353. package/lib/odspLocationRedirection.js.map +1 -0
  354. package/lib/{odspPublicUtils.d.mts → odspPublicUtils.d.ts} +4 -1
  355. package/lib/odspPublicUtils.d.ts.map +1 -0
  356. package/lib/{odspPublicUtils.mjs → odspPublicUtils.js} +4 -1
  357. package/lib/odspPublicUtils.js.map +1 -0
  358. package/lib/{odspSnapshotParser.d.mts → odspSnapshotParser.d.ts} +2 -2
  359. package/lib/odspSnapshotParser.d.ts.map +1 -0
  360. package/lib/{odspSnapshotParser.mjs → odspSnapshotParser.js} +4 -3
  361. package/lib/odspSnapshotParser.js.map +1 -0
  362. package/lib/{odspSummaryUploadManager.d.mts → odspSummaryUploadManager.d.ts} +2 -2
  363. package/lib/odspSummaryUploadManager.d.ts.map +1 -0
  364. package/lib/{odspSummaryUploadManager.mjs → odspSummaryUploadManager.js} +8 -5
  365. package/lib/odspSummaryUploadManager.js.map +1 -0
  366. package/lib/{odspUrlHelper.d.mts → odspUrlHelper.d.ts} +1 -1
  367. package/lib/odspUrlHelper.d.ts.map +1 -0
  368. package/lib/{odspUrlHelper.mjs → odspUrlHelper.js} +2 -3
  369. package/lib/odspUrlHelper.js.map +1 -0
  370. package/lib/{odspUtils.d.mts → odspUtils.d.ts} +20 -8
  371. package/lib/odspUtils.d.ts.map +1 -0
  372. package/lib/{odspUtils.mjs → odspUtils.js} +45 -17
  373. package/lib/odspUtils.js.map +1 -0
  374. package/lib/{opsCaching.d.mts → opsCaching.d.ts} +2 -2
  375. package/lib/opsCaching.d.ts.map +1 -0
  376. package/lib/{opsCaching.mjs → opsCaching.js} +3 -2
  377. package/lib/opsCaching.js.map +1 -0
  378. package/lib/{packageVersion.d.mts → packageVersion.d.ts} +2 -2
  379. package/lib/packageVersion.d.ts.map +1 -0
  380. package/lib/{packageVersion.mjs → packageVersion.js} +2 -2
  381. package/lib/packageVersion.js.map +1 -0
  382. package/lib/{prefetchLatestSnapshot.d.mts → prefetchLatestSnapshot.d.ts} +3 -3
  383. package/lib/prefetchLatestSnapshot.d.ts.map +1 -0
  384. package/lib/{prefetchLatestSnapshot.mjs → prefetchLatestSnapshot.js} +16 -11
  385. package/lib/prefetchLatestSnapshot.js.map +1 -0
  386. package/lib/{retryErrorsStorageAdapter.d.mts → retryErrorsStorageAdapter.d.ts} +1 -2
  387. package/lib/retryErrorsStorageAdapter.d.ts.map +1 -0
  388. package/lib/{retryErrorsStorageAdapter.mjs → retryErrorsStorageAdapter.js} +2 -5
  389. package/lib/retryErrorsStorageAdapter.js.map +1 -0
  390. package/lib/{retryUtils.d.mts → retryUtils.d.ts} +1 -1
  391. package/lib/retryUtils.d.ts.map +1 -0
  392. package/lib/{retryUtils.mjs → retryUtils.js} +6 -2
  393. package/lib/retryUtils.js.map +1 -0
  394. package/lib/{socketModule.d.mts → socketModule.d.ts} +1 -1
  395. package/lib/socketModule.d.ts.map +1 -0
  396. package/lib/{socketModule.mjs → socketModule.js} +3 -1
  397. package/lib/socketModule.js.map +1 -0
  398. package/lib/test/buildOdspShareLinkReqParams.spec.js +25 -0
  399. package/lib/test/buildOdspShareLinkReqParams.spec.js.map +1 -0
  400. package/lib/test/createNewUtilsTests.spec.js +221 -0
  401. package/lib/test/createNewUtilsTests.spec.js.map +1 -0
  402. package/lib/test/deltaStorageService.spec.js +176 -0
  403. package/lib/test/deltaStorageService.spec.js.map +1 -0
  404. package/lib/test/epochTests.spec.js +340 -0
  405. package/lib/test/epochTests.spec.js.map +1 -0
  406. package/lib/test/epochTestsWithRedemption.spec.js +119 -0
  407. package/lib/test/epochTestsWithRedemption.spec.js.map +1 -0
  408. package/lib/test/fetchSnapshot.spec.js +412 -0
  409. package/lib/test/fetchSnapshot.spec.js.map +1 -0
  410. package/lib/test/getFileLink.spec.js +62 -0
  411. package/lib/test/getFileLink.spec.js.map +1 -0
  412. package/lib/test/getUrlAndHeadersWithAuth.spec.js +66 -0
  413. package/lib/test/getUrlAndHeadersWithAuth.spec.js.map +1 -0
  414. package/lib/test/getVersions.spec.js +284 -0
  415. package/lib/test/getVersions.spec.js.map +1 -0
  416. package/lib/test/joinSessionCacheTests.spec.js +53 -0
  417. package/lib/test/joinSessionCacheTests.spec.js.map +1 -0
  418. package/lib/test/joinSessionPeriodicCall.spec.js +158 -0
  419. package/lib/test/joinSessionPeriodicCall.spec.js.map +1 -0
  420. package/lib/test/jsonSnapshotFormatTests.spec.js +107 -0
  421. package/lib/test/jsonSnapshotFormatTests.spec.js.map +1 -0
  422. package/lib/test/localOdspDriver.spec.js +177 -0
  423. package/lib/test/localOdspDriver.spec.js.map +1 -0
  424. package/lib/test/mockFetch.js +61 -0
  425. package/lib/test/mockFetch.js.map +1 -0
  426. package/lib/test/odspCreateContainer.spec.js +116 -0
  427. package/lib/test/odspCreateContainer.spec.js.map +1 -0
  428. package/lib/test/odspDriverResolverTest.spec.js +289 -0
  429. package/lib/test/odspDriverResolverTest.spec.js.map +1 -0
  430. package/lib/test/odspDriverUrlResolverForShareLink.spec.js +287 -0
  431. package/lib/test/odspDriverUrlResolverForShareLink.spec.js.map +1 -0
  432. package/lib/test/odspError.spec.js +299 -0
  433. package/lib/test/odspError.spec.js.map +1 -0
  434. package/lib/test/opsCaching.spec.js +357 -0
  435. package/lib/test/opsCaching.spec.js.map +1 -0
  436. package/lib/test/prefetchSnapshotTests.spec.js +420 -0
  437. package/lib/test/prefetchSnapshotTests.spec.js.map +1 -0
  438. package/lib/test/snapshotFormatTests.spec.js +218 -0
  439. package/lib/test/snapshotFormatTests.spec.js.map +1 -0
  440. package/lib/test/socketTests/deltaConnectionUpdateTests.spec.js +152 -0
  441. package/lib/test/socketTests/deltaConnectionUpdateTests.spec.js.map +1 -0
  442. package/lib/test/socketTests/socketMock.js +109 -0
  443. package/lib/test/socketTests/socketMock.js.map +1 -0
  444. package/lib/test/socketTests/socketTests.spec.js +256 -0
  445. package/lib/test/socketTests/socketTests.spec.js.map +1 -0
  446. package/lib/test/tokenFetch.spec.js +39 -0
  447. package/lib/test/tokenFetch.spec.js.map +1 -0
  448. package/lib/test/types/validateOdspDriverPrevious.generated.js +96 -0
  449. package/lib/test/types/validateOdspDriverPrevious.generated.js.map +1 -0
  450. package/lib/test/zipItDataRepresentationTests.spec.js +207 -0
  451. package/lib/test/zipItDataRepresentationTests.spec.js.map +1 -0
  452. package/lib/{vroom.d.mts → vroom.d.ts} +3 -3
  453. package/lib/vroom.d.ts.map +1 -0
  454. package/lib/{vroom.mjs → vroom.js} +4 -4
  455. package/lib/vroom.js.map +1 -0
  456. package/lib/{zipItDataRepresentationUtils.d.mts → zipItDataRepresentationUtils.d.ts} +2 -2
  457. package/lib/zipItDataRepresentationUtils.d.ts.map +1 -0
  458. package/lib/{zipItDataRepresentationUtils.mjs → zipItDataRepresentationUtils.js} +17 -9
  459. package/lib/zipItDataRepresentationUtils.js.map +1 -0
  460. package/package.json +90 -31
  461. package/src/ReadBufferUtils.ts +7 -7
  462. package/src/WriteBufferUtils.ts +13 -9
  463. package/src/checkUrl.ts +4 -2
  464. package/src/compactSnapshotParser.ts +87 -52
  465. package/src/compactSnapshotWriter.ts +19 -12
  466. package/src/contracts.ts +16 -4
  467. package/src/createFile.ts +16 -13
  468. package/src/createNewContainerOnExistingFile.ts +8 -8
  469. package/src/createNewModule.ts +2 -2
  470. package/src/createNewUtils.ts +19 -9
  471. package/src/createOdspCreateContainerRequest.ts +2 -1
  472. package/src/createOdspUrl.ts +1 -1
  473. package/src/epochTracker.ts +90 -55
  474. package/src/fetchSnapshot.ts +104 -47
  475. package/src/getFileLink.ts +21 -13
  476. package/src/getQueryString.ts +3 -0
  477. package/src/index.ts +27 -19
  478. package/src/localOdspDriver/localOdspDocumentService.ts +3 -3
  479. package/src/localOdspDriver/localOdspDocumentServiceFactory.ts +12 -11
  480. package/src/localOdspDriver/localOdspDocumentStorageManager.ts +5 -5
  481. package/src/odspCache.ts +13 -9
  482. package/src/odspDelayLoadedDeltaStream.ts +54 -33
  483. package/src/odspDeltaStorageService.ts +17 -16
  484. package/src/odspDocumentDeltaConnection.ts +52 -34
  485. package/src/odspDocumentService.ts +23 -20
  486. package/src/odspDocumentServiceFactory.ts +7 -2
  487. package/src/odspDocumentServiceFactoryCore.ts +25 -18
  488. package/src/odspDocumentServiceFactoryWithCodeSplit.ts +1 -1
  489. package/src/odspDocumentStorageManager.ts +276 -216
  490. package/src/odspDocumentStorageServiceBase.ts +45 -43
  491. package/src/odspDriverUrlResolver.ts +39 -24
  492. package/src/odspDriverUrlResolverForShareLink.ts +51 -31
  493. package/src/odspError.ts +4 -4
  494. package/src/odspFluidFileLink.ts +3 -3
  495. package/src/odspLocationRedirection.ts +1 -1
  496. package/src/odspPublicUtils.ts +3 -0
  497. package/src/odspSnapshotParser.ts +4 -3
  498. package/src/odspSummaryUploadManager.ts +21 -9
  499. package/src/odspUrlHelper.ts +2 -3
  500. package/src/odspUtils.ts +73 -30
  501. package/src/opsCaching.ts +13 -12
  502. package/src/packageVersion.ts +1 -1
  503. package/src/prefetchLatestSnapshot.ts +24 -15
  504. package/src/retryErrorsStorageAdapter.ts +4 -8
  505. package/src/retryUtils.ts +6 -2
  506. package/src/socketModule.ts +2 -0
  507. package/src/vroom.ts +6 -6
  508. package/src/zipItDataRepresentationUtils.ts +63 -35
  509. package/tsconfig.cjs.json +7 -0
  510. package/tsconfig.json +2 -5
  511. package/lib/ReadBufferUtils.d.mts.map +0 -1
  512. package/lib/ReadBufferUtils.mjs.map +0 -1
  513. package/lib/WriteBufferUtils.d.mts.map +0 -1
  514. package/lib/WriteBufferUtils.mjs.map +0 -1
  515. package/lib/checkUrl.d.mts.map +0 -1
  516. package/lib/checkUrl.mjs.map +0 -1
  517. package/lib/compactSnapshotParser.d.mts.map +0 -1
  518. package/lib/compactSnapshotParser.mjs.map +0 -1
  519. package/lib/compactSnapshotWriter.d.mts.map +0 -1
  520. package/lib/compactSnapshotWriter.mjs.map +0 -1
  521. package/lib/constants.d.mts.map +0 -1
  522. package/lib/constants.mjs.map +0 -1
  523. package/lib/contracts.d.mts.map +0 -1
  524. package/lib/contracts.mjs.map +0 -1
  525. package/lib/contractsPublic.d.mts.map +0 -1
  526. package/lib/contractsPublic.mjs.map +0 -1
  527. package/lib/createFile.d.mts.map +0 -1
  528. package/lib/createFile.mjs.map +0 -1
  529. package/lib/createNewContainerOnExistingFile.d.mts.map +0 -1
  530. package/lib/createNewContainerOnExistingFile.mjs.map +0 -1
  531. package/lib/createNewModule.d.mts.map +0 -1
  532. package/lib/createNewModule.mjs.map +0 -1
  533. package/lib/createNewUtils.d.mts.map +0 -1
  534. package/lib/createNewUtils.mjs.map +0 -1
  535. package/lib/createOdspCreateContainerRequest.d.mts.map +0 -1
  536. package/lib/createOdspCreateContainerRequest.mjs.map +0 -1
  537. package/lib/createOdspUrl.d.mts.map +0 -1
  538. package/lib/createOdspUrl.mjs.map +0 -1
  539. package/lib/epochTracker.d.mts.map +0 -1
  540. package/lib/epochTracker.mjs.map +0 -1
  541. package/lib/fetch.d.mts.map +0 -1
  542. package/lib/fetch.mjs.map +0 -1
  543. package/lib/fetchSnapshot.d.mts.map +0 -1
  544. package/lib/fetchSnapshot.mjs.map +0 -1
  545. package/lib/getFileLink.d.mts.map +0 -1
  546. package/lib/getFileLink.mjs.map +0 -1
  547. package/lib/getQueryString.d.mts.map +0 -1
  548. package/lib/getQueryString.mjs.map +0 -1
  549. package/lib/getUrlAndHeadersWithAuth.d.mts.map +0 -1
  550. package/lib/getUrlAndHeadersWithAuth.mjs.map +0 -1
  551. package/lib/index.d.mts.map +0 -1
  552. package/lib/index.mjs +0 -22
  553. package/lib/index.mjs.map +0 -1
  554. package/lib/localOdspDriver/localOdspDeltaStorageService.d.mts.map +0 -1
  555. package/lib/localOdspDriver/localOdspDeltaStorageService.mjs.map +0 -1
  556. package/lib/localOdspDriver/localOdspDocumentService.d.mts.map +0 -1
  557. package/lib/localOdspDriver/localOdspDocumentService.mjs.map +0 -1
  558. package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.mts.map +0 -1
  559. package/lib/localOdspDriver/localOdspDocumentServiceFactory.mjs.map +0 -1
  560. package/lib/localOdspDriver/localOdspDocumentStorageManager.d.mts.map +0 -1
  561. package/lib/localOdspDriver/localOdspDocumentStorageManager.mjs.map +0 -1
  562. package/lib/odspCache.d.mts.map +0 -1
  563. package/lib/odspCache.mjs.map +0 -1
  564. package/lib/odspDelayLoadedDeltaStream.d.mts.map +0 -1
  565. package/lib/odspDelayLoadedDeltaStream.mjs.map +0 -1
  566. package/lib/odspDeltaStorageService.d.mts.map +0 -1
  567. package/lib/odspDeltaStorageService.mjs.map +0 -1
  568. package/lib/odspDocumentDeltaConnection.d.mts.map +0 -1
  569. package/lib/odspDocumentDeltaConnection.mjs.map +0 -1
  570. package/lib/odspDocumentService.d.mts.map +0 -1
  571. package/lib/odspDocumentService.mjs.map +0 -1
  572. package/lib/odspDocumentServiceFactory.d.mts.map +0 -1
  573. package/lib/odspDocumentServiceFactory.mjs.map +0 -1
  574. package/lib/odspDocumentServiceFactoryCore.d.mts.map +0 -1
  575. package/lib/odspDocumentServiceFactoryCore.mjs.map +0 -1
  576. package/lib/odspDocumentServiceFactoryWithCodeSplit.d.mts.map +0 -1
  577. package/lib/odspDocumentServiceFactoryWithCodeSplit.mjs.map +0 -1
  578. package/lib/odspDocumentStorageManager.d.mts.map +0 -1
  579. package/lib/odspDocumentStorageManager.mjs.map +0 -1
  580. package/lib/odspDocumentStorageServiceBase.d.mts.map +0 -1
  581. package/lib/odspDocumentStorageServiceBase.mjs.map +0 -1
  582. package/lib/odspDriverUrlResolver.d.mts.map +0 -1
  583. package/lib/odspDriverUrlResolver.mjs.map +0 -1
  584. package/lib/odspDriverUrlResolverForShareLink.d.mts.map +0 -1
  585. package/lib/odspDriverUrlResolverForShareLink.mjs.map +0 -1
  586. package/lib/odspError.d.mts.map +0 -1
  587. package/lib/odspError.mjs.map +0 -1
  588. package/lib/odspFluidFileLink.d.mts.map +0 -1
  589. package/lib/odspFluidFileLink.mjs.map +0 -1
  590. package/lib/odspLocationRedirection.d.mts.map +0 -1
  591. package/lib/odspLocationRedirection.mjs.map +0 -1
  592. package/lib/odspPublicUtils.d.mts.map +0 -1
  593. package/lib/odspPublicUtils.mjs.map +0 -1
  594. package/lib/odspSnapshotParser.d.mts.map +0 -1
  595. package/lib/odspSnapshotParser.mjs.map +0 -1
  596. package/lib/odspSummaryUploadManager.d.mts.map +0 -1
  597. package/lib/odspSummaryUploadManager.mjs.map +0 -1
  598. package/lib/odspUrlHelper.d.mts.map +0 -1
  599. package/lib/odspUrlHelper.mjs.map +0 -1
  600. package/lib/odspUtils.d.mts.map +0 -1
  601. package/lib/odspUtils.mjs.map +0 -1
  602. package/lib/opsCaching.d.mts.map +0 -1
  603. package/lib/opsCaching.mjs.map +0 -1
  604. package/lib/packageVersion.d.mts.map +0 -1
  605. package/lib/packageVersion.mjs.map +0 -1
  606. package/lib/prefetchLatestSnapshot.d.mts.map +0 -1
  607. package/lib/prefetchLatestSnapshot.mjs.map +0 -1
  608. package/lib/retryErrorsStorageAdapter.d.mts.map +0 -1
  609. package/lib/retryErrorsStorageAdapter.mjs.map +0 -1
  610. package/lib/retryUtils.d.mts.map +0 -1
  611. package/lib/retryUtils.mjs.map +0 -1
  612. package/lib/socketModule.d.mts.map +0 -1
  613. package/lib/socketModule.mjs.map +0 -1
  614. package/lib/vroom.d.mts.map +0 -1
  615. package/lib/vroom.mjs.map +0 -1
  616. package/lib/zipItDataRepresentationUtils.d.mts.map +0 -1
  617. package/lib/zipItDataRepresentationUtils.mjs.map +0 -1
@@ -0,0 +1,256 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { strict as assert } from "node:assert";
6
+ import { stub } from "sinon";
7
+ import { v4 as uuid } from "uuid";
8
+ import { OdspErrorTypes } from "@fluidframework/odsp-driver-definitions";
9
+ import { MockLogger, isFluidError } from "@fluidframework/telemetry-utils";
10
+ import { createOdspNetworkError } from "@fluidframework/odsp-doclib-utils/internal";
11
+ import { EpochTracker } from "../../epochTracker.js";
12
+ import { getHashedDocumentId } from "../../odspPublicUtils.js";
13
+ import { OdspDocumentDeltaConnection } from "../../odspDocumentDeltaConnection.js";
14
+ import * as socketModule from "../../socketModule.js";
15
+ import { ClientSocketMock } from "./socketMock.js";
16
+ describe("OdspDocumentDeltaConnection tests", () => {
17
+ let tenantId = "tenantId";
18
+ let documentId = "documentId";
19
+ const token = "token";
20
+ const client = {
21
+ mode: "write",
22
+ scopes: ["doc:read", "doc:write"],
23
+ details: { capabilities: { interactive: true } },
24
+ permission: [],
25
+ user: { id: "userId" },
26
+ };
27
+ const webSocketUrl = "https://webSocketUrl";
28
+ let logger;
29
+ const socketReferenceKeyPrefix = "prefix";
30
+ const siteUrl = "https://microsoft.sharepoint-df.com/siteUrl";
31
+ const driveId = "driveId";
32
+ const itemId = "itemId";
33
+ let epochTracker;
34
+ let localCache;
35
+ let hashedDocumentId;
36
+ const resolvedUrl = {
37
+ siteUrl,
38
+ driveId,
39
+ itemId,
40
+ odspResolvedUrl: true,
41
+ };
42
+ let socket;
43
+ before(async () => {
44
+ hashedDocumentId = await getHashedDocumentId(driveId, itemId);
45
+ });
46
+ beforeEach(async () => {
47
+ logger = new MockLogger().toTelemetryLogger();
48
+ documentId = uuid();
49
+ tenantId = uuid();
50
+ // use null logger here as we expect errors
51
+ epochTracker = new EpochTracker(localCache, {
52
+ docId: hashedDocumentId,
53
+ resolvedUrl,
54
+ }, logger);
55
+ });
56
+ const checkListenerCount = (_socket) => {
57
+ assert(_socket.listenerCount("connect_error") === 0, "no connect_error listener should exiist");
58
+ assert(_socket.listenerCount("connect_document_error") === 0, "no connect_document_error listener should exiist");
59
+ assert(_socket.listenerCount("connect_timeout") === 0, "no connect_timeout listener should exiist");
60
+ assert(_socket.listenerCount("connect_document_success") === 0, "no connect_document_success listener should exiist");
61
+ assert(_socket.listenerCount("server_disconnect") === 0, "no server_disconnect listener should exiist");
62
+ assert(_socket.listenerCount("get_ops_response") === 0, "no get_ops_response listener should exiist");
63
+ assert(_socket.listenerCount("flush_ops_response") === 0, "no flush_ops_response listener should exiist");
64
+ assert(_socket.listenerCount("error") === 0, "no error listener should exiist");
65
+ assert(_socket.listenerCount("disconnect") === 0, "no disconnect listener should exiist");
66
+ };
67
+ afterEach(async () => {
68
+ socket?.close();
69
+ await epochTracker.removeEntries().catch(() => { });
70
+ });
71
+ async function mockSocket(_response, callback) {
72
+ const getSocketCreationStub = stub(socketModule, "SocketIOClientStatic");
73
+ getSocketCreationStub.returns(_response);
74
+ try {
75
+ return await callback();
76
+ }
77
+ finally {
78
+ getSocketCreationStub.restore();
79
+ }
80
+ }
81
+ it("Connect document success on connection", async () => {
82
+ socket = new ClientSocketMock();
83
+ const connection = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
84
+ assert.strictEqual(connection.documentId, documentId, "document id should match");
85
+ assert(!connection.disposed, "connection should not be disposed");
86
+ assert(connection.existing, "doucment should already exist");
87
+ assert.strictEqual(connection.mode, "write", "connection should be write");
88
+ let disconnectedEvent = false;
89
+ connection.on("disconnect", (reason) => {
90
+ disconnectedEvent = true;
91
+ });
92
+ connection.dispose();
93
+ assert(connection.disposed, "connection should be disposed now");
94
+ assert(disconnectedEvent, "disconnect Event should happed");
95
+ assert(socket.connected, "socket should still be connected");
96
+ });
97
+ it("Connect document error on connection", async () => {
98
+ const errorToThrow = createOdspNetworkError("TestSocketError", 401);
99
+ socket = new ClientSocketMock({
100
+ connect_document: { eventToEmit: "connect_document_error", errorToThrow },
101
+ });
102
+ let errorhappened = false;
103
+ let connection;
104
+ try {
105
+ connection = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
106
+ }
107
+ catch (error) {
108
+ errorhappened = true;
109
+ assert(isFluidError(error), "should be a Fluid error");
110
+ assert(error.message.includes("TestSocketError"), "error message should match");
111
+ assert(error.errorType === OdspErrorTypes.genericNetworkError, "errortype should be correct");
112
+ }
113
+ assert(connection === undefined, "connection should not happen");
114
+ assert(errorhappened, "error should occur");
115
+ });
116
+ it("Connect error on connection", async () => {
117
+ const errorToThrow = createOdspNetworkError("TestSocketError", 401);
118
+ socket = new ClientSocketMock({
119
+ connect_document: { eventToEmit: "connect_error", errorToThrow },
120
+ });
121
+ let errorhappened = false;
122
+ try {
123
+ await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
124
+ }
125
+ catch (error) {
126
+ errorhappened = true;
127
+ assert(isFluidError(error), "should be a Fluid error");
128
+ assert(error.message.includes("TestSocketError"), "error message should match");
129
+ assert(error.errorType === OdspErrorTypes.genericNetworkError, "errortype should be correct");
130
+ }
131
+ assert(errorhappened, "error should occur");
132
+ });
133
+ it("Connect timeout on connection", async () => {
134
+ socket = new ClientSocketMock({
135
+ connect_document: { eventToEmit: "connect_timeout" },
136
+ });
137
+ let errorhappened = false;
138
+ try {
139
+ await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
140
+ }
141
+ catch (error) {
142
+ errorhappened = true;
143
+ assert(isFluidError(error), "should be a Fluid error");
144
+ assert(error.message.includes("connect_timeout"), "error message should match");
145
+ assert(error.errorType === OdspErrorTypes.genericNetworkError, "errortype should be correct");
146
+ }
147
+ assert(errorhappened, "error should occur");
148
+ });
149
+ it("Connection object should handle server_disconnect event with clientId", async () => {
150
+ socket = new ClientSocketMock();
151
+ const connection = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
152
+ const errorToThrow = { message: "OdspSocketError", code: 400 };
153
+ let errorReceived;
154
+ connection.on("disconnect", (reason) => {
155
+ errorReceived = reason;
156
+ });
157
+ socket.sendServerDisconnectEvent(errorToThrow, connection.clientId);
158
+ assert(errorReceived !== undefined, "disconnect event should happen");
159
+ assert(errorReceived.message.includes("server_disconnect"), "should container server disconnect event");
160
+ assert(errorReceived.errorType, OdspErrorTypes.genericNetworkError);
161
+ assert(socket?.connected, "socket should still be connected");
162
+ assert(socket.listenerCount("server_disconnect") === 1, "server_disconnect listener should still exiist");
163
+ });
164
+ it("Connection object should handle server_disconnect event without clientId", async () => {
165
+ socket = new ClientSocketMock();
166
+ const connection = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
167
+ let errorReceived;
168
+ const errorToThrow = { message: "OdspSocketError", code: 400 };
169
+ connection.on("disconnect", (reason) => {
170
+ errorReceived = reason;
171
+ });
172
+ socket.sendServerDisconnectEvent(errorToThrow);
173
+ assert(errorReceived !== undefined, "disconnect event should happen");
174
+ assert(errorReceived.message.includes("server_disconnect"), "should container server disconnect event");
175
+ assert(errorReceived.errorType, OdspErrorTypes.genericNetworkError);
176
+ assert(socket !== undefined && !socket.connected, "socket should be disconnected");
177
+ checkListenerCount(socket);
178
+ });
179
+ it("Connection object should handle disconnect event", async () => {
180
+ socket = new ClientSocketMock();
181
+ const connection = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
182
+ let errorReceived;
183
+ const errorToThrow = createOdspNetworkError("TestSocketError", 400);
184
+ const details = { context: { code: 400, type: "badError" } };
185
+ connection.on("disconnect", (reason) => {
186
+ errorReceived = reason;
187
+ });
188
+ socket.sendDisconnectEvent(errorToThrow, details);
189
+ assert(errorReceived !== undefined, "disconnect event should happen");
190
+ assert(errorReceived.message.includes("socket.io (disconnect): TestSocketError"), "should container disconnect event");
191
+ assert(errorReceived.errorType, OdspErrorTypes.genericNetworkError);
192
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
193
+ assert(errorReceived.socketErrorType === details.context.type);
194
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
195
+ assert(errorReceived.socketCode === details.context.code);
196
+ assert(socket !== undefined && !socket.connected, "socket should be closed");
197
+ checkListenerCount(socket);
198
+ });
199
+ it("Connection object should handle error event", async () => {
200
+ socket = new ClientSocketMock();
201
+ const connection = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
202
+ let errorReceived;
203
+ const errorToThrow = createOdspNetworkError("TestSocketError", 400);
204
+ connection.on("disconnect", (reason) => {
205
+ errorReceived = reason;
206
+ });
207
+ socket.sendErrorEvent(errorToThrow);
208
+ assert(errorReceived !== undefined, "disconnect event should happen");
209
+ assert(errorReceived.message.includes("socket.io (error): TestSocketError"), "should container disconnect event");
210
+ assert(errorReceived.errorType, OdspErrorTypes.genericNetworkError);
211
+ assert(socket !== undefined && !socket.connected, "socket should be closed");
212
+ checkListenerCount(socket);
213
+ });
214
+ it("Multiple connection objects should handle server_disconnect event without clientId", async () => {
215
+ socket = new ClientSocketMock();
216
+ const connection1 = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
217
+ const connection2 = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
218
+ let disconnectedEvent1 = false;
219
+ let disconnectedEvent2 = false;
220
+ const errorToThrow = { message: "OdspSocketError", code: 400 };
221
+ connection1.on("disconnect", (reason) => {
222
+ disconnectedEvent1 = true;
223
+ });
224
+ connection2.on("disconnect", (reason) => {
225
+ disconnectedEvent2 = true;
226
+ });
227
+ socket.sendServerDisconnectEvent(errorToThrow);
228
+ assert(disconnectedEvent1, "disconnect event should happen on first object");
229
+ assert(disconnectedEvent2, "disconnect event should happen on second object");
230
+ assert(socket !== undefined && !socket.connected, "socket should be disconnected");
231
+ checkListenerCount(socket);
232
+ });
233
+ it("Multiple connection objects should handle server_disconnect event with particular clientId", async () => {
234
+ socket = new ClientSocketMock();
235
+ const connection1 = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
236
+ const connection2 = await mockSocket(socket, async () => OdspDocumentDeltaConnection.create(tenantId, documentId, token, client, webSocketUrl, logger, 60000, epochTracker, socketReferenceKeyPrefix));
237
+ let disconnectedEvent1 = false;
238
+ let disconnectedEvent2 = false;
239
+ const errorToThrow = { message: "OdspSocketError", code: 400 };
240
+ connection1.on("disconnect", (reason) => {
241
+ disconnectedEvent1 = true;
242
+ });
243
+ connection2.on("disconnect", (reason) => {
244
+ disconnectedEvent2 = true;
245
+ });
246
+ socket.sendServerDisconnectEvent(errorToThrow, connection1.clientId);
247
+ assert(disconnectedEvent1, "disconnect event should happen on first object");
248
+ assert(!disconnectedEvent2, "disconnect event should not happen on second object");
249
+ assert(socket.connected, "socket should be connected");
250
+ assert(socket.listenerCount("server_disconnect") === 1, "server_disconnect listener should still exiist");
251
+ assert(socket.listenerCount("error") === 1, "1 error listener should exiist");
252
+ assert(socket.listenerCount("disconnect") === 1, "1 disconnect listener should exiist");
253
+ assert(socket.listenerCount("get_ops_response") === 1, "1 get_ops_response listener should exiist");
254
+ });
255
+ });
256
+ //# sourceMappingURL=socketTests.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"socketTests.spec.js","sourceRoot":"","sources":["../../../src/test/socketTests/socketTests.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE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C,CAAC;QAErE,MAAM,CAAC,kBAAkB,EAAE,gDAAgD,CAAC,CAAC;QAC7E,MAAM,CAAC,CAAC,kBAAkB,EAAE,qDAAqD,CAAC,CAAC;QAEnF,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,4BAA4B,CAAC,CAAC;QACvD,MAAM,CACL,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAC/C,gDAAgD,CAChD,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,gCAAgC,CAAC,CAAC;QAC9E,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,qCAAqC,CAAC,CAAC;QACxF,MAAM,CACL,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAC9C,2CAA2C,CAC3C,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"node:assert\";\nimport { stub } from \"sinon\";\nimport { v4 as uuid } from \"uuid\";\nimport { IOdspResolvedUrl, OdspErrorTypes } from \"@fluidframework/odsp-driver-definitions\";\nimport { IClient } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLoggerExt, MockLogger, isFluidError } from \"@fluidframework/telemetry-utils\";\nimport { IAnyDriverError } from \"@fluidframework/driver-definitions\";\nimport { createOdspNetworkError } from \"@fluidframework/odsp-doclib-utils/internal\";\nimport { Socket } from \"socket.io-client\";\nimport { EpochTracker } from \"../../epochTracker.js\";\nimport { LocalPersistentCache } from \"../../odspCache.js\";\nimport { getHashedDocumentId } from \"../../odspPublicUtils.js\";\nimport { OdspDocumentDeltaConnection } from \"../../odspDocumentDeltaConnection.js\";\nimport * as socketModule from \"../../socketModule.js\";\nimport { ClientSocketMock } from \"./socketMock.js\";\n\ndescribe(\"OdspDocumentDeltaConnection tests\", () => {\n\tlet tenantId = \"tenantId\";\n\tlet documentId = \"documentId\";\n\tconst token = \"token\";\n\tconst client: IClient = {\n\t\tmode: \"write\",\n\t\tscopes: [\"doc:read\", \"doc:write\"],\n\t\tdetails: { capabilities: { interactive: true } },\n\t\tpermission: [],\n\t\tuser: { id: \"userId\" },\n\t};\n\tconst webSocketUrl = \"https://webSocketUrl\";\n\tlet logger: ITelemetryLoggerExt;\n\tconst socketReferenceKeyPrefix = \"prefix\";\n\tconst siteUrl = \"https://microsoft.sharepoint-df.com/siteUrl\";\n\tconst driveId = \"driveId\";\n\tconst itemId = \"itemId\";\n\tlet epochTracker: EpochTracker;\n\tlet localCache: LocalPersistentCache;\n\tlet hashedDocumentId: string;\n\tconst resolvedUrl = {\n\t\tsiteUrl,\n\t\tdriveId,\n\t\titemId,\n\t\todspResolvedUrl: true,\n\t} as unknown as IOdspResolvedUrl;\n\tlet socket: ClientSocketMock | undefined;\n\n\tbefore(async () => {\n\t\thashedDocumentId = await getHashedDocumentId(driveId, itemId);\n\t});\n\n\tbeforeEach(async () => {\n\t\tlogger = new MockLogger().toTelemetryLogger();\n\t\tdocumentId = uuid();\n\t\ttenantId = uuid();\n\t\t// use null logger here as we expect errors\n\t\tepochTracker = new EpochTracker(\n\t\t\tlocalCache,\n\t\t\t{\n\t\t\t\tdocId: hashedDocumentId,\n\t\t\t\tresolvedUrl,\n\t\t\t},\n\t\t\tlogger,\n\t\t);\n\t});\n\n\tconst checkListenerCount = (_socket: ClientSocketMock): void => {\n\t\tassert(\n\t\t\t_socket.listenerCount(\"connect_error\") === 0,\n\t\t\t\"no connect_error listener should exiist\",\n\t\t);\n\t\tassert(\n\t\t\t_socket.listenerCount(\"connect_document_error\") === 0,\n\t\t\t\"no connect_document_error listener should exiist\",\n\t\t);\n\t\tassert(\n\t\t\t_socket.listenerCount(\"connect_timeout\") === 0,\n\t\t\t\"no connect_timeout listener should exiist\",\n\t\t);\n\t\tassert(\n\t\t\t_socket.listenerCount(\"connect_document_success\") === 0,\n\t\t\t\"no connect_document_success listener should exiist\",\n\t\t);\n\t\tassert(\n\t\t\t_socket.listenerCount(\"server_disconnect\") === 0,\n\t\t\t\"no server_disconnect listener should exiist\",\n\t\t);\n\t\tassert(\n\t\t\t_socket.listenerCount(\"get_ops_response\") === 0,\n\t\t\t\"no get_ops_response listener should exiist\",\n\t\t);\n\t\tassert(\n\t\t\t_socket.listenerCount(\"flush_ops_response\") === 0,\n\t\t\t\"no flush_ops_response listener should exiist\",\n\t\t);\n\t\tassert(_socket.listenerCount(\"error\") === 0, \"no error listener should exiist\");\n\t\tassert(_socket.listenerCount(\"disconnect\") === 0, \"no disconnect listener should exiist\");\n\t};\n\n\tafterEach(async () => {\n\t\tsocket?.close();\n\t\tawait epochTracker.removeEntries().catch(() => {});\n\t});\n\n\tasync function mockSocket<T>(_response: Socket, callback: () => Promise<T>): Promise<T> {\n\t\tconst getSocketCreationStub = stub(socketModule, \"SocketIOClientStatic\");\n\t\tgetSocketCreationStub.returns(_response);\n\t\ttry {\n\t\t\treturn await callback();\n\t\t} finally {\n\t\t\tgetSocketCreationStub.restore();\n\t\t}\n\t}\n\n\tit(\"Connect document success on connection\", async () => {\n\t\tsocket = new ClientSocketMock();\n\t\tconst connection = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\t\tassert.strictEqual(connection.documentId, documentId, \"document id should match\");\n\t\tassert(!connection.disposed, \"connection should not be disposed\");\n\t\tassert(connection.existing, \"doucment should already exist\");\n\t\tassert.strictEqual(connection.mode, \"write\", \"connection should be write\");\n\n\t\tlet disconnectedEvent = false;\n\t\tconnection.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\tdisconnectedEvent = true;\n\t\t});\n\n\t\tconnection.dispose();\n\t\tassert(connection.disposed, \"connection should be disposed now\");\n\t\tassert(disconnectedEvent, \"disconnect Event should happed\");\n\t\tassert(socket.connected, \"socket should still be connected\");\n\t});\n\n\tit(\"Connect document error on connection\", async () => {\n\t\tconst errorToThrow = createOdspNetworkError(\"TestSocketError\", 401);\n\t\tsocket = new ClientSocketMock({\n\t\t\tconnect_document: { eventToEmit: \"connect_document_error\", errorToThrow },\n\t\t});\n\t\tlet errorhappened = false;\n\t\tlet connection: OdspDocumentDeltaConnection | undefined;\n\t\ttry {\n\t\t\tconnection = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\t\ttenantId,\n\t\t\t\t\tdocumentId,\n\t\t\t\t\ttoken,\n\t\t\t\t\tclient,\n\t\t\t\t\twebSocketUrl,\n\t\t\t\t\tlogger,\n\t\t\t\t\t60000,\n\t\t\t\t\tepochTracker,\n\t\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t\t),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\terrorhappened = true;\n\t\t\tassert(isFluidError(error), \"should be a Fluid error\");\n\t\t\tassert(error.message.includes(\"TestSocketError\"), \"error message should match\");\n\t\t\tassert(\n\t\t\t\terror.errorType === OdspErrorTypes.genericNetworkError,\n\t\t\t\t\"errortype should be correct\",\n\t\t\t);\n\t\t}\n\t\tassert(connection === undefined, \"connection should not happen\");\n\t\tassert(errorhappened, \"error should occur\");\n\t});\n\n\tit(\"Connect error on connection\", async () => {\n\t\tconst errorToThrow = createOdspNetworkError(\"TestSocketError\", 401);\n\t\tsocket = new ClientSocketMock({\n\t\t\tconnect_document: { eventToEmit: \"connect_error\", errorToThrow },\n\t\t});\n\t\tlet errorhappened = false;\n\t\ttry {\n\t\t\tawait mockSocket(socket as unknown as Socket, async () =>\n\t\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\t\ttenantId,\n\t\t\t\t\tdocumentId,\n\t\t\t\t\ttoken,\n\t\t\t\t\tclient,\n\t\t\t\t\twebSocketUrl,\n\t\t\t\t\tlogger,\n\t\t\t\t\t60000,\n\t\t\t\t\tepochTracker,\n\t\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t\t),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\terrorhappened = true;\n\t\t\tassert(isFluidError(error), \"should be a Fluid error\");\n\t\t\tassert(error.message.includes(\"TestSocketError\"), \"error message should match\");\n\t\t\tassert(\n\t\t\t\terror.errorType === OdspErrorTypes.genericNetworkError,\n\t\t\t\t\"errortype should be correct\",\n\t\t\t);\n\t\t}\n\t\tassert(errorhappened, \"error should occur\");\n\t});\n\n\tit(\"Connect timeout on connection\", async () => {\n\t\tsocket = new ClientSocketMock({\n\t\t\tconnect_document: { eventToEmit: \"connect_timeout\" },\n\t\t});\n\t\tlet errorhappened = false;\n\t\ttry {\n\t\t\tawait mockSocket(socket as unknown as Socket, async () =>\n\t\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\t\ttenantId,\n\t\t\t\t\tdocumentId,\n\t\t\t\t\ttoken,\n\t\t\t\t\tclient,\n\t\t\t\t\twebSocketUrl,\n\t\t\t\t\tlogger,\n\t\t\t\t\t60000,\n\t\t\t\t\tepochTracker,\n\t\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t\t),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\terrorhappened = true;\n\t\t\tassert(isFluidError(error), \"should be a Fluid error\");\n\t\t\tassert(error.message.includes(\"connect_timeout\"), \"error message should match\");\n\t\t\tassert(\n\t\t\t\terror.errorType === OdspErrorTypes.genericNetworkError,\n\t\t\t\t\"errortype should be correct\",\n\t\t\t);\n\t\t}\n\t\tassert(errorhappened, \"error should occur\");\n\t});\n\n\tit(\"Connection object should handle server_disconnect event with clientId\", async () => {\n\t\tsocket = new ClientSocketMock();\n\t\tconst connection = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\t\tconst errorToThrow = { message: \"OdspSocketError\", code: 400 };\n\t\tlet errorReceived: IAnyDriverError | undefined;\n\t\tconnection.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\terrorReceived = reason;\n\t\t});\n\t\tsocket.sendServerDisconnectEvent(errorToThrow, connection.clientId);\n\n\t\tassert(errorReceived !== undefined, \"disconnect event should happen\");\n\t\tassert(\n\t\t\terrorReceived.message.includes(\"server_disconnect\"),\n\t\t\t\"should container server disconnect event\",\n\t\t);\n\t\tassert(errorReceived.errorType, OdspErrorTypes.genericNetworkError);\n\t\tassert(socket?.connected, \"socket should still be connected\");\n\t\tassert(\n\t\t\tsocket.listenerCount(\"server_disconnect\") === 1,\n\t\t\t\"server_disconnect listener should still exiist\",\n\t\t);\n\t});\n\n\tit(\"Connection object should handle server_disconnect event without clientId\", async () => {\n\t\tsocket = new ClientSocketMock();\n\t\tconst connection = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\t\tlet errorReceived: IAnyDriverError | undefined;\n\t\tconst errorToThrow = { message: \"OdspSocketError\", code: 400 };\n\t\tconnection.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\terrorReceived = reason;\n\t\t});\n\t\tsocket.sendServerDisconnectEvent(errorToThrow);\n\n\t\tassert(errorReceived !== undefined, \"disconnect event should happen\");\n\t\tassert(\n\t\t\terrorReceived.message.includes(\"server_disconnect\"),\n\t\t\t\"should container server disconnect event\",\n\t\t);\n\t\tassert(errorReceived.errorType, OdspErrorTypes.genericNetworkError);\n\t\tassert(socket !== undefined && !socket.connected, \"socket should be disconnected\");\n\t\tcheckListenerCount(socket);\n\t});\n\n\tit(\"Connection object should handle disconnect event\", async () => {\n\t\tsocket = new ClientSocketMock();\n\t\tconst connection = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\t\tlet errorReceived: IAnyDriverError | undefined;\n\t\tconst errorToThrow = createOdspNetworkError(\"TestSocketError\", 400);\n\t\tconst details = { context: { code: 400, type: \"badError\" } };\n\t\tconnection.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\terrorReceived = reason;\n\t\t});\n\t\tsocket.sendDisconnectEvent(errorToThrow, details);\n\n\t\tassert(errorReceived !== undefined, \"disconnect event should happen\");\n\t\tassert(\n\t\t\terrorReceived.message.includes(\"socket.io (disconnect): TestSocketError\"),\n\t\t\t\"should container disconnect event\",\n\t\t);\n\t\tassert(errorReceived.errorType, OdspErrorTypes.genericNetworkError);\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n\t\tassert((errorReceived as any).socketErrorType === details.context.type);\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n\t\tassert((errorReceived as any).socketCode === details.context.code);\n\t\tassert(socket !== undefined && !socket.connected, \"socket should be closed\");\n\t\tcheckListenerCount(socket);\n\t});\n\n\tit(\"Connection object should handle error event\", async () => {\n\t\tsocket = new ClientSocketMock();\n\t\tconst connection = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\n\t\tlet errorReceived: IAnyDriverError | undefined;\n\t\tconst errorToThrow = createOdspNetworkError(\"TestSocketError\", 400);\n\t\tconnection.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\terrorReceived = reason;\n\t\t});\n\t\tsocket.sendErrorEvent(errorToThrow);\n\t\tassert(errorReceived !== undefined, \"disconnect event should happen\");\n\t\tassert(\n\t\t\terrorReceived.message.includes(\"socket.io (error): TestSocketError\"),\n\t\t\t\"should container disconnect event\",\n\t\t);\n\t\tassert(errorReceived.errorType, OdspErrorTypes.genericNetworkError);\n\t\tassert(socket !== undefined && !socket.connected, \"socket should be closed\");\n\t\tcheckListenerCount(socket);\n\t});\n\n\tit(\"Multiple connection objects should handle server_disconnect event without clientId\", async () => {\n\t\tsocket = new ClientSocketMock();\n\t\tconst connection1 = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\n\t\tconst connection2 = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\t\tlet disconnectedEvent1 = false;\n\t\tlet disconnectedEvent2 = false;\n\t\tconst errorToThrow = { message: \"OdspSocketError\", code: 400 };\n\t\tconnection1.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\tdisconnectedEvent1 = true;\n\t\t});\n\t\tconnection2.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\tdisconnectedEvent2 = true;\n\t\t});\n\t\tsocket.sendServerDisconnectEvent(errorToThrow);\n\n\t\tassert(disconnectedEvent1, \"disconnect event should happen on first object\");\n\t\tassert(disconnectedEvent2, \"disconnect event should happen on second object\");\n\n\t\tassert(socket !== undefined && !socket.connected, \"socket should be disconnected\");\n\t\tcheckListenerCount(socket);\n\t});\n\n\tit(\"Multiple connection objects should handle server_disconnect event with particular clientId\", async () => {\n\t\tsocket = new ClientSocketMock();\n\t\tconst connection1 = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\n\t\tconst connection2 = await mockSocket(socket as unknown as Socket, async () =>\n\t\t\tOdspDocumentDeltaConnection.create(\n\t\t\t\ttenantId,\n\t\t\t\tdocumentId,\n\t\t\t\ttoken,\n\t\t\t\tclient,\n\t\t\t\twebSocketUrl,\n\t\t\t\tlogger,\n\t\t\t\t60000,\n\t\t\t\tepochTracker,\n\t\t\t\tsocketReferenceKeyPrefix,\n\t\t\t),\n\t\t);\n\t\tlet disconnectedEvent1 = false;\n\t\tlet disconnectedEvent2 = false;\n\t\tconst errorToThrow = { message: \"OdspSocketError\", code: 400 };\n\t\tconnection1.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\tdisconnectedEvent1 = true;\n\t\t});\n\t\tconnection2.on(\"disconnect\", (reason: IAnyDriverError) => {\n\t\t\tdisconnectedEvent2 = true;\n\t\t});\n\t\tsocket.sendServerDisconnectEvent(errorToThrow, connection1.clientId);\n\n\t\tassert(disconnectedEvent1, \"disconnect event should happen on first object\");\n\t\tassert(!disconnectedEvent2, \"disconnect event should not happen on second object\");\n\n\t\tassert(socket.connected, \"socket should be connected\");\n\t\tassert(\n\t\t\tsocket.listenerCount(\"server_disconnect\") === 1,\n\t\t\t\"server_disconnect listener should still exiist\",\n\t\t);\n\t\tassert(socket.listenerCount(\"error\") === 1, \"1 error listener should exiist\");\n\t\tassert(socket.listenerCount(\"disconnect\") === 1, \"1 disconnect listener should exiist\");\n\t\tassert(\n\t\t\tsocket.listenerCount(\"get_ops_response\") === 1,\n\t\t\t\"1 get_ops_response listener should exiist\",\n\t\t);\n\t});\n});\n"]}
@@ -0,0 +1,39 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import assert from "node:assert";
6
+ import { tokenFromResponse, isTokenFromCache } from "@fluidframework/odsp-driver-definitions";
7
+ describe("tokenFromResponse", () => {
8
+ it("returns token verbatim when token value is passed as a string", async () => {
9
+ const token = "fake token";
10
+ const result = tokenFromResponse(token);
11
+ assert.equal(result, token);
12
+ });
13
+ it("returns token extracted from TokenResponse when token value is passed as object", async () => {
14
+ const tokenResponse = { token: "fake token", fromCache: false };
15
+ const result = tokenFromResponse(tokenResponse);
16
+ assert.equal(result, tokenResponse.token);
17
+ });
18
+ it("returns null when token value is passed as null", async () => {
19
+ const result = tokenFromResponse(null);
20
+ assert.equal(result, null);
21
+ });
22
+ });
23
+ describe("isTokenFromCache", () => {
24
+ it("returns undefined when token value is passed as a string", async () => {
25
+ const token = "fake token";
26
+ const result = isTokenFromCache(token);
27
+ assert.equal(result, undefined);
28
+ });
29
+ it("returns fromCache value extracted from TokenResponse when token value is passed as object", async () => {
30
+ const tokenResponse = { token: "fake token", fromCache: true };
31
+ const result = isTokenFromCache(tokenResponse);
32
+ assert.equal(result, tokenResponse.fromCache);
33
+ });
34
+ it("returns undefined when token value is passed as null", async () => {
35
+ const result = isTokenFromCache(null);
36
+ assert.equal(result, undefined);
37
+ });
38
+ });
39
+ //# sourceMappingURL=tokenFetch.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenFetch.spec.js","sourceRoot":"","sources":["../../src/test/tokenFetch.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE9F,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC9E,MAAM,KAAK,GAAG,YAAY,CAAC;QAC3B,MAAM,MAAM,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iFAAiF,EAAE,KAAK,IAAI,EAAE;QAChG,MAAM,aAAa,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QAChE,MAAM,MAAM,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAChD,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAChE,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,0DAA0D,EAAE,KAAK,IAAI,EAAE;QACzE,MAAM,KAAK,GAAG,YAAY,CAAC;QAC3B,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2FAA2F,EAAE,KAAK,IAAI,EAAE;QAC1G,MAAM,aAAa,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC/D,MAAM,MAAM,GAAG,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAC/C,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;QACrE,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport assert from \"node:assert\";\nimport { tokenFromResponse, isTokenFromCache } from \"@fluidframework/odsp-driver-definitions\";\n\ndescribe(\"tokenFromResponse\", () => {\n\tit(\"returns token verbatim when token value is passed as a string\", async () => {\n\t\tconst token = \"fake token\";\n\t\tconst result = tokenFromResponse(token);\n\t\tassert.equal(result, token);\n\t});\n\n\tit(\"returns token extracted from TokenResponse when token value is passed as object\", async () => {\n\t\tconst tokenResponse = { token: \"fake token\", fromCache: false };\n\t\tconst result = tokenFromResponse(tokenResponse);\n\t\tassert.equal(result, tokenResponse.token);\n\t});\n\n\tit(\"returns null when token value is passed as null\", async () => {\n\t\tconst result = tokenFromResponse(null);\n\t\tassert.equal(result, null);\n\t});\n});\n\ndescribe(\"isTokenFromCache\", () => {\n\tit(\"returns undefined when token value is passed as a string\", async () => {\n\t\tconst token = \"fake token\";\n\t\tconst result = isTokenFromCache(token);\n\t\tassert.equal(result, undefined);\n\t});\n\n\tit(\"returns fromCache value extracted from TokenResponse when token value is passed as object\", async () => {\n\t\tconst tokenResponse = { token: \"fake token\", fromCache: true };\n\t\tconst result = isTokenFromCache(tokenResponse);\n\t\tassert.equal(result, tokenResponse.fromCache);\n\t});\n\n\tit(\"returns undefined when token value is passed as null\", async () => {\n\t\tconst result = isTokenFromCache(null);\n\t\tassert.equal(result, undefined);\n\t});\n});\n"]}
@@ -0,0 +1,96 @@
1
+ use_current_EnumDeclaration_ClpCompliantAppHeader(get_old_EnumDeclaration_ClpCompliantAppHeader());
2
+ use_old_EnumDeclaration_ClpCompliantAppHeader(get_current_EnumDeclaration_ClpCompliantAppHeader());
3
+ use_current_ClassDeclaration_EpochTracker(get_old_ClassDeclaration_EpochTracker());
4
+ use_old_ClassDeclaration_EpochTracker(get_current_ClassDeclaration_EpochTracker());
5
+ use_current_TypeAliasDeclaration_FetchType(get_old_TypeAliasDeclaration_FetchType());
6
+ use_old_TypeAliasDeclaration_FetchType(get_current_TypeAliasDeclaration_FetchType());
7
+ use_current_TypeAliasDeclaration_FetchTypeInternal(get_old_TypeAliasDeclaration_FetchTypeInternal());
8
+ use_old_TypeAliasDeclaration_FetchTypeInternal(get_current_TypeAliasDeclaration_FetchTypeInternal());
9
+ use_current_InterfaceDeclaration_ICacheAndTracker(get_old_InterfaceDeclaration_ICacheAndTracker());
10
+ use_old_InterfaceDeclaration_ICacheAndTracker(get_current_InterfaceDeclaration_ICacheAndTracker());
11
+ use_current_InterfaceDeclaration_IClpCompliantAppHeader(get_old_InterfaceDeclaration_IClpCompliantAppHeader());
12
+ use_old_InterfaceDeclaration_IClpCompliantAppHeader(get_current_InterfaceDeclaration_IClpCompliantAppHeader());
13
+ use_current_InterfaceDeclaration_INonPersistentCache(get_old_InterfaceDeclaration_INonPersistentCache());
14
+ use_old_InterfaceDeclaration_INonPersistentCache(get_current_InterfaceDeclaration_INonPersistentCache());
15
+ use_current_InterfaceDeclaration_IOdspCache(get_old_InterfaceDeclaration_IOdspCache());
16
+ use_old_InterfaceDeclaration_IOdspCache(get_current_InterfaceDeclaration_IOdspCache());
17
+ use_current_InterfaceDeclaration_IOdspResponse(get_old_InterfaceDeclaration_IOdspResponse());
18
+ use_old_InterfaceDeclaration_IOdspResponse(get_current_InterfaceDeclaration_IOdspResponse());
19
+ use_current_InterfaceDeclaration_IPersistedFileCache(get_old_InterfaceDeclaration_IPersistedFileCache());
20
+ use_old_InterfaceDeclaration_IPersistedFileCache(get_current_InterfaceDeclaration_IPersistedFileCache());
21
+ use_current_InterfaceDeclaration_IPrefetchSnapshotContents(
22
+ // @ts-expect-error compatibility expected to be broken
23
+ get_old_InterfaceDeclaration_IPrefetchSnapshotContents());
24
+ use_old_InterfaceDeclaration_IPrefetchSnapshotContents(
25
+ // @ts-expect-error compatibility expected to be broken
26
+ get_current_InterfaceDeclaration_IPrefetchSnapshotContents());
27
+ use_current_InterfaceDeclaration_ISharingLinkHeader(get_old_InterfaceDeclaration_ISharingLinkHeader());
28
+ use_old_InterfaceDeclaration_ISharingLinkHeader(get_current_InterfaceDeclaration_ISharingLinkHeader());
29
+ use_current_InterfaceDeclaration_ISnapshotContents(get_old_InterfaceDeclaration_ISnapshotContents());
30
+ use_old_InterfaceDeclaration_ISnapshotContents(get_current_InterfaceDeclaration_ISnapshotContents());
31
+ use_current_InterfaceDeclaration_ISnapshotContentsWithProps(
32
+ // @ts-expect-error compatibility expected to be broken
33
+ get_old_InterfaceDeclaration_ISnapshotContentsWithProps());
34
+ use_old_InterfaceDeclaration_ISnapshotContentsWithProps(
35
+ // @ts-expect-error compatibility expected to be broken
36
+ get_current_InterfaceDeclaration_ISnapshotContentsWithProps());
37
+ use_current_VariableDeclaration_OdcApiSiteOrigin(get_old_VariableDeclaration_OdcApiSiteOrigin());
38
+ use_old_VariableDeclaration_OdcApiSiteOrigin(get_current_VariableDeclaration_OdcApiSiteOrigin());
39
+ use_current_VariableDeclaration_OdcFileSiteOrigin(get_old_VariableDeclaration_OdcFileSiteOrigin());
40
+ use_old_VariableDeclaration_OdcFileSiteOrigin(get_current_VariableDeclaration_OdcFileSiteOrigin());
41
+ use_current_ClassDeclaration_OdspDocumentServiceFactory(get_old_ClassDeclaration_OdspDocumentServiceFactory());
42
+ use_old_ClassDeclaration_OdspDocumentServiceFactory(get_current_ClassDeclaration_OdspDocumentServiceFactory());
43
+ use_current_ClassDeclaration_OdspDocumentServiceFactoryCore(get_old_ClassDeclaration_OdspDocumentServiceFactoryCore());
44
+ use_old_ClassDeclaration_OdspDocumentServiceFactoryCore(get_current_ClassDeclaration_OdspDocumentServiceFactoryCore());
45
+ use_current_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit(get_old_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit());
46
+ use_old_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit(get_current_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit());
47
+ use_current_ClassDeclaration_OdspDriverUrlResolver(get_old_ClassDeclaration_OdspDriverUrlResolver());
48
+ use_old_ClassDeclaration_OdspDriverUrlResolver(get_current_ClassDeclaration_OdspDriverUrlResolver());
49
+ use_current_ClassDeclaration_OdspDriverUrlResolverForShareLink(
50
+ // @ts-expect-error compatibility expected to be broken
51
+ get_old_ClassDeclaration_OdspDriverUrlResolverForShareLink());
52
+ use_old_ClassDeclaration_OdspDriverUrlResolverForShareLink(get_current_ClassDeclaration_OdspDriverUrlResolverForShareLink());
53
+ use_current_InterfaceDeclaration_OdspFluidDataStoreLocator(get_old_InterfaceDeclaration_OdspFluidDataStoreLocator());
54
+ use_old_InterfaceDeclaration_OdspFluidDataStoreLocator(get_current_InterfaceDeclaration_OdspFluidDataStoreLocator());
55
+ use_current_InterfaceDeclaration_ShareLinkFetcherProps(get_old_InterfaceDeclaration_ShareLinkFetcherProps());
56
+ use_old_InterfaceDeclaration_ShareLinkFetcherProps(get_current_InterfaceDeclaration_ShareLinkFetcherProps());
57
+ use_current_EnumDeclaration_SharingLinkHeader(get_old_EnumDeclaration_SharingLinkHeader());
58
+ use_old_EnumDeclaration_SharingLinkHeader(get_current_EnumDeclaration_SharingLinkHeader());
59
+ use_current_EnumDeclaration_SnapshotFormatSupportType(get_old_EnumDeclaration_SnapshotFormatSupportType());
60
+ use_old_EnumDeclaration_SnapshotFormatSupportType(get_current_EnumDeclaration_SnapshotFormatSupportType());
61
+ use_current_FunctionDeclaration_checkUrl(get_old_FunctionDeclaration_checkUrl());
62
+ use_old_FunctionDeclaration_checkUrl(get_current_FunctionDeclaration_checkUrl());
63
+ use_current_FunctionDeclaration_createLocalOdspDocumentServiceFactory(get_old_FunctionDeclaration_createLocalOdspDocumentServiceFactory());
64
+ use_old_FunctionDeclaration_createLocalOdspDocumentServiceFactory(get_current_FunctionDeclaration_createLocalOdspDocumentServiceFactory());
65
+ use_current_FunctionDeclaration_createOdspCreateContainerRequest(get_old_FunctionDeclaration_createOdspCreateContainerRequest());
66
+ use_old_FunctionDeclaration_createOdspCreateContainerRequest(get_current_FunctionDeclaration_createOdspCreateContainerRequest());
67
+ use_current_FunctionDeclaration_createOdspUrl(get_old_FunctionDeclaration_createOdspUrl());
68
+ use_old_FunctionDeclaration_createOdspUrl(get_current_FunctionDeclaration_createOdspUrl());
69
+ use_current_FunctionDeclaration_encodeOdspFluidDataStoreLocator(get_old_FunctionDeclaration_encodeOdspFluidDataStoreLocator());
70
+ use_old_FunctionDeclaration_encodeOdspFluidDataStoreLocator(get_current_FunctionDeclaration_encodeOdspFluidDataStoreLocator());
71
+ use_current_FunctionDeclaration_getApiRoot(get_old_FunctionDeclaration_getApiRoot());
72
+ use_old_FunctionDeclaration_getApiRoot(get_current_FunctionDeclaration_getApiRoot());
73
+ use_current_FunctionDeclaration_getHashedDocumentId(get_old_FunctionDeclaration_getHashedDocumentId());
74
+ use_old_FunctionDeclaration_getHashedDocumentId(get_current_FunctionDeclaration_getHashedDocumentId());
75
+ use_current_FunctionDeclaration_getLocatorFromOdspUrl(get_old_FunctionDeclaration_getLocatorFromOdspUrl());
76
+ use_old_FunctionDeclaration_getLocatorFromOdspUrl(get_current_FunctionDeclaration_getLocatorFromOdspUrl());
77
+ use_current_FunctionDeclaration_getOdspUrlParts(get_old_FunctionDeclaration_getOdspUrlParts());
78
+ use_old_FunctionDeclaration_getOdspUrlParts(get_current_FunctionDeclaration_getOdspUrlParts());
79
+ use_current_FunctionDeclaration_isOdcOrigin(get_old_FunctionDeclaration_isOdcOrigin());
80
+ use_old_FunctionDeclaration_isOdcOrigin(get_current_FunctionDeclaration_isOdcOrigin());
81
+ use_current_FunctionDeclaration_isOdcUrl(get_old_FunctionDeclaration_isOdcUrl());
82
+ use_old_FunctionDeclaration_isOdcUrl(get_current_FunctionDeclaration_isOdcUrl());
83
+ use_current_FunctionDeclaration_isOdspResolvedUrl(get_old_FunctionDeclaration_isOdspResolvedUrl());
84
+ use_old_FunctionDeclaration_isOdspResolvedUrl(get_current_FunctionDeclaration_isOdspResolvedUrl());
85
+ use_current_FunctionDeclaration_isSpoUrl(get_old_FunctionDeclaration_isSpoUrl());
86
+ use_old_FunctionDeclaration_isSpoUrl(get_current_FunctionDeclaration_isSpoUrl());
87
+ use_current_VariableDeclaration_locatorQueryParamName(get_old_VariableDeclaration_locatorQueryParamName());
88
+ use_old_VariableDeclaration_locatorQueryParamName(get_current_VariableDeclaration_locatorQueryParamName());
89
+ use_current_FunctionDeclaration_parseCompactSnapshotResponse(get_old_FunctionDeclaration_parseCompactSnapshotResponse());
90
+ use_old_FunctionDeclaration_parseCompactSnapshotResponse(get_current_FunctionDeclaration_parseCompactSnapshotResponse());
91
+ use_current_FunctionDeclaration_prefetchLatestSnapshot(get_old_FunctionDeclaration_prefetchLatestSnapshot());
92
+ use_old_FunctionDeclaration_prefetchLatestSnapshot(get_current_FunctionDeclaration_prefetchLatestSnapshot());
93
+ use_current_FunctionDeclaration_storeLocatorInOdspUrl(get_old_FunctionDeclaration_storeLocatorInOdspUrl());
94
+ use_old_FunctionDeclaration_storeLocatorInOdspUrl(get_current_FunctionDeclaration_storeLocatorInOdspUrl());
95
+ export {};
96
+ //# sourceMappingURL=validateOdspDriverPrevious.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateOdspDriverPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateOdspDriverPrevious.generated.ts"],"names":[],"mappings":"AAgCA,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C,CACzC,iDAAiD,EAAE,CAAC,CAAC;AAWzD,yCAAyC,CACrC,qCAAqC,EAAE,CAAC,CAAC;AAW7C,qCAAqC,CACjC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,0CAA0C,CACtC,sCAAsC,EAAE,CAAC,CAAC;AAW9C,sCAAsC,CAClC,0CAA0C,EAAE,CAAC,CAAC;AAWlD,kDAAkD,CAC9C,8CAA8C,EAAE,CAAC,CAAC;AAWtD,8CAA8C,CAC1C,kDAAkD,EAAE,CAAC,CAAC;AAW1D,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C,CACzC,iDAAiD,EAAE,CAAC,CAAC;AAWzD,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAW/D,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,2CAA2C,CACvC,uCAAuC,EAAE,CAAC,CAAC;AAW/C,uCAAuC,CACnC,2CAA2C,EAAE,CAAC,CAAC;AAWnD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CAC7C,qDAAqD,EAAE,CAAC,CAAC;AAW7D,+CAA+C,CAC3C,2CAA2C,EAAE,CAAC,CAAC;AAWnD,2CAA2C,CACvC,+CAA+C,EAAE,CAAC,CAAC;AAWvD,2CAA2C,CACvC,uCAAuC,EAAE,CAAC,CAAC;AAW/C,uCAAuC,CACnC,2CAA2C,EAAE,CAAC,CAAC;AAWnD,wCAAwC,CACpC,oCAAoC,EAAE,CAAC,CAAC;AAW5C,oCAAoC,CAChC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C,CACzC,iDAAiD,EAAE,CAAC,CAAC;AAWzD,wCAAwC,CACpC,oCAAoC,EAAE,CAAC,CAAC;AAW5C,oCAAoC,CAChC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,qDAAqD,CACjD,iDAAiD,EAAE,CAAC,CAAC;AAWzD,iDAAiD,CAC7C,qDAAqD,EAAE,CAAC,CAAC;AAW7D,4DAA4D,CACxD,wDAAwD,EAAE,CAAC,CAAC;AAWhE,wDAAwD,CACpD,4DAA4D,EAAE,CAAC,CAAC;AAWpE,sDAAsD,CAClD,kDAAkD,EAAE,CAAC,CAAC;AAW1D,kDAAkD,CAC9C,sDAAsD,EAAE,CAAC,CAAC;AAW9D,qDAAqD,CACjD,iDAAiD,EAAE,CAAC,CAAC;AAWzD,iDAAiD,CAC7C,qDAAqD,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport type * as old from \"@fluidframework/odsp-driver-previous\";\nimport type * as current from \"../../index.js\";\n\n\n// See 'build-tools/src/type-test-generator/compatibility.ts' for more information.\ntype TypeOnly<T> = T extends number\n\t? number\n\t: T extends string\n\t? string\n\t: T extends boolean | bigint | symbol\n\t? T\n\t: {\n\t\t\t[P in keyof T]: TypeOnly<T[P]>;\n\t };\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_ClpCompliantAppHeader\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_EnumDeclaration_ClpCompliantAppHeader():\n TypeOnly<old.ClpCompliantAppHeader>;\ndeclare function use_current_EnumDeclaration_ClpCompliantAppHeader(\n use: TypeOnly<current.ClpCompliantAppHeader>): void;\nuse_current_EnumDeclaration_ClpCompliantAppHeader(\n get_old_EnumDeclaration_ClpCompliantAppHeader());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_ClpCompliantAppHeader\": {\"backCompat\": false}\n*/\ndeclare function get_current_EnumDeclaration_ClpCompliantAppHeader():\n TypeOnly<current.ClpCompliantAppHeader>;\ndeclare function use_old_EnumDeclaration_ClpCompliantAppHeader(\n use: TypeOnly<old.ClpCompliantAppHeader>): void;\nuse_old_EnumDeclaration_ClpCompliantAppHeader(\n get_current_EnumDeclaration_ClpCompliantAppHeader());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_EpochTracker\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_EpochTracker():\n TypeOnly<old.EpochTracker>;\ndeclare function use_current_ClassDeclaration_EpochTracker(\n use: TypeOnly<current.EpochTracker>): void;\nuse_current_ClassDeclaration_EpochTracker(\n get_old_ClassDeclaration_EpochTracker());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_EpochTracker\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_EpochTracker():\n TypeOnly<current.EpochTracker>;\ndeclare function use_old_ClassDeclaration_EpochTracker(\n use: TypeOnly<old.EpochTracker>): void;\nuse_old_ClassDeclaration_EpochTracker(\n get_current_ClassDeclaration_EpochTracker());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_FetchType\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_FetchType():\n TypeOnly<old.FetchType>;\ndeclare function use_current_TypeAliasDeclaration_FetchType(\n use: TypeOnly<current.FetchType>): void;\nuse_current_TypeAliasDeclaration_FetchType(\n get_old_TypeAliasDeclaration_FetchType());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_FetchType\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_FetchType():\n TypeOnly<current.FetchType>;\ndeclare function use_old_TypeAliasDeclaration_FetchType(\n use: TypeOnly<old.FetchType>): void;\nuse_old_TypeAliasDeclaration_FetchType(\n get_current_TypeAliasDeclaration_FetchType());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_FetchTypeInternal\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_FetchTypeInternal():\n TypeOnly<old.FetchTypeInternal>;\ndeclare function use_current_TypeAliasDeclaration_FetchTypeInternal(\n use: TypeOnly<current.FetchTypeInternal>): void;\nuse_current_TypeAliasDeclaration_FetchTypeInternal(\n get_old_TypeAliasDeclaration_FetchTypeInternal());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_FetchTypeInternal\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_FetchTypeInternal():\n TypeOnly<current.FetchTypeInternal>;\ndeclare function use_old_TypeAliasDeclaration_FetchTypeInternal(\n use: TypeOnly<old.FetchTypeInternal>): void;\nuse_old_TypeAliasDeclaration_FetchTypeInternal(\n get_current_TypeAliasDeclaration_FetchTypeInternal());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ICacheAndTracker\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ICacheAndTracker():\n TypeOnly<old.ICacheAndTracker>;\ndeclare function use_current_InterfaceDeclaration_ICacheAndTracker(\n use: TypeOnly<current.ICacheAndTracker>): void;\nuse_current_InterfaceDeclaration_ICacheAndTracker(\n get_old_InterfaceDeclaration_ICacheAndTracker());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ICacheAndTracker\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ICacheAndTracker():\n TypeOnly<current.ICacheAndTracker>;\ndeclare function use_old_InterfaceDeclaration_ICacheAndTracker(\n use: TypeOnly<old.ICacheAndTracker>): void;\nuse_old_InterfaceDeclaration_ICacheAndTracker(\n get_current_InterfaceDeclaration_ICacheAndTracker());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IClpCompliantAppHeader\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IClpCompliantAppHeader():\n TypeOnly<old.IClpCompliantAppHeader>;\ndeclare function use_current_InterfaceDeclaration_IClpCompliantAppHeader(\n use: TypeOnly<current.IClpCompliantAppHeader>): void;\nuse_current_InterfaceDeclaration_IClpCompliantAppHeader(\n get_old_InterfaceDeclaration_IClpCompliantAppHeader());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IClpCompliantAppHeader\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IClpCompliantAppHeader():\n TypeOnly<current.IClpCompliantAppHeader>;\ndeclare function use_old_InterfaceDeclaration_IClpCompliantAppHeader(\n use: TypeOnly<old.IClpCompliantAppHeader>): void;\nuse_old_InterfaceDeclaration_IClpCompliantAppHeader(\n get_current_InterfaceDeclaration_IClpCompliantAppHeader());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_INonPersistentCache\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_INonPersistentCache():\n TypeOnly<old.INonPersistentCache>;\ndeclare function use_current_InterfaceDeclaration_INonPersistentCache(\n use: TypeOnly<current.INonPersistentCache>): void;\nuse_current_InterfaceDeclaration_INonPersistentCache(\n get_old_InterfaceDeclaration_INonPersistentCache());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_INonPersistentCache\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_INonPersistentCache():\n TypeOnly<current.INonPersistentCache>;\ndeclare function use_old_InterfaceDeclaration_INonPersistentCache(\n use: TypeOnly<old.INonPersistentCache>): void;\nuse_old_InterfaceDeclaration_INonPersistentCache(\n get_current_InterfaceDeclaration_INonPersistentCache());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IOdspCache\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IOdspCache():\n TypeOnly<old.IOdspCache>;\ndeclare function use_current_InterfaceDeclaration_IOdspCache(\n use: TypeOnly<current.IOdspCache>): void;\nuse_current_InterfaceDeclaration_IOdspCache(\n get_old_InterfaceDeclaration_IOdspCache());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IOdspCache\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IOdspCache():\n TypeOnly<current.IOdspCache>;\ndeclare function use_old_InterfaceDeclaration_IOdspCache(\n use: TypeOnly<old.IOdspCache>): void;\nuse_old_InterfaceDeclaration_IOdspCache(\n get_current_InterfaceDeclaration_IOdspCache());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IOdspResponse\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IOdspResponse():\n TypeOnly<old.IOdspResponse<any>>;\ndeclare function use_current_InterfaceDeclaration_IOdspResponse(\n use: TypeOnly<current.IOdspResponse<any>>): void;\nuse_current_InterfaceDeclaration_IOdspResponse(\n get_old_InterfaceDeclaration_IOdspResponse());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IOdspResponse\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IOdspResponse():\n TypeOnly<current.IOdspResponse<any>>;\ndeclare function use_old_InterfaceDeclaration_IOdspResponse(\n use: TypeOnly<old.IOdspResponse<any>>): void;\nuse_old_InterfaceDeclaration_IOdspResponse(\n get_current_InterfaceDeclaration_IOdspResponse());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IPersistedFileCache\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IPersistedFileCache():\n TypeOnly<old.IPersistedFileCache>;\ndeclare function use_current_InterfaceDeclaration_IPersistedFileCache(\n use: TypeOnly<current.IPersistedFileCache>): void;\nuse_current_InterfaceDeclaration_IPersistedFileCache(\n get_old_InterfaceDeclaration_IPersistedFileCache());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IPersistedFileCache\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IPersistedFileCache():\n TypeOnly<current.IPersistedFileCache>;\ndeclare function use_old_InterfaceDeclaration_IPersistedFileCache(\n use: TypeOnly<old.IPersistedFileCache>): void;\nuse_old_InterfaceDeclaration_IPersistedFileCache(\n get_current_InterfaceDeclaration_IPersistedFileCache());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IPrefetchSnapshotContents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IPrefetchSnapshotContents():\n TypeOnly<old.IPrefetchSnapshotContents>;\ndeclare function use_current_InterfaceDeclaration_IPrefetchSnapshotContents(\n use: TypeOnly<current.IPrefetchSnapshotContents>): void;\nuse_current_InterfaceDeclaration_IPrefetchSnapshotContents(\n // @ts-expect-error compatibility expected to be broken\n get_old_InterfaceDeclaration_IPrefetchSnapshotContents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IPrefetchSnapshotContents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IPrefetchSnapshotContents():\n TypeOnly<current.IPrefetchSnapshotContents>;\ndeclare function use_old_InterfaceDeclaration_IPrefetchSnapshotContents(\n use: TypeOnly<old.IPrefetchSnapshotContents>): void;\nuse_old_InterfaceDeclaration_IPrefetchSnapshotContents(\n // @ts-expect-error compatibility expected to be broken\n get_current_InterfaceDeclaration_IPrefetchSnapshotContents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharingLinkHeader\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ISharingLinkHeader():\n TypeOnly<old.ISharingLinkHeader>;\ndeclare function use_current_InterfaceDeclaration_ISharingLinkHeader(\n use: TypeOnly<current.ISharingLinkHeader>): void;\nuse_current_InterfaceDeclaration_ISharingLinkHeader(\n get_old_InterfaceDeclaration_ISharingLinkHeader());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharingLinkHeader\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ISharingLinkHeader():\n TypeOnly<current.ISharingLinkHeader>;\ndeclare function use_old_InterfaceDeclaration_ISharingLinkHeader(\n use: TypeOnly<old.ISharingLinkHeader>): void;\nuse_old_InterfaceDeclaration_ISharingLinkHeader(\n get_current_InterfaceDeclaration_ISharingLinkHeader());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISnapshotContents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ISnapshotContents():\n TypeOnly<old.ISnapshotContents>;\ndeclare function use_current_InterfaceDeclaration_ISnapshotContents(\n use: TypeOnly<current.ISnapshotContents>): void;\nuse_current_InterfaceDeclaration_ISnapshotContents(\n get_old_InterfaceDeclaration_ISnapshotContents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISnapshotContents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ISnapshotContents():\n TypeOnly<current.ISnapshotContents>;\ndeclare function use_old_InterfaceDeclaration_ISnapshotContents(\n use: TypeOnly<old.ISnapshotContents>): void;\nuse_old_InterfaceDeclaration_ISnapshotContents(\n get_current_InterfaceDeclaration_ISnapshotContents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISnapshotContentsWithProps\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ISnapshotContentsWithProps():\n TypeOnly<old.ISnapshotContentsWithProps>;\ndeclare function use_current_InterfaceDeclaration_ISnapshotContentsWithProps(\n use: TypeOnly<current.ISnapshotContentsWithProps>): void;\nuse_current_InterfaceDeclaration_ISnapshotContentsWithProps(\n // @ts-expect-error compatibility expected to be broken\n get_old_InterfaceDeclaration_ISnapshotContentsWithProps());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISnapshotContentsWithProps\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ISnapshotContentsWithProps():\n TypeOnly<current.ISnapshotContentsWithProps>;\ndeclare function use_old_InterfaceDeclaration_ISnapshotContentsWithProps(\n use: TypeOnly<old.ISnapshotContentsWithProps>): void;\nuse_old_InterfaceDeclaration_ISnapshotContentsWithProps(\n // @ts-expect-error compatibility expected to be broken\n get_current_InterfaceDeclaration_ISnapshotContentsWithProps());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_OdcApiSiteOrigin\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_OdcApiSiteOrigin():\n TypeOnly<typeof old.OdcApiSiteOrigin>;\ndeclare function use_current_VariableDeclaration_OdcApiSiteOrigin(\n use: TypeOnly<typeof current.OdcApiSiteOrigin>): void;\nuse_current_VariableDeclaration_OdcApiSiteOrigin(\n get_old_VariableDeclaration_OdcApiSiteOrigin());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_OdcApiSiteOrigin\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_OdcApiSiteOrigin():\n TypeOnly<typeof current.OdcApiSiteOrigin>;\ndeclare function use_old_VariableDeclaration_OdcApiSiteOrigin(\n use: TypeOnly<typeof old.OdcApiSiteOrigin>): void;\nuse_old_VariableDeclaration_OdcApiSiteOrigin(\n get_current_VariableDeclaration_OdcApiSiteOrigin());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_OdcFileSiteOrigin\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_OdcFileSiteOrigin():\n TypeOnly<typeof old.OdcFileSiteOrigin>;\ndeclare function use_current_VariableDeclaration_OdcFileSiteOrigin(\n use: TypeOnly<typeof current.OdcFileSiteOrigin>): void;\nuse_current_VariableDeclaration_OdcFileSiteOrigin(\n get_old_VariableDeclaration_OdcFileSiteOrigin());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_OdcFileSiteOrigin\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_OdcFileSiteOrigin():\n TypeOnly<typeof current.OdcFileSiteOrigin>;\ndeclare function use_old_VariableDeclaration_OdcFileSiteOrigin(\n use: TypeOnly<typeof old.OdcFileSiteOrigin>): void;\nuse_old_VariableDeclaration_OdcFileSiteOrigin(\n get_current_VariableDeclaration_OdcFileSiteOrigin());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDocumentServiceFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_OdspDocumentServiceFactory():\n TypeOnly<old.OdspDocumentServiceFactory>;\ndeclare function use_current_ClassDeclaration_OdspDocumentServiceFactory(\n use: TypeOnly<current.OdspDocumentServiceFactory>): void;\nuse_current_ClassDeclaration_OdspDocumentServiceFactory(\n get_old_ClassDeclaration_OdspDocumentServiceFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDocumentServiceFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_OdspDocumentServiceFactory():\n TypeOnly<current.OdspDocumentServiceFactory>;\ndeclare function use_old_ClassDeclaration_OdspDocumentServiceFactory(\n use: TypeOnly<old.OdspDocumentServiceFactory>): void;\nuse_old_ClassDeclaration_OdspDocumentServiceFactory(\n get_current_ClassDeclaration_OdspDocumentServiceFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDocumentServiceFactoryCore\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_OdspDocumentServiceFactoryCore():\n TypeOnly<old.OdspDocumentServiceFactoryCore>;\ndeclare function use_current_ClassDeclaration_OdspDocumentServiceFactoryCore(\n use: TypeOnly<current.OdspDocumentServiceFactoryCore>): void;\nuse_current_ClassDeclaration_OdspDocumentServiceFactoryCore(\n get_old_ClassDeclaration_OdspDocumentServiceFactoryCore());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDocumentServiceFactoryCore\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_OdspDocumentServiceFactoryCore():\n TypeOnly<current.OdspDocumentServiceFactoryCore>;\ndeclare function use_old_ClassDeclaration_OdspDocumentServiceFactoryCore(\n use: TypeOnly<old.OdspDocumentServiceFactoryCore>): void;\nuse_old_ClassDeclaration_OdspDocumentServiceFactoryCore(\n get_current_ClassDeclaration_OdspDocumentServiceFactoryCore());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit():\n TypeOnly<old.OdspDocumentServiceFactoryWithCodeSplit>;\ndeclare function use_current_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit(\n use: TypeOnly<current.OdspDocumentServiceFactoryWithCodeSplit>): void;\nuse_current_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit(\n get_old_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit():\n TypeOnly<current.OdspDocumentServiceFactoryWithCodeSplit>;\ndeclare function use_old_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit(\n use: TypeOnly<old.OdspDocumentServiceFactoryWithCodeSplit>): void;\nuse_old_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit(\n get_current_ClassDeclaration_OdspDocumentServiceFactoryWithCodeSplit());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDriverUrlResolver\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_OdspDriverUrlResolver():\n TypeOnly<old.OdspDriverUrlResolver>;\ndeclare function use_current_ClassDeclaration_OdspDriverUrlResolver(\n use: TypeOnly<current.OdspDriverUrlResolver>): void;\nuse_current_ClassDeclaration_OdspDriverUrlResolver(\n get_old_ClassDeclaration_OdspDriverUrlResolver());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDriverUrlResolver\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_OdspDriverUrlResolver():\n TypeOnly<current.OdspDriverUrlResolver>;\ndeclare function use_old_ClassDeclaration_OdspDriverUrlResolver(\n use: TypeOnly<old.OdspDriverUrlResolver>): void;\nuse_old_ClassDeclaration_OdspDriverUrlResolver(\n get_current_ClassDeclaration_OdspDriverUrlResolver());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDriverUrlResolverForShareLink\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_OdspDriverUrlResolverForShareLink():\n TypeOnly<old.OdspDriverUrlResolverForShareLink>;\ndeclare function use_current_ClassDeclaration_OdspDriverUrlResolverForShareLink(\n use: TypeOnly<current.OdspDriverUrlResolverForShareLink>): void;\nuse_current_ClassDeclaration_OdspDriverUrlResolverForShareLink(\n // @ts-expect-error compatibility expected to be broken\n get_old_ClassDeclaration_OdspDriverUrlResolverForShareLink());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_OdspDriverUrlResolverForShareLink\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_OdspDriverUrlResolverForShareLink():\n TypeOnly<current.OdspDriverUrlResolverForShareLink>;\ndeclare function use_old_ClassDeclaration_OdspDriverUrlResolverForShareLink(\n use: TypeOnly<old.OdspDriverUrlResolverForShareLink>): void;\nuse_old_ClassDeclaration_OdspDriverUrlResolverForShareLink(\n get_current_ClassDeclaration_OdspDriverUrlResolverForShareLink());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_OdspFluidDataStoreLocator\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_OdspFluidDataStoreLocator():\n TypeOnly<old.OdspFluidDataStoreLocator>;\ndeclare function use_current_InterfaceDeclaration_OdspFluidDataStoreLocator(\n use: TypeOnly<current.OdspFluidDataStoreLocator>): void;\nuse_current_InterfaceDeclaration_OdspFluidDataStoreLocator(\n get_old_InterfaceDeclaration_OdspFluidDataStoreLocator());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_OdspFluidDataStoreLocator\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_OdspFluidDataStoreLocator():\n TypeOnly<current.OdspFluidDataStoreLocator>;\ndeclare function use_old_InterfaceDeclaration_OdspFluidDataStoreLocator(\n use: TypeOnly<old.OdspFluidDataStoreLocator>): void;\nuse_old_InterfaceDeclaration_OdspFluidDataStoreLocator(\n get_current_InterfaceDeclaration_OdspFluidDataStoreLocator());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ShareLinkFetcherProps\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ShareLinkFetcherProps():\n TypeOnly<old.ShareLinkFetcherProps>;\ndeclare function use_current_InterfaceDeclaration_ShareLinkFetcherProps(\n use: TypeOnly<current.ShareLinkFetcherProps>): void;\nuse_current_InterfaceDeclaration_ShareLinkFetcherProps(\n get_old_InterfaceDeclaration_ShareLinkFetcherProps());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ShareLinkFetcherProps\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ShareLinkFetcherProps():\n TypeOnly<current.ShareLinkFetcherProps>;\ndeclare function use_old_InterfaceDeclaration_ShareLinkFetcherProps(\n use: TypeOnly<old.ShareLinkFetcherProps>): void;\nuse_old_InterfaceDeclaration_ShareLinkFetcherProps(\n get_current_InterfaceDeclaration_ShareLinkFetcherProps());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_SharingLinkHeader\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_EnumDeclaration_SharingLinkHeader():\n TypeOnly<old.SharingLinkHeader>;\ndeclare function use_current_EnumDeclaration_SharingLinkHeader(\n use: TypeOnly<current.SharingLinkHeader>): void;\nuse_current_EnumDeclaration_SharingLinkHeader(\n get_old_EnumDeclaration_SharingLinkHeader());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_SharingLinkHeader\": {\"backCompat\": false}\n*/\ndeclare function get_current_EnumDeclaration_SharingLinkHeader():\n TypeOnly<current.SharingLinkHeader>;\ndeclare function use_old_EnumDeclaration_SharingLinkHeader(\n use: TypeOnly<old.SharingLinkHeader>): void;\nuse_old_EnumDeclaration_SharingLinkHeader(\n get_current_EnumDeclaration_SharingLinkHeader());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_SnapshotFormatSupportType\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_EnumDeclaration_SnapshotFormatSupportType():\n TypeOnly<old.SnapshotFormatSupportType>;\ndeclare function use_current_EnumDeclaration_SnapshotFormatSupportType(\n use: TypeOnly<current.SnapshotFormatSupportType>): void;\nuse_current_EnumDeclaration_SnapshotFormatSupportType(\n get_old_EnumDeclaration_SnapshotFormatSupportType());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_SnapshotFormatSupportType\": {\"backCompat\": false}\n*/\ndeclare function get_current_EnumDeclaration_SnapshotFormatSupportType():\n TypeOnly<current.SnapshotFormatSupportType>;\ndeclare function use_old_EnumDeclaration_SnapshotFormatSupportType(\n use: TypeOnly<old.SnapshotFormatSupportType>): void;\nuse_old_EnumDeclaration_SnapshotFormatSupportType(\n get_current_EnumDeclaration_SnapshotFormatSupportType());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_checkUrl\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_checkUrl():\n TypeOnly<typeof old.checkUrl>;\ndeclare function use_current_FunctionDeclaration_checkUrl(\n use: TypeOnly<typeof current.checkUrl>): void;\nuse_current_FunctionDeclaration_checkUrl(\n get_old_FunctionDeclaration_checkUrl());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_checkUrl\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_checkUrl():\n TypeOnly<typeof current.checkUrl>;\ndeclare function use_old_FunctionDeclaration_checkUrl(\n use: TypeOnly<typeof old.checkUrl>): void;\nuse_old_FunctionDeclaration_checkUrl(\n get_current_FunctionDeclaration_checkUrl());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createLocalOdspDocumentServiceFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createLocalOdspDocumentServiceFactory():\n TypeOnly<typeof old.createLocalOdspDocumentServiceFactory>;\ndeclare function use_current_FunctionDeclaration_createLocalOdspDocumentServiceFactory(\n use: TypeOnly<typeof current.createLocalOdspDocumentServiceFactory>): void;\nuse_current_FunctionDeclaration_createLocalOdspDocumentServiceFactory(\n get_old_FunctionDeclaration_createLocalOdspDocumentServiceFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createLocalOdspDocumentServiceFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createLocalOdspDocumentServiceFactory():\n TypeOnly<typeof current.createLocalOdspDocumentServiceFactory>;\ndeclare function use_old_FunctionDeclaration_createLocalOdspDocumentServiceFactory(\n use: TypeOnly<typeof old.createLocalOdspDocumentServiceFactory>): void;\nuse_old_FunctionDeclaration_createLocalOdspDocumentServiceFactory(\n get_current_FunctionDeclaration_createLocalOdspDocumentServiceFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createOdspCreateContainerRequest\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createOdspCreateContainerRequest():\n TypeOnly<typeof old.createOdspCreateContainerRequest>;\ndeclare function use_current_FunctionDeclaration_createOdspCreateContainerRequest(\n use: TypeOnly<typeof current.createOdspCreateContainerRequest>): void;\nuse_current_FunctionDeclaration_createOdspCreateContainerRequest(\n get_old_FunctionDeclaration_createOdspCreateContainerRequest());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createOdspCreateContainerRequest\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createOdspCreateContainerRequest():\n TypeOnly<typeof current.createOdspCreateContainerRequest>;\ndeclare function use_old_FunctionDeclaration_createOdspCreateContainerRequest(\n use: TypeOnly<typeof old.createOdspCreateContainerRequest>): void;\nuse_old_FunctionDeclaration_createOdspCreateContainerRequest(\n get_current_FunctionDeclaration_createOdspCreateContainerRequest());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createOdspUrl\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createOdspUrl():\n TypeOnly<typeof old.createOdspUrl>;\ndeclare function use_current_FunctionDeclaration_createOdspUrl(\n use: TypeOnly<typeof current.createOdspUrl>): void;\nuse_current_FunctionDeclaration_createOdspUrl(\n get_old_FunctionDeclaration_createOdspUrl());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createOdspUrl\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createOdspUrl():\n TypeOnly<typeof current.createOdspUrl>;\ndeclare function use_old_FunctionDeclaration_createOdspUrl(\n use: TypeOnly<typeof old.createOdspUrl>): void;\nuse_old_FunctionDeclaration_createOdspUrl(\n get_current_FunctionDeclaration_createOdspUrl());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_encodeOdspFluidDataStoreLocator\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_encodeOdspFluidDataStoreLocator():\n TypeOnly<typeof old.encodeOdspFluidDataStoreLocator>;\ndeclare function use_current_FunctionDeclaration_encodeOdspFluidDataStoreLocator(\n use: TypeOnly<typeof current.encodeOdspFluidDataStoreLocator>): void;\nuse_current_FunctionDeclaration_encodeOdspFluidDataStoreLocator(\n get_old_FunctionDeclaration_encodeOdspFluidDataStoreLocator());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_encodeOdspFluidDataStoreLocator\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_encodeOdspFluidDataStoreLocator():\n TypeOnly<typeof current.encodeOdspFluidDataStoreLocator>;\ndeclare function use_old_FunctionDeclaration_encodeOdspFluidDataStoreLocator(\n use: TypeOnly<typeof old.encodeOdspFluidDataStoreLocator>): void;\nuse_old_FunctionDeclaration_encodeOdspFluidDataStoreLocator(\n get_current_FunctionDeclaration_encodeOdspFluidDataStoreLocator());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_getApiRoot\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_getApiRoot():\n TypeOnly<typeof old.getApiRoot>;\ndeclare function use_current_FunctionDeclaration_getApiRoot(\n use: TypeOnly<typeof current.getApiRoot>): void;\nuse_current_FunctionDeclaration_getApiRoot(\n get_old_FunctionDeclaration_getApiRoot());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_getApiRoot\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_getApiRoot():\n TypeOnly<typeof current.getApiRoot>;\ndeclare function use_old_FunctionDeclaration_getApiRoot(\n use: TypeOnly<typeof old.getApiRoot>): void;\nuse_old_FunctionDeclaration_getApiRoot(\n get_current_FunctionDeclaration_getApiRoot());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_getHashedDocumentId\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_getHashedDocumentId():\n TypeOnly<typeof old.getHashedDocumentId>;\ndeclare function use_current_FunctionDeclaration_getHashedDocumentId(\n use: TypeOnly<typeof current.getHashedDocumentId>): void;\nuse_current_FunctionDeclaration_getHashedDocumentId(\n get_old_FunctionDeclaration_getHashedDocumentId());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_getHashedDocumentId\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_getHashedDocumentId():\n TypeOnly<typeof current.getHashedDocumentId>;\ndeclare function use_old_FunctionDeclaration_getHashedDocumentId(\n use: TypeOnly<typeof old.getHashedDocumentId>): void;\nuse_old_FunctionDeclaration_getHashedDocumentId(\n get_current_FunctionDeclaration_getHashedDocumentId());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_getLocatorFromOdspUrl\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_getLocatorFromOdspUrl():\n TypeOnly<typeof old.getLocatorFromOdspUrl>;\ndeclare function use_current_FunctionDeclaration_getLocatorFromOdspUrl(\n use: TypeOnly<typeof current.getLocatorFromOdspUrl>): void;\nuse_current_FunctionDeclaration_getLocatorFromOdspUrl(\n get_old_FunctionDeclaration_getLocatorFromOdspUrl());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_getLocatorFromOdspUrl\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_getLocatorFromOdspUrl():\n TypeOnly<typeof current.getLocatorFromOdspUrl>;\ndeclare function use_old_FunctionDeclaration_getLocatorFromOdspUrl(\n use: TypeOnly<typeof old.getLocatorFromOdspUrl>): void;\nuse_old_FunctionDeclaration_getLocatorFromOdspUrl(\n get_current_FunctionDeclaration_getLocatorFromOdspUrl());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_getOdspUrlParts\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_getOdspUrlParts():\n TypeOnly<typeof old.getOdspUrlParts>;\ndeclare function use_current_FunctionDeclaration_getOdspUrlParts(\n use: TypeOnly<typeof current.getOdspUrlParts>): void;\nuse_current_FunctionDeclaration_getOdspUrlParts(\n get_old_FunctionDeclaration_getOdspUrlParts());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_getOdspUrlParts\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_getOdspUrlParts():\n TypeOnly<typeof current.getOdspUrlParts>;\ndeclare function use_old_FunctionDeclaration_getOdspUrlParts(\n use: TypeOnly<typeof old.getOdspUrlParts>): void;\nuse_old_FunctionDeclaration_getOdspUrlParts(\n get_current_FunctionDeclaration_getOdspUrlParts());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_isOdcOrigin\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_isOdcOrigin():\n TypeOnly<typeof old.isOdcOrigin>;\ndeclare function use_current_FunctionDeclaration_isOdcOrigin(\n use: TypeOnly<typeof current.isOdcOrigin>): void;\nuse_current_FunctionDeclaration_isOdcOrigin(\n get_old_FunctionDeclaration_isOdcOrigin());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_isOdcOrigin\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_isOdcOrigin():\n TypeOnly<typeof current.isOdcOrigin>;\ndeclare function use_old_FunctionDeclaration_isOdcOrigin(\n use: TypeOnly<typeof old.isOdcOrigin>): void;\nuse_old_FunctionDeclaration_isOdcOrigin(\n get_current_FunctionDeclaration_isOdcOrigin());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_isOdcUrl\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_isOdcUrl():\n TypeOnly<typeof old.isOdcUrl>;\ndeclare function use_current_FunctionDeclaration_isOdcUrl(\n use: TypeOnly<typeof current.isOdcUrl>): void;\nuse_current_FunctionDeclaration_isOdcUrl(\n get_old_FunctionDeclaration_isOdcUrl());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_isOdcUrl\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_isOdcUrl():\n TypeOnly<typeof current.isOdcUrl>;\ndeclare function use_old_FunctionDeclaration_isOdcUrl(\n use: TypeOnly<typeof old.isOdcUrl>): void;\nuse_old_FunctionDeclaration_isOdcUrl(\n get_current_FunctionDeclaration_isOdcUrl());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_isOdspResolvedUrl\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_isOdspResolvedUrl():\n TypeOnly<typeof old.isOdspResolvedUrl>;\ndeclare function use_current_FunctionDeclaration_isOdspResolvedUrl(\n use: TypeOnly<typeof current.isOdspResolvedUrl>): void;\nuse_current_FunctionDeclaration_isOdspResolvedUrl(\n get_old_FunctionDeclaration_isOdspResolvedUrl());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_isOdspResolvedUrl\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_isOdspResolvedUrl():\n TypeOnly<typeof current.isOdspResolvedUrl>;\ndeclare function use_old_FunctionDeclaration_isOdspResolvedUrl(\n use: TypeOnly<typeof old.isOdspResolvedUrl>): void;\nuse_old_FunctionDeclaration_isOdspResolvedUrl(\n get_current_FunctionDeclaration_isOdspResolvedUrl());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_isSpoUrl\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_isSpoUrl():\n TypeOnly<typeof old.isSpoUrl>;\ndeclare function use_current_FunctionDeclaration_isSpoUrl(\n use: TypeOnly<typeof current.isSpoUrl>): void;\nuse_current_FunctionDeclaration_isSpoUrl(\n get_old_FunctionDeclaration_isSpoUrl());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_isSpoUrl\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_isSpoUrl():\n TypeOnly<typeof current.isSpoUrl>;\ndeclare function use_old_FunctionDeclaration_isSpoUrl(\n use: TypeOnly<typeof old.isSpoUrl>): void;\nuse_old_FunctionDeclaration_isSpoUrl(\n get_current_FunctionDeclaration_isSpoUrl());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_locatorQueryParamName\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_locatorQueryParamName():\n TypeOnly<typeof old.locatorQueryParamName>;\ndeclare function use_current_VariableDeclaration_locatorQueryParamName(\n use: TypeOnly<typeof current.locatorQueryParamName>): void;\nuse_current_VariableDeclaration_locatorQueryParamName(\n get_old_VariableDeclaration_locatorQueryParamName());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_locatorQueryParamName\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_locatorQueryParamName():\n TypeOnly<typeof current.locatorQueryParamName>;\ndeclare function use_old_VariableDeclaration_locatorQueryParamName(\n use: TypeOnly<typeof old.locatorQueryParamName>): void;\nuse_old_VariableDeclaration_locatorQueryParamName(\n get_current_VariableDeclaration_locatorQueryParamName());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_parseCompactSnapshotResponse\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_parseCompactSnapshotResponse():\n TypeOnly<typeof old.parseCompactSnapshotResponse>;\ndeclare function use_current_FunctionDeclaration_parseCompactSnapshotResponse(\n use: TypeOnly<typeof current.parseCompactSnapshotResponse>): void;\nuse_current_FunctionDeclaration_parseCompactSnapshotResponse(\n get_old_FunctionDeclaration_parseCompactSnapshotResponse());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_parseCompactSnapshotResponse\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_parseCompactSnapshotResponse():\n TypeOnly<typeof current.parseCompactSnapshotResponse>;\ndeclare function use_old_FunctionDeclaration_parseCompactSnapshotResponse(\n use: TypeOnly<typeof old.parseCompactSnapshotResponse>): void;\nuse_old_FunctionDeclaration_parseCompactSnapshotResponse(\n get_current_FunctionDeclaration_parseCompactSnapshotResponse());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_prefetchLatestSnapshot\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_prefetchLatestSnapshot():\n TypeOnly<typeof old.prefetchLatestSnapshot>;\ndeclare function use_current_FunctionDeclaration_prefetchLatestSnapshot(\n use: TypeOnly<typeof current.prefetchLatestSnapshot>): void;\nuse_current_FunctionDeclaration_prefetchLatestSnapshot(\n get_old_FunctionDeclaration_prefetchLatestSnapshot());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_prefetchLatestSnapshot\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_prefetchLatestSnapshot():\n TypeOnly<typeof current.prefetchLatestSnapshot>;\ndeclare function use_old_FunctionDeclaration_prefetchLatestSnapshot(\n use: TypeOnly<typeof old.prefetchLatestSnapshot>): void;\nuse_old_FunctionDeclaration_prefetchLatestSnapshot(\n get_current_FunctionDeclaration_prefetchLatestSnapshot());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_storeLocatorInOdspUrl\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_storeLocatorInOdspUrl():\n TypeOnly<typeof old.storeLocatorInOdspUrl>;\ndeclare function use_current_FunctionDeclaration_storeLocatorInOdspUrl(\n use: TypeOnly<typeof current.storeLocatorInOdspUrl>): void;\nuse_current_FunctionDeclaration_storeLocatorInOdspUrl(\n get_old_FunctionDeclaration_storeLocatorInOdspUrl());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_storeLocatorInOdspUrl\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_storeLocatorInOdspUrl():\n TypeOnly<typeof current.storeLocatorInOdspUrl>;\ndeclare function use_old_FunctionDeclaration_storeLocatorInOdspUrl(\n use: TypeOnly<typeof old.storeLocatorInOdspUrl>): void;\nuse_old_FunctionDeclaration_storeLocatorInOdspUrl(\n get_current_FunctionDeclaration_storeLocatorInOdspUrl());\n"]}